diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index a25a118e4a64..fd54de568d2c 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -445,7 +445,7 @@ com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.7 com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.1.0;2.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0;1.1.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.2;1.0.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.1.0;1.2.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.1.0;1.2.0 com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;2.0.0;2.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-chaos;1.3.0;1.4.0-beta.1 diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md index ce73ef06293f..c09aa7c44de5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md @@ -1,14 +1,2109 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2026-04-01) -### Features Added +- Azure Resource Manager Managed Network Fabric client library for Java. This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package api-version 2025-07-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.NetworkPacketBrokersListResult` was removed + +#### `models.InternalNetworkPatchableProperties` was removed + +#### `models.IpCommunityAddOperationProperties` was removed + +#### `models.NetworkDevicesListResult` was removed + +#### `models.OptionAProperties` was removed + +#### `models.L3OptionAProperties` was removed + +#### `models.VpnConfigurationPatchablePropertiesOptionAProperties` was removed + +#### `models.ExternalNetworksList` was removed + +#### `models.IpCommunityDeleteOperationProperties` was removed + +#### `models.OperationListResult` was removed + +#### `models.ExtensionEnumProperty` was removed + +#### `models.NetworkTapPropertiesDestinationsItem` was removed + +#### `models.IpExtendedCommunitySetOperationProperties` was removed + +#### `models.NeighborGroupsListResult` was removed + +#### `models.NetworkTapRulePatchableProperties` was removed + +#### `models.NetworkDeviceSkusListResult` was removed + +#### `models.NetworkTapRulesListResult` was removed + +#### `models.L3IsolationDomainPatchableProperties` was removed + +#### `models.L3IsolationDomainsListResult` was removed + +#### `models.InternalNetworkPropertiesBgpConfiguration` was removed + +#### `models.OptionBProperties` was removed + +#### `models.IpPrefixesListResult` was removed + +#### `models.TerminalServerPatchableProperties` was removed + +#### `models.NetworkFabricPatchableProperties` was removed + +#### `models.InternalNetworkPropertiesStaticRouteConfiguration` was removed + +#### `models.IpExtendedCommunityListResult` was removed + +#### `models.NetworkTapPatchableParametersDestinationsItem` was removed + +#### `models.ExternalNetworkPatchableProperties` was removed + +#### `models.IpCommunitiesListResult` was removed + +#### `models.IpExtendedCommunityPatchableProperties` was removed + +#### `models.AccessControlListPatchableProperties` was removed + +#### `models.NetworkRacksListResult` was removed + +#### `models.NetworkFabricsListResult` was removed + +#### `models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` was removed + +#### `models.NeighborGroupPatchableProperties` was removed + +#### `models.VpnConfigurationPropertiesOptionAProperties` was removed + +#### `models.NetworkFabricPatchablePropertiesTerminalServerConfiguration` was removed + +#### `models.PollingIntervalInSeconds` was removed + +#### `models.InternetGatewayRulesListResult` was removed + +#### `models.ManagementNetworkConfigurationPatchableProperties` was removed + +#### `models.NetworkFabricSkusListResult` was removed + +#### `models.NetworkToNetworkInterconnectsList` was removed + +#### `models.RoutePoliciesListResult` was removed + +#### `models.L2IsolationDomainsListResult` was removed + +#### `models.IpPrefixPatchableProperties` was removed + +#### `models.InternetGatewaysListResult` was removed + +#### `models.IpCommunitySetOperationProperties` was removed + +#### `models.NetworkInterfacesList` was removed + +#### `models.AccessControlListsListResult` was removed + +#### `models.IpExtendedCommunityDeleteOperationProperties` was removed + +#### `models.InternalNetworksList` was removed + +#### `models.NetworkFabricControllersListResult` was removed + +#### `models.NetworkDevicePatchableProperties` was removed + +#### `models.NetworkTapsListResult` was removed + +#### `models.IpExtendedCommunityAddOperationProperties` was removed + +#### `models.NetworkDevice$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.IpCommunity$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.NetworkTapRule$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.NeighborGroup$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.RoutePolicy$DefinitionStages` was modified + +* Required stage 4 was added +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.IpPrefix$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.AccessControlList$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.InternetGateway$DefinitionStages` was modified + +* `withTypePropertiesType(models.GatewayType)` was removed in stage 3 + +#### `models.InternalNetwork$Definition` was modified + +* `withStaticRouteConfiguration(models.InternalNetworkPropertiesStaticRouteConfiguration)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withBgpConfiguration(models.InternalNetworkPropertiesBgpConfiguration)` was removed + +#### `models.ImportRoutePolicyInformation` was modified + +* `validate()` was removed + +#### `models.L2IsolationDomains` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.L3IsolationDomainPatch` was modified + +* `withAggregateRouteConfiguration(models.AggregateRouteConfiguration)` was removed +* `validate()` was removed +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicy)` was removed +* `models.AggregateRouteConfiguration aggregateRouteConfiguration()` -> `models.AggregateRoutePatchConfiguration aggregateRouteConfiguration()` +* `models.ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy()` -> `models.ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy()` + +#### `models.ExportRoutePolicyInformation` was modified + +* `validate()` was removed + +#### `models.NetworkTapRules` was modified + +* `models.CommonPostActionResponseForStateUpdate resync(java.lang.String,java.lang.String)` -> `models.NetworkTapRuleResyncResponse resync(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForStateUpdate resync(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.NetworkTapRuleResyncResponse resync(java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.NetworkTapRuleAction` was modified + +* `validate()` was removed + +#### `models.IpGroupProperties` was modified + +* `validate()` was removed + +#### `models.NetworkInterfacePatch` was modified + +* `validate()` was removed + +#### `models.DestinationProperties` was modified + +* `validate()` was removed + +#### `models.TerminalServerConfiguration` was modified + +* `withPassword(java.lang.String)` was removed +* `validate()` was removed +* `withSerialNumber(java.lang.String)` was removed +* `withUsername(java.lang.String)` was removed + +#### `models.NetworkTapRuleMatchCondition` was modified + +* `validate()` was removed + +#### `models.RebootProperties` was modified + +* `validate()` was removed + +#### `models.NetworkDevice$Update` was modified + +* `withHostname(java.lang.String)` was removed + +#### `models.VpnConfigurationPatchableProperties` was modified + +* `models.VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties()` -> `models.VpnOptionAPatchProperties optionAProperties()` +* `models.OptionBProperties optionBProperties()` -> `models.VpnOptionBPatchProperties optionBProperties()` +* `validate()` was removed +* `withOptionAProperties(models.VpnConfigurationPatchablePropertiesOptionAProperties)` was removed +* `withOptionBProperties(models.OptionBProperties)` was removed + +#### `models.ExternalNetworkPatch` was modified + +* `models.ImportRoutePolicy importRoutePolicy()` -> `models.ImportRoutePolicyPatch importRoutePolicy()` +* `models.ExportRoutePolicy exportRoutePolicy()` -> `models.ExportRoutePolicyPatch exportRoutePolicy()` +* `models.L3OptionBProperties optionBProperties()` -> `models.L3OptionBPatchProperties optionBProperties()` +* `importRoutePolicyId()` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `validate()` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withOptionBProperties(models.L3OptionBProperties)` was removed +* `exportRoutePolicyId()` was removed + +#### `models.SupportedVersionProperties` was modified + +* `SupportedVersionProperties()` was changed to private access +* `withVersion(java.lang.String)` was removed +* `withIsDefault(models.BooleanEnumProperty)` was removed +* `withVendorOsVersion(java.lang.String)` was removed +* `withVendorFirmwareVersion(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ActionIpCommunityProperties` was modified + +* `withAdd(models.IpCommunityIdList)` was removed +* `validate()` was removed + +#### `models.IpPrefixPatch` was modified + +* `validate()` was removed + +#### `models.NetworkInterface` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` + +#### `models.InternetGatewayRulePatch` was modified + +* `withTags(java.util.Map)` was removed +* `validate()` was removed + +#### `ManagedNetworkFabricManager` was modified + +* `fluent.AzureNetworkFabricManagementServiceApi serviceClient()` -> `fluent.ManagedNetworkFabricManagementClient serviceClient()` + +#### `models.ExternalNetworks` was modified + +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` + +#### `models.ExternalNetwork$Update` was modified + +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withOptionBProperties(models.L3OptionBProperties)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed + +#### `models.NetworkTaps` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate resync(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.NetworkTapResyncResponse resync(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate resync(java.lang.String,java.lang.String)` -> `models.NetworkTapResyncResponse resync(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.PortGroupProperties` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomain` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.VlanMatchCondition` was modified + +* `validate()` was removed + +#### `models.NeighborAddress` was modified + +* `validate()` was removed + +#### `models.AccessControlList$Update` was modified + +* `withDynamicMatchConfigurations(java.util.List)` was removed +* `withMatchConfigurations(java.util.List)` was removed + +#### `models.InternalNetworks` was modified + +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` was removed + +#### `models.ExternalNetworkPropertiesOptionAProperties` was modified + +* `withPeerAsn(java.lang.Long)` was removed +* `withPrimaryIpv6Prefix(java.lang.String)` was removed +* `withVlanId(java.lang.Integer)` was removed +* `java.lang.Long peerAsn()` -> `long peerAsn()` +* `withSecondaryIpv6Prefix(java.lang.String)` was removed +* `validate()` was removed +* `java.lang.Integer vlanId()` -> `int vlanId()` +* `withSecondaryIpv4Prefix(java.lang.String)` was removed +* `withPrimaryIpv4Prefix(java.lang.String)` was removed + +#### `models.AccessControlListMatchCondition` was modified + +* `validate()` was removed + +#### `models.ManagedResourceGroupConfiguration` was modified + +* `validate()` was removed + +#### `models.InternalNetwork$Update` was modified + +* `withStaticRouteConfiguration(models.StaticRouteConfiguration)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withConnectedIPv4Subnets(java.util.List)` was removed +* `withConnectedIPv6Subnets(java.util.List)` was removed +* `withBgpConfiguration(models.BgpConfiguration)` was removed + +#### `models.NetworkDevices` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateDeviceAdministrativeState,com.azure.core.util.Context)` -> `models.NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateDeviceAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(java.lang.String,java.lang.String)` -> `models.NetworkDeviceRefreshConfigurationResponse refreshConfiguration(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.NetworkDeviceRefreshConfigurationResponse refreshConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `upgrade(java.lang.String,java.lang.String,models.UpdateVersion,com.azure.core.util.Context)` was removed +* `models.CommonPostActionResponseForStateUpdate reboot(java.lang.String,java.lang.String,models.RebootProperties)` -> `models.OperationStatusResult reboot(java.lang.String,java.lang.String,models.RebootProperties)` +* `upgrade(java.lang.String,java.lang.String,models.UpdateVersion)` was removed +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateDeviceAdministrativeState)` -> `models.NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateDeviceAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate reboot(java.lang.String,java.lang.String,models.RebootProperties,com.azure.core.util.Context)` -> `models.OperationStatusResult reboot(java.lang.String,java.lang.String,models.RebootProperties,com.azure.core.util.Context)` + +#### `models.NetworkTapRule$Definition` was modified + +* `withPollingIntervalInSeconds(models.PollingIntervalInSeconds)` was removed + +#### `models.L3OptionBProperties` was modified + +* `validate()` was removed + +#### `models.NetworkTapRule$Update` was modified + +* `withMatchConfigurations(java.util.List)` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed + +#### `models.UpgradeNetworkFabricProperties` was modified + +* `validate()` was removed + +#### `models.L3ExportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.AnnotationResource` was modified + +* `validate()` was removed + +#### `models.RuleProperties` was modified + +* `validate()` was removed + +#### `models.InternalNetworkPatch` was modified + +* `importRoutePolicyId()` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `exportRoutePolicyId()` was removed +* `withStaticRouteConfiguration(models.StaticRouteConfiguration)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `models.StaticRouteConfiguration staticRouteConfiguration()` -> `models.StaticRoutePatchConfiguration staticRouteConfiguration()` +* `withBgpConfiguration(models.BgpConfiguration)` was removed +* `models.BgpConfiguration bgpConfiguration()` -> `models.BgpPatchConfiguration bgpConfiguration()` +* `validate()` was removed + +#### `models.RoutePolicyPatch` was modified + +* `validate()` was removed + +#### `models.AccessControlListPatch` was modified + +* `validate()` was removed + +#### `models.AccessControlListMatchConfiguration` was modified + +* `validate()` was removed + +#### `models.InternalNetwork` was modified + +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` +* `updateBgpAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `updateBgpAdministrativeState(models.UpdateAdministrativeState)` was removed +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `models.InternalNetworkPropertiesBgpConfiguration bgpConfiguration()` -> `models.BgpConfiguration bgpConfiguration()` +* `models.InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration()` -> `models.StaticRouteConfiguration staticRouteConfiguration()` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `importRoutePolicyId()` was removed +* `exportRoutePolicyId()` was removed +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.IpCommunityIdList` was modified + +* `validate()` was removed + +#### `models.CommonDynamicMatchConfiguration` was modified + +* `validate()` was removed + +#### `models.NetworkDevice$Definition` was modified + +* `withHostname(java.lang.String)` was removed + +#### `models.NeighborGroupDestination` was modified + +* `validate()` was removed + +#### `models.ValidateConfigurationProperties` was modified + +* `validate()` was removed + +#### `models.NetworkFabrics` was modified + +* `models.CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForDeviceUpdate provision(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.OperationStatusResult provision(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate upgrade(java.lang.String,java.lang.String,models.UpgradeNetworkFabricProperties)` -> `models.OperationStatusResult upgrade(java.lang.String,java.lang.String,models.UpgradeNetworkFabricProperties)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.OperationStatusResult refreshConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `commitConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.CommonPostActionResponseForDeviceUpdate provision(java.lang.String,java.lang.String)` -> `models.OperationStatusResult provision(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.ValidateConfigurationResponse getTopology(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.GetTopologyResponse getTopology(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForDeviceUpdate deprovision(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.OperationStatusResult deprovision(java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(java.lang.String,java.lang.String)` -> `models.OperationStatusResult refreshConfiguration(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForDeviceUpdate deprovision(java.lang.String,java.lang.String)` -> `models.OperationStatusResult deprovision(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForStateUpdate commitConfiguration(java.lang.String,java.lang.String)` -> `models.CommitConfigurationResponse commitConfiguration(java.lang.String,java.lang.String)` +* `models.CommonPostActionResponseForStateUpdate upgrade(java.lang.String,java.lang.String,models.UpgradeNetworkFabricProperties,com.azure.core.util.Context)` -> `models.OperationStatusResult upgrade(java.lang.String,java.lang.String,models.UpgradeNetworkFabricProperties,com.azure.core.util.Context)` +* `models.ValidateConfigurationResponse getTopology(java.lang.String,java.lang.String)` -> `models.GetTopologyResponse getTopology(java.lang.String,java.lang.String)` + +#### `models.NetworkDevice` was modified + +* `upgrade(models.UpdateVersion,com.azure.core.util.Context)` was removed +* `upgrade(models.UpdateVersion)` was removed +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateDeviceAdministrativeState,com.azure.core.util.Context)` -> `models.NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateDeviceAdministrativeState,com.azure.core.util.Context)` +* `hostname()` was removed +* `models.CommonPostActionResponseForStateUpdate reboot(models.RebootProperties,com.azure.core.util.Context)` -> `models.OperationStatusResult reboot(models.RebootProperties,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(com.azure.core.util.Context)` -> `models.NetworkDeviceRefreshConfigurationResponse refreshConfiguration(com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateDeviceAdministrativeState)` -> `models.NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateDeviceAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate reboot(models.RebootProperties)` -> `models.OperationStatusResult reboot(models.RebootProperties)` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration()` -> `models.NetworkDeviceRefreshConfigurationResponse refreshConfiguration()` + +#### `models.NetworkFabricController` was modified + +* `workloadManagementNetwork()` was removed + +#### `models.ActionIpExtendedCommunityProperties` was modified + +* `validate()` was removed +* `withAdd(models.IpExtendedCommunityIdList)` was removed + +#### `models.NetworkPacketBrokerPatch` was modified + +* `validate()` was removed + +#### `models.IpCommunityPatch` was modified + +* `validate()` was removed + +#### `models.UpdateAdministrativeState` was modified + +* `validate()` was removed + +#### `models.EnableDisableOnResources` was modified + +* `validate()` was removed + +#### `models.VpnConfigurationProperties` was modified + +* `validate()` was removed +* `models.OptionBProperties optionBProperties()` -> `models.VpnOptionBProperties optionBProperties()` +* `models.VpnConfigurationPropertiesOptionAProperties optionAProperties()` -> `models.VpnOptionAProperties optionAProperties()` +* `withOptionBProperties(models.OptionBProperties)` was removed +* `withOptionAProperties(models.VpnConfigurationPropertiesOptionAProperties)` was removed + +#### `models.UpdateDeviceAdministrativeState` was modified + +* `validate()` was removed + +#### `models.AccessControlList` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.DeviceInterfaceProperties` was modified + +* `DeviceInterfaceProperties()` was changed to private access +* `withIdentifier(java.lang.String)` was removed +* `validate()` was removed +* `withSupportedConnectorTypes(java.util.List)` was removed +* `withInterfaceType(java.lang.String)` was removed + +#### `models.ConnectedSubnet` was modified + +* `validate()` was removed + +#### `models.NetworkFabricControllerPatch` was modified + +* `validate()` was removed + +#### `models.StaticRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.RoutePolicyStatementProperties` was modified + +* `validate()` was removed + +#### `models.NetworkToNetworkInterconnect` was modified + +* `models.CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration()` -> `models.OptionBLayer3Configuration optionBLayer3Configuration()` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` + +#### `models.NetworkTapRule` was modified + +* `models.CommonPostActionResponseForStateUpdate resync()` -> `models.NetworkTapRuleResyncResponse resync()` +* `models.PollingIntervalInSeconds pollingIntervalInSeconds()` -> `java.lang.Integer pollingIntervalInSeconds()` +* `models.CommonPostActionResponseForStateUpdate resync(com.azure.core.util.Context)` -> `models.NetworkTapRuleResyncResponse resync(com.azure.core.util.Context)` + +#### `models.NetworkToNetworkInterconnectPatch` was modified + +* `name()` was removed +* `withLayer2Configuration(models.Layer2Configuration)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicyInformation)` was removed +* `models.NpbStaticRouteConfiguration npbStaticRouteConfiguration()` -> `models.NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration()` +* `withExportRoutePolicy(models.ExportRoutePolicyInformation)` was removed +* `models.OptionBLayer3Configuration optionBLayer3Configuration()` -> `models.OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration()` +* `withOptionBLayer3Configuration(models.OptionBLayer3Configuration)` was removed +* `models.ImportRoutePolicyInformation importRoutePolicy()` -> `models.ImportRoutePolicyInformationPatch importRoutePolicy()` +* `models.Layer2Configuration layer2Configuration()` -> `models.Layer2ConfigurationPatch layer2Configuration()` +* `models.ExportRoutePolicyInformation exportRoutePolicy()` -> `models.ExportRoutePolicyInformationPatch exportRoutePolicy()` +* `validate()` was removed +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfiguration)` was removed + +#### `models.NpbStaticRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomain$Update` was modified + +* `withAggregateRouteConfiguration(models.AggregateRouteConfiguration)` was removed +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicy)` was removed + +#### `models.ConnectedSubnetRoutePolicy` was modified + +* `validate()` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `exportRoutePolicyId()` was removed + +#### `models.StaticRouteProperties` was modified + +* `validate()` was removed + +#### `models.IpExtendedCommunityPatch` was modified + +* `validate()` was removed + +#### `models.RoutePolicy` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.NetworkToNetworkInterconnect$Definition` was modified + +* `withOptionBLayer3Configuration(models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration)` was removed + +#### `models.VlanGroupProperties` was modified + +* `validate()` was removed + +#### `models.TagsUpdate` was modified + +* `validate()` was removed + +#### `models.BgpConfiguration` was modified + +* `java.lang.Long peerAsn()` -> `long peerAsn()` +* `validate()` was removed +* `withPeerAsn(java.lang.Long)` was removed + +#### `models.NetworkFabricPatch` was modified + +* `validate()` was removed +* `withTerminalServerConfiguration(models.NetworkFabricPatchablePropertiesTerminalServerConfiguration)` was removed +* `withManagementNetworkConfiguration(models.ManagementNetworkConfigurationPatchableProperties)` was removed +* `models.NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration()` -> `models.TerminalServerPatchConfiguration terminalServerConfiguration()` +* `models.ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration()` -> `models.ManagementNetworkPatchConfiguration managementNetworkConfiguration()` + +#### `models.AccessControlListPortCondition` was modified + +* `validate()` was removed + +#### `models.IpPrefixRule` was modified + +* `validate()` was removed + +#### `models.RoutePolicies` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.NeighborGroup$Update` was modified + +* `withDestination(models.NeighborGroupDestination)` was removed + +#### `models.AggregateRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.IsolationDomainProperties` was modified + +* `validate()` was removed + +#### `models.StatementActionProperties` was modified + +* `validate()` was removed + +#### `models.PortCondition` was modified + +* `validate()` was removed + +#### `models.ControllerServices` was modified + +* `ControllerServices()` was changed to private access +* `validate()` was removed +* `withIpv6AddressSpaces(java.util.List)` was removed +* `withIpv4AddressSpaces(java.util.List)` was removed + +#### `models.NetworkTapRuleMatchConfiguration` was modified + +* `validate()` was removed + +#### `models.L2IsolationDomain` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` + +#### `models.AccessControlLists` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` + +#### `models.NetworkFabric` was modified + +* `models.ValidateConfigurationResponse getTopology()` -> `models.GetTopologyResponse getTopology()` +* `models.ValidateConfigurationResponse getTopology(com.azure.core.util.Context)` -> `models.GetTopologyResponse getTopology(com.azure.core.util.Context)` +* `models.CommonPostActionResponseForDeviceUpdate deprovision()` -> `models.OperationStatusResult deprovision()` +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration()` -> `models.OperationStatusResult refreshConfiguration()` +* `commitConfiguration(com.azure.core.util.Context)` was removed +* `models.CommonPostActionResponseForStateUpdate refreshConfiguration(com.azure.core.util.Context)` -> `models.OperationStatusResult refreshConfiguration(com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate commitConfiguration()` -> `models.CommitConfigurationResponse commitConfiguration()` +* `models.CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate provision()` -> `models.OperationStatusResult provision()` +* `models.CommonPostActionResponseForStateUpdate upgrade(models.UpgradeNetworkFabricProperties)` -> `models.OperationStatusResult upgrade(models.UpgradeNetworkFabricProperties)` +* `models.CommonPostActionResponseForDeviceUpdate provision(com.azure.core.util.Context)` -> `models.OperationStatusResult provision(com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate upgrade(models.UpgradeNetworkFabricProperties,com.azure.core.util.Context)` -> `models.OperationStatusResult upgrade(models.UpgradeNetworkFabricProperties,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForDeviceUpdate deprovision(com.azure.core.util.Context)` -> `models.OperationStatusResult deprovision(com.azure.core.util.Context)` + +#### `models.IpCommunityRule` was modified + +* `validate()` was removed + +#### `models.CommonMatchConditions` was modified + +* `validate()` was removed + +#### `models.ExternalNetwork` was modified + +* `importRoutePolicyId()` was removed +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `exportRoutePolicyId()` was removed +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.UpdateVersion` was modified + +* `validate()` was removed + +#### `models.NetworkFabric$Update` was modified + +* `withManagementNetworkConfiguration(models.ManagementNetworkConfigurationPatchableProperties)` was removed +* `withTerminalServerConfiguration(models.NetworkFabricPatchablePropertiesTerminalServerConfiguration)` was removed + +#### `models.NetworkToNetworkInterconnect$Update` was modified + +* `withImportRoutePolicy(models.ImportRoutePolicyInformation)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicyInformation)` was removed +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfiguration)` was removed +* `withOptionBLayer3Configuration(models.OptionBLayer3Configuration)` was removed +* `withLayer2Configuration(models.Layer2Configuration)` was removed + +#### `models.NetworkDevicePatchParameters` was modified + +* `validate()` was removed +* `withHostname(java.lang.String)` was removed +* `hostname()` was removed + +#### `models.ManagementNetworkConfigurationProperties` was modified + +* `validate()` was removed + +#### `models.NetworkTap` was modified + +* `models.CommonPostActionResponseForStateUpdate resync(com.azure.core.util.Context)` -> `models.NetworkTapResyncResponse resync(com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate resync()` -> `models.NetworkTapResyncResponse resync()` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.ExportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomains` was modified + +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForDeviceUpdate updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.NetworkToNetworkInterconnects` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` +* `models.CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.RoutePolicy$Update` was modified + +* `withStatements(java.util.List)` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.IpExtendedCommunityIdList` was modified + +* `validate()` was removed + +#### `models.ExternalNetwork$Definition` was modified + +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed + +#### `models.NeighborGroupPatch` was modified + +* `models.NeighborGroupDestination destination()` -> `models.NeighborGroupDestinationPatch destination()` +* `validate()` was removed +* `withDestination(models.NeighborGroupDestination)` was removed + +#### `models.Layer2Configuration` was modified + +* `validate()` was removed + +#### `models.Layer3IpPrefixProperties` was modified + +* `validate()` was removed + +#### `models.L2IsolationDomainPatch` was modified + +* `validate()` was removed + +#### `models.RouteTargetInformation` was modified + +* `validate()` was removed + +#### `models.ExpressRouteConnectionInformation` was modified + +* `validate()` was removed + +#### `models.BfdConfiguration` was modified + +* `validate()` was removed + +#### `models.ImportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.IpExtendedCommunityRule` was modified + +* `validate()` was removed + +#### `models.NetworkInterfaces` was modified + +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` +* `models.CommonPostActionResponseForStateUpdate updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` -> `models.UpdateAdministrativeStateResponse updateAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` + +#### `models.ExternalNetworkPatchPropertiesOptionAProperties` was modified + +* `models.BfdConfiguration bfdConfiguration()` -> `models.BfdPatchConfiguration bfdConfiguration()` +* `withBfdConfiguration(models.BfdConfiguration)` was removed +* `withSecondaryIpv6Prefix(java.lang.String)` was removed +* `withPrimaryIpv4Prefix(java.lang.String)` was removed +* `withSecondaryIpv4Prefix(java.lang.String)` was removed +* `validate()` was removed +* `withPrimaryIpv6Prefix(java.lang.String)` was removed + +#### `models.AccessControlListAction` was modified + +* `validate()` was removed + +#### `models.SupportedConnectorProperties` was modified + +* `SupportedConnectorProperties()` was changed to private access +* `withMaxSpeedInMbps(java.lang.Integer)` was removed +* `withConnectorType(java.lang.String)` was removed +* `validate()` was removed + +#### `models.NetworkTapRulePatch` was modified + +* `validate()` was removed + +#### `models.NetworkTapPatch` was modified + +* `validate()` was removed + +#### `models.AggregateRoute` was modified + +* `validate()` was removed + +#### `models.StatementConditionProperties` was modified + +* `validate()` was removed +* `withIpCommunityIds(java.util.List)` was removed + +#### `models.InternetGatewayPatch` was modified + +* `validate()` was removed + +#### `models.OptionBLayer3Configuration` was modified + +* `withPeerAsn(java.lang.Long)` was removed +* `java.lang.Integer vlanId()` -> `int vlanId()` +* `validate()` was removed +* `withVlanId(java.lang.Integer)` was removed +* `java.lang.Long peerAsn()` -> `long peerAsn()` + +#### `models.IpMatchCondition` was modified + +* `validate()` was removed + +### Features Added + +* `models.HeaderAddressProperties` was added + +* `models.RouteType` was added + +* `models.VpnOptionBProperties` was added + +* `models.InternalNetworkBmpProperties` was added + +* `models.NetworkMonitor$Definition` was added + +* `models.ExternalNetworkBmpProperties` was added + +* `models.L3OptionBPatchProperties` was added + +* `models.NeighborGroupDestinationPatch` was added + +* `models.VlanGroupPatchProperties` was added + +* `models.NetworkFabricRotateCertificatesResponse` was added + +* `models.CertificateArchiveReference` was added + +* `models.BgpAdministrativeState` was added + +* `models.ExternalNetworkUpdateBfdAdministrativeStateRequest` was added + +* `models.GetTopologyResponseProperties` was added + +* `models.NetworkBootstrapDeviceUpgradeResponse` was added + +* `models.NetworkBootstrapDevices` was added + +* `models.StatementActionPatchProperties` was added + +* `models.ManagedServiceIdentity` was added + +* `models.NetworkBootstrapInterface$UpdateStages` was added + +* `models.IcmpConfigurationPatchProperties` was added + +* `models.ControlPlaneAclPortMatchType` was added + +* `models.VlanMatchConditionPatch` was added + +* `models.BfdPatchConfiguration` was added + +* `models.StaticRouteRoutePolicy` was added + +* `models.UpdateAdministrativeStateResponseProperties` was added + +* `models.ArmConfigurationDiffResponseProperties` was added + +* `models.InternalNetworkUpdateBfdAdministrativeStateResponse` was added + +* `models.IcmpConfigurationProperties` was added + +* `models.DiscardCommitBatchResponseProperties` was added + +* `models.NetworkBootstrapInterface` was added + +* `models.NniStaticRouteConfiguration` was added + +* `models.NetworkBootstrapDevice$Definition` was added + +* `models.VpnOptionBPatchProperties` was added + +* `models.CommonMatchConditionsPatch` was added + +* `models.ExternalNetworkStaticRouteConfiguration` was added + +* `models.AuthorizedTransceiverProperties` was added + +* `models.ImportRoutePolicyInformationPatch` was added + +* `models.QosPatchProperties` was added + +* `models.AuthorizedTransceiverPatchProperties` was added + +* `models.NetworkFabricLockAction` was added + +* `models.GlobalNetworkTapRuleActionPatchProperties` was added + +* `models.UniqueRouteDistinguisherPatchProperties` was added + +* `models.ExternalNetworkBmpPatchProperties` was added + +* `models.ConditionalDefaultRouteProperties` was added + +* `models.NniUpdateBfdAdministrativeStateResponse` was added + +* `models.ControlPlaneAclPortMatchCondition` was added + +* `models.ViewDeviceConfigurationOperationResponse` was added + +* `models.BmpConfigurationPatchProperties` was added + +* `models.ManagedServiceIdentityPatch` was added + +* `models.Layer2ConfigurationPatch` was added + +* `models.NetworkFabricLockRequest` was added + +* `models.BitRateUnit` was added + +* `models.CommitBatchStatusResponseProperties` was added + +* `models.ControlPlaneAclProperties` was added + +* `models.NeighborGroupResyncResponse` was added + +* `models.ControlPlaneAclTtlMatchType` was added + +* `models.BurstSizeUnit` was added + +* `models.BmpExportPolicyProperties` was added + +* `models.DestinationPatchProperties` was added + +* `models.SynchronizationStatus` was added + +* `models.ExternalNetworkStaticRoutePatchConfiguration` was added + +* `models.NetworkTapRuleActionPatch` was added + +* `models.StorageAccountConfiguration` was added + +* `models.ControlPlaneAclActionType` was added + +* `models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse` was added + +* `models.CommitBatchStatusOperationResponse` was added + +* `models.NetworkFabricLockType` was added + +* `models.NetworkBootstrapInterfacePatch` was added + +* `models.NetworkRackPatch` was added + +* `models.NetworkDeviceResyncPasswordsResponse` was added + +* `models.StaticRoutePatchConfiguration` was added + +* `models.BmpMonitoredAddressFamily` was added + +* `models.ArmConfigurationDiffOperationResponse` was added + +* `models.CommonErrorResponse` was added + +* `models.NetworkBootstrapDevicePatch` was added + +* `models.UpdateAdministrativeStateResponse` was added + +* `models.NativeIpv6PrefixLimitPatchProperties` was added + +* `models.CommitStage` was added + +* `models.NetworkBootstrapDevice$Update` was added + +* `models.OptionBLayer3PrefixLimitProperties` was added + +* `models.ControlPlaneAclAction` was added + +* `models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties` was added + +* `models.StorageAccountPatchConfiguration` was added + +* `models.NetworkMonitor` was added + +* `models.InternalNetworkRouteType` was added + +* `models.NetworkBootstrapDeviceRefreshConfigurationResponse` was added + +* `models.GetTopologyResponse` was added + +* `models.ControlPlaneAclTtlMatchCondition` was added + +* `models.ProxyResourceBase` was added + +* `models.StationConnectionMode` was added + +* `models.NetworkDeviceUpdateAdministrativeStateResponse` was added + +* `models.StationConfigurationState` was added + +* `models.SecretArchiveReference` was added + +* `models.CommonPostActionResponseForDeviceROCommands` was added + +* `models.L3UniqueRouteDistinguisherProperties` was added + +* `models.DeviceRole` was added + +* `models.NetworkFabricResyncPasswordsResponse` was added + +* `models.NetworkDeviceUpgradeResponse` was added + +* `models.NetworkBootstrapInterface$Update` was added + +* `models.V4OverV6BgpSessionState` was added + +* `models.RoutePrefixLimitPatchProperties` was added + +* `models.BgpPatchConfiguration` was added + +* `models.PrefixLimitProperties` was added + +* `models.NetworkDeviceRefreshConfigurationResponse` was added + +* `models.GlobalAccessControlListActionPatchProperties` was added + +* `models.ExternalNetworkRouteType` was added + +* `models.BurstSize` was added + +* `models.NetworkFabricRotatePasswordsResponse` was added + +* `models.GlobalAccessControlListActionProperties` was added + +* `models.NetworkDeviceRunRwCommandResponse` was added + +* `models.ViewDeviceConfigurationResponseProperties` was added + +* `models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties` was added + +* `models.BmpConfigurationState` was added + +* `models.ControlPlaneAclMatchConditionPatch` was added + +* `models.NativeIpv4PrefixLimitProperties` was added + +* `models.NetworkMonitors` was added + +* `models.NetworkFabricResyncCertificatesResponse` was added + +* `models.ControlPlaneAclTtlMatchConditionPatch` was added + +* `models.ControlPlaneAclMatchConfigurationProperties` was added + +* `models.StationConnectionProperties` was added + +* `models.NetworkDeviceUpgradeRequest` was added + +* `models.NetworkBootstrapDevice$UpdateStages` was added + +* `models.IdentitySelectorPatch` was added + +* `models.ControlPlaneAclActionPatch` was added + +* `models.NetworkBootstrapDeviceResyncPasswordsResponse` was added + +* `models.CommitBatchState` was added + +* `models.AccessControlListMatchConfigurationPatch` was added + +* `models.BmpExportPolicyPatchProperties` was added + +* `models.ManagementNetworkPatchConfiguration` was added + +* `models.IsolationDomainPatchProperties` was added + +* `models.InternalNetworkBmpPatchProperties` was added + +* `models.ControlPlaneAclMatchCondition` was added + +* `models.PrefixLimitPatchProperties` was added + +* `models.ControlPlaneAclPortMatchConditionPatch` was added + +* `models.AccessControlListPortConditionPatch` was added + +* `models.ExtendedVlan` was added + +* `models.ExportRoutePolicyPatch` was added + +* `models.RuleCondition` was added + +* `models.BmpConfigurationProperties` was added + +* `models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties` was added + +* `models.CommonDynamicMatchConfigurationPatch` was added + +* `models.NniStaticRoutePatchConfiguration` was added + +* `models.ImportRoutePolicyPatch` was added + +* `models.QosProperties` was added + +* `models.CertificateRotationStatus` was added + +* `models.OptionBLayer3PrefixLimitPatchProperties` was added + +* `models.NetworkTapRuleMatchConditionPatch` was added + +* `models.StaticRoutePatchProperties` was added + +* `models.NetworkTapResyncResponse` was added + +* `models.OptionBLayer3ConfigurationPatchProperties` was added + +* `models.NniBmpPatchProperties` was added + +* `models.PortConditionPatch` was added + +* `models.RouteTargetPatchInformation` was added + +* `models.StationConnectionPatchProperties` was added + +* `models.IpGroupPatchProperties` was added + +* `models.QosConfigurationState` was added + +* `models.NetworkBootstrapInterfaces` was added + +* `models.IpMatchConditionPatch` was added + +* `models.CommitConfigurationResponse` was added + +* `models.FabricLockProperties` was added + +* `models.CommitConfigurationRequest` was added + +* `models.DiscardCommitBatchRequest` was added + +* `models.NetworkMonitorPatch` was added + +* `models.VpnOptionAProperties` was added + +* `models.NativeIpv6PrefixLimitProperties` was added + +* `models.RoutePolicyStatementPatchProperties` was added + +* `models.ConnectedSubnetRoutePolicyPatch` was added + +* `models.NeighborAddressBgpAdministrativeStatus` was added + +* `models.NetworkDeviceRwCommandResponseProperties` was added + +* `models.BitRate` was added + +* `models.StaticRouteRoutePolicyPatch` was added + +* `models.StatementConditionPatchProperties` was added + +* `models.NpbStaticRouteConfigurationPatch` was added + +* `models.BmpExportPolicy` was added + +* `models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult` was added + +* `models.NetworkBootstrapDevice` was added + +* `models.AccessControlListMatchConditionPatch` was added + +* `models.AccessControlListActionPatch` was added + +* `models.SecretRotationStatus` was added + +* `models.SecretRotationSummary` was added + +* `models.UniqueRouteDistinguisherProperties` was added + +* `models.ControlPlaneAclIpMatchConditionPatch` was added + +* `models.UniqueRouteDistinguisherConfigurationState` was added + +* `models.ControlPlaneAclMatchConfigurationPatchProperties` was added + +* `models.NetworkTapRuleResyncResponse` was added + +* `models.NNIDerivedUniqueRouteDistinguisherConfigurationState` was added + +* `models.InternalNetworkUpdateBfdAdministrativeStateRequest` was added + +* `models.ControlPlaneAclPatchProperties` was added + +* `models.NetworkMonitor$DefinitionStages` was added + +* `models.NniUpdateBfdAdministrativeStateRequest` was added + +* `models.VpnOptionAPatchProperties` was added + +* `models.PortGroupPatchProperties` was added + +* `models.LastOperationProperties` was added + +* `models.CommitBatchStatusRequest` was added + +* `models.InternalNetworkUpdateBgpAdministrativeStateResponse` was added + +* `models.ManagedServiceIdentityType` was added + +* `models.LockConfigurationState` was added + +* `models.DeviceRwCommand` was added + +* `models.DeviceRoCommand` was added + +* `models.V6OverV4BgpSessionState` was added + +* `models.ActionIpExtendedCommunityPatchProperties` was added + +* `models.MicroBfdState` was added + +* `models.UserAssignedIdentity` was added + +* `models.AclType` was added + +* `models.OperationStatusResult` was added + +* `models.DiscardCommitBatchOperationResponse` was added + +* `models.NniUpdateBfdAdministrativeStateResponseProperties` was added + +* `models.RoutePrefixLimitProperties` was added + +* `models.NativeIpv4PrefixLimitPatchProperties` was added + +* `models.ActionIpCommunityPatchProperties` was added + +* `models.L3ExportRoutePolicyPatch` was added + +* `models.AggregateRoutePatchConfiguration` was added + +* `models.PoliceRateConfigurationProperties` was added + +* `models.NetworkBootstrapInterface$Definition` was added + +* `models.NetworkMonitor$Update` was added + +* `models.NeighborAddressBfdAdministrativeStatus` was added + +* `models.TerminalServerPatchConfiguration` was added + +* `models.ControlPlanAclIpMatchCondition` was added + +* `models.FeatureFlagProperties` was added + +* `models.NniBmpProperties` was added + +* `models.NetworkBootstrapDevice$DefinitionStages` was added + +* `models.ExportRoutePolicyInformationPatch` was added + +* `models.NetworkBootstrapInterface$DefinitionStages` was added + +* `models.InternalNetworkUpdateBgpAdministrativeStateRequest` was added + +* `models.ExternalNetworkUpdateBfdAdministrativeStateResponse` was added + +* `models.ManagedServiceIdentitySelectorType` was added + +* `models.GlobalNetworkTapRuleActionProperties` was added + +* `models.NetworkBootstrapDeviceRebootResponse` was added + +* `models.NeighborAddressPatch` was added + +* `models.CommitConfigurationPolicy` was added + +* `models.ControlPlaneAclPortCondition` was added + +* `models.IdentitySelector` was added + +* `models.Layer3IpPrefixPatchProperties` was added + +* `models.NetworkTapRuleMatchConfigurationPatch` was added + +* `models.NetworkMonitor$UpdateStages` was added + +* `models.CommitBatchDetails` was added + +* `models.ConnectedSubnetPatch` was added + +#### `models.InternalNetwork$Definition` was modified + +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitProperties)` was added +* `withBgpConfiguration(models.BgpConfiguration)` was added +* `withStaticRouteConfiguration(models.StaticRouteConfiguration)` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitProperties)` was added + +#### `models.L3IsolationDomainPatch` was modified + +* `withStaticRouteRoutePolicy(models.StaticRouteRoutePolicyPatch)` was added +* `v6routePrefixLimit()` was added +* `staticRouteRoutePolicy()` was added +* `withV4routePrefixLimit(models.RoutePrefixLimitPatchProperties)` was added +* `exportPolicyConfiguration()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withV6routePrefixLimit(models.RoutePrefixLimitPatchProperties)` was added +* `identity()` was added +* `withExportPolicyConfiguration(models.BmpExportPolicyPatchProperties)` was added +* `v4routePrefixLimit()` was added +* `withAggregateRouteConfiguration(models.AggregateRoutePatchConfiguration)` was added +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicyPatch)` was added + +#### `models.NeighborGroups` was modified + +* `resync(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resync(java.lang.String,java.lang.String)` was added + +#### `models.NetworkInterfacePatch` was modified + +* `withAdditionalDescription(java.lang.String)` was added +* `identity()` was added +* `additionalDescription()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.NetworkPacketBroker$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.TerminalServerConfiguration` was modified + +* `secretRotationStatus()` was added +* `username()` was added +* `password()` was added +* `serialNumber()` was added + +#### `models.NetworkDevice$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withHostName(java.lang.String)` was added +* `withIdentitySelector(models.IdentitySelectorPatch)` was added + +#### `models.VpnConfigurationPatchableProperties` was modified + +* `withOptionBProperties(models.VpnOptionBPatchProperties)` was added +* `withOptionAProperties(models.VpnOptionAPatchProperties)` was added + +#### `models.ExternalNetworkPatch` was modified + +* `withStaticRouteConfiguration(models.ExternalNetworkStaticRoutePatchConfiguration)` was added +* `withImportRoutePolicy(models.ImportRoutePolicyPatch)` was added +* `withOptionBProperties(models.L3OptionBPatchProperties)` was added +* `staticRouteConfiguration()` was added +* `withExportRoutePolicy(models.ExportRoutePolicyPatch)` was added + +#### `models.ActionIpCommunityProperties` was modified + +* `add()` was added + +#### `models.IpExtendedCommunity` was modified + +* `lastOperation()` was added +* `networkFabricId()` was added + +#### `models.NetworkInterface` was modified + +* `lastOperation()` was added +* `configurationState()` was added +* `networkFabricId()` was added +* `additionalDescription()` was added +* `identity()` was added +* `description()` was added + +#### `models.NetworkInterface$Update` was modified + +* `withAdditionalDescription(java.lang.String)` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.InternetGatewayRulePatch` was modified + +* `tags()` was added + +#### `ManagedNetworkFabricManager` was modified + +* `networkMonitors()` was added +* `networkBootstrapInterfaces()` was added +* `networkBootstrapDevices()` was added + +#### `models.ExternalNetworks` was modified + +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.ExternalNetworkUpdateBfdAdministrativeStateRequest)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.ExternalNetworkUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.ExternalNetwork$Update` was modified + +* `withImportRoutePolicy(models.ImportRoutePolicyPatch)` was added +* `withStaticRouteConfiguration(models.ExternalNetworkStaticRoutePatchConfiguration)` was added +* `withOptionBProperties(models.L3OptionBPatchProperties)` was added +* `withExportRoutePolicy(models.ExportRoutePolicyPatch)` was added + +#### `models.L3IsolationDomain` was modified + +* `uniqueRdConfiguration()` was added +* `v6routePrefixLimit()` was added +* `staticRouteRoutePolicy()` was added +* `v4routePrefixLimit()` was added +* `lastOperation()` was added +* `identity()` was added +* `exportPolicyConfiguration()` was added + +#### `models.Layer4Protocol` was modified + +* `SCTP` was added + +#### `models.NetworkFabricController$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.NeighborGroup$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.NeighborAddress` was modified + +* `bgpAdministrativeState()` was added +* `bfdAdministrativeState()` was added + +#### `models.AccessControlList$Update` was modified + +* `withDeviceRole(models.DeviceRole)` was added +* `withGlobalAccessControlListActions(models.GlobalAccessControlListActionPatchProperties)` was added +* `withControlPlaneAclConfigurationForUpdate(java.util.List)` was added +* `withMatchConfigurationsForUpdate(java.util.List)` was added +* `withDynamicMatchConfigurationsForUpdate(java.util.List)` was added +* `withAclType(models.AclType)` was added + +#### `models.InternalNetworks` was modified + +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkUpdateBgpAdministrativeStateRequest)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkUpdateBgpAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkUpdateBfdAdministrativeStateRequest)` was added + +#### `models.ExternalNetworkPropertiesOptionAProperties` was modified + +* `secondaryIpv6Prefix()` was added +* `withPeerAsn(long)` was added +* `secondaryIpv4Prefix()` was added +* `v4OverV6BgpSession()` was added +* `withBmpConfiguration(models.ExternalNetworkBmpProperties)` was added +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitProperties)` was added +* `nativeIpv6PrefixLimit()` was added +* `v6OverV4BgpSession()` was added +* `withVlanId(int)` was added +* `bmpConfiguration()` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `nativeIpv4PrefixLimit()` was added +* `primaryIpv4Prefix()` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitProperties)` was added +* `primaryIpv6Prefix()` was added + +#### `models.AccessControlListMatchCondition` was modified + +* `withProtocolNeighbors(java.util.List)` was added +* `withIcmpConfiguration(models.IcmpConfigurationProperties)` was added +* `protocolNeighbors()` was added +* `icmpConfiguration()` was added + +#### `models.InternalNetwork$Update` was modified + +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitPatchProperties)` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitPatchProperties)` was added +* `withStaticRouteConfiguration(models.StaticRoutePatchConfiguration)` was added +* `withConnectedIPv4SubnetsForUpdate(java.util.List)` was added +* `withConnectedIPv6SubnetsForUpdate(java.util.List)` was added +* `withBgpConfiguration(models.BgpPatchConfiguration)` was added + +#### `models.NetworkDevices` was modified + +* `upgrade(java.lang.String,java.lang.String,models.NetworkDeviceUpgradeRequest)` was added +* `runRoCommand(java.lang.String,java.lang.String,models.DeviceRoCommand)` was added +* `runRoCommand(java.lang.String,java.lang.String,models.DeviceRoCommand,com.azure.core.util.Context)` was added +* `resyncPasswords(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resyncCertificates(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `upgrade(java.lang.String,java.lang.String,models.NetworkDeviceUpgradeRequest,com.azure.core.util.Context)` was added +* `runRwCommand(java.lang.String,java.lang.String,models.DeviceRwCommand,com.azure.core.util.Context)` was added +* `resyncCertificates(java.lang.String,java.lang.String)` was added +* `runRwCommand(java.lang.String,java.lang.String,models.DeviceRwCommand)` was added +* `resyncPasswords(java.lang.String,java.lang.String)` was added + +#### `models.NetworkTapRule$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withPollingIntervalInSeconds(java.lang.Integer)` was added +* `withIdentitySelector(models.IdentitySelector)` was added +* `withGlobalNetworkTapRuleActions(models.GlobalNetworkTapRuleActionProperties)` was added + +#### `models.AdministrativeState` was modified + +* `UNDER_MAINTENANCE` was added +* `ENABLED_DEGRADED` was added + +#### `models.NetworkTapRule$Update` was modified + +* `withDynamicMatchConfigurationsForUpdate(java.util.List)` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withIdentitySelector(models.IdentitySelectorPatch)` was added +* `withGlobalNetworkTapRuleActions(models.GlobalNetworkTapRuleActionPatchProperties)` was added +* `withMatchConfigurationsForUpdate(java.util.List)` was added + +#### `models.L2IsolationDomain$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withExtendedVlan(models.ExtendedVlan)` was added +* `withNetworkToNetworkInterconnectId(java.lang.String)` was added + +#### `models.ConfigurationState` was modified + +* `PENDING_ADMINISTRATIVE_UPDATE` was added + +#### `models.InternetGateway$Definition` was modified + +* `withInternetGatewayType(models.GatewayType)` was added + +#### `models.RuleProperties` was modified + +* `condition()` was added +* `withCondition(models.RuleCondition)` was added +* `withDestinationAddressList(java.util.List)` was added +* `headerAddressList()` was added +* `withSourceAddressList(java.util.List)` was added +* `sourceAddressList()` was added +* `destinationAddressList()` was added +* `withHeaderAddressList(java.util.List)` was added + +#### `models.DeviceAdministrativeState` was modified + +* `DISABLE` was added +* `UNDER_MAINTENANCE` was added +* `UNGRACEFUL_RMA` was added +* `UNGRACEFUL_QUARANTINE` was added +* `ENABLE` was added + +#### `models.InternalNetworkPatch` was modified + +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitPatchProperties)` was added +* `withStaticRouteConfiguration(models.StaticRoutePatchConfiguration)` was added +* `withBgpConfiguration(models.BgpPatchConfiguration)` was added +* `nativeIpv4PrefixLimit()` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitPatchProperties)` was added +* `nativeIpv6PrefixLimit()` was added + +#### `models.AccessControlListPatch` was modified + +* `controlPlaneAclConfiguration()` was added +* `withDeviceRole(models.DeviceRole)` was added +* `aclType()` was added +* `globalAccessControlListActions()` was added +* `withAclType(models.AclType)` was added +* `deviceRole()` was added +* `withGlobalAccessControlListActions(models.GlobalAccessControlListActionPatchProperties)` was added +* `withControlPlaneAclConfiguration(java.util.List)` was added + +#### `models.IpPrefix` was modified + +* `lastOperation()` was added +* `networkFabricId()` was added + +#### `models.InternetGateway` was modified + +* `lastOperation()` was added +* `internetGatewayType()` was added + +#### `models.NetworkFabricController$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.AclActionType` was modified + +* `POLICE_RATE` was added +* `REMARK` was added + +#### `models.InternalNetwork` was modified + +* `nativeIpv4PrefixLimit()` was added +* `nativeIpv6PrefixLimit()` was added +* `updateBfdAdministrativeState(models.InternalNetworkUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBgpAdministrativeState(models.InternalNetworkUpdateBgpAdministrativeStateRequest)` was added +* `networkFabricId()` was added +* `updateBfdAdministrativeState(models.InternalNetworkUpdateBfdAdministrativeStateRequest)` was added +* `lastOperation()` was added +* `updateBgpAdministrativeState(models.InternalNetworkUpdateBgpAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.NetworkRack` was modified + +* `configurationState()` was added +* `lastOperation()` was added + +#### `models.NetworkDevice$Definition` was modified + +* `withIdentitySelector(models.IdentitySelector)` was added +* `withHostName(java.lang.String)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.NetworkFabric$Definition` was modified + +* `withTrustedIpPrefixes(java.util.List)` was added +* `withQosConfiguration(models.QosProperties)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withFeatureFlags(java.util.List)` was added +* `withControlPlaneAcls(java.util.List)` was added +* `withAuthorizedTransceiver(models.AuthorizedTransceiverProperties)` was added +* `withStorageAccountConfiguration(models.StorageAccountConfiguration)` was added +* `withHardwareAlertThreshold(java.lang.Integer)` was added +* `withStorageArrayCount(java.lang.Integer)` was added +* `withUniqueRdConfiguration(models.UniqueRouteDistinguisherProperties)` was added + +#### `models.NetworkFabrics` was modified + +* `rotateCertificates(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `rotatePasswords(java.lang.String,java.lang.String)` was added +* `resyncPasswords(java.lang.String,java.lang.String)` was added +* `armConfigurationDiff(java.lang.String,java.lang.String)` was added +* `commitBatchStatus(java.lang.String,java.lang.String,models.CommitBatchStatusRequest,com.azure.core.util.Context)` was added +* `lockFabric(java.lang.String,java.lang.String,models.NetworkFabricLockRequest)` was added +* `rotateCertificates(java.lang.String,java.lang.String)` was added +* `discardCommitBatch(java.lang.String,java.lang.String,models.DiscardCommitBatchRequest)` was added +* `resyncCertificates(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `commitBatchStatus(java.lang.String,java.lang.String,models.CommitBatchStatusRequest)` was added +* `lockFabric(java.lang.String,java.lang.String,models.NetworkFabricLockRequest,com.azure.core.util.Context)` was added +* `armConfigurationDiff(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `rotatePasswords(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `viewDeviceConfiguration(java.lang.String,java.lang.String)` was added +* `resyncPasswords(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `viewDeviceConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resyncCertificates(java.lang.String,java.lang.String)` was added +* `commitConfiguration(java.lang.String,java.lang.String,models.CommitConfigurationRequest,com.azure.core.util.Context)` was added +* `discardCommitBatch(java.lang.String,java.lang.String,models.DiscardCommitBatchRequest,com.azure.core.util.Context)` was added + +#### `models.NetworkDevice` was modified + +* `identitySelector()` was added +* `upgrade(models.NetworkDeviceUpgradeRequest,com.azure.core.util.Context)` was added +* `resyncPasswords()` was added +* `rwDeviceConfig()` was added +* `resyncCertificates()` was added +* `resyncCertificates(com.azure.core.util.Context)` was added +* `lastOperation()` was added +* `secretRotationStatus()` was added +* `runRoCommand(models.DeviceRoCommand)` was added +* `identity()` was added +* `certificateRotationStatus()` was added +* `upgrade(models.NetworkDeviceUpgradeRequest)` was added +* `resyncPasswords(com.azure.core.util.Context)` was added +* `runRwCommand(models.DeviceRwCommand)` was added +* `networkFabricId()` was added +* `hostName()` was added +* `runRwCommand(models.DeviceRwCommand,com.azure.core.util.Context)` was added +* `runRoCommand(models.DeviceRoCommand,com.azure.core.util.Context)` was added + +#### `models.NetworkFabricController` was modified + +* `lastOperation()` was added +* `identity()` was added + +#### `models.ActionIpExtendedCommunityProperties` was modified + +* `add()` was added + +#### `models.NetworkPacketBrokerPatch` was modified + +* `identity()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.NetworkInterface$Definition` was modified + +* `withAdditionalDescription(java.lang.String)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.NetworkPacketBroker$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.VpnConfigurationProperties` was modified + +* `withOptionBProperties(models.VpnOptionBProperties)` was added +* `withOptionAProperties(models.VpnOptionAProperties)` was added + +#### `models.AccessControlList` was modified + +* `controlPlaneAclConfiguration()` was added +* `aclType()` was added +* `globalAccessControlListActions()` was added +* `lastOperation()` was added +* `deviceRole()` was added +* `networkFabricIds()` was added + +#### `models.NetworkFabricControllerPatch` was modified + +* `identity()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.StaticRouteConfiguration` was modified + +* `extension()` was added +* `withExtension(models.Extension)` was added + +#### `models.NetworkTap$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.NetworkToNetworkInterconnect` was modified + +* `microBfdState()` was added +* `lastOperation()` was added +* `conditionalDefaultRouteConfiguration()` was added +* `updateBfdAdministrativeState(models.NniUpdateBfdAdministrativeStateRequest)` was added +* `staticRouteConfiguration()` was added +* `updateBfdAdministrativeState(models.NniUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.NetworkTapRule` was modified + +* `networkFabricIds()` was added +* `identitySelector()` was added +* `identity()` was added +* `networkTapIds()` was added +* `lastOperation()` was added +* `globalNetworkTapRuleActions()` was added + +#### `models.NetworkToNetworkInterconnectPatch` was modified + +* `withStaticRouteConfiguration(models.NniStaticRoutePatchConfiguration)` was added +* `withExportRoutePolicy(models.ExportRoutePolicyInformationPatch)` was added +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfigurationPatch)` was added +* `withImportRoutePolicy(models.ImportRoutePolicyInformationPatch)` was added +* `withLayer2Configuration(models.Layer2ConfigurationPatch)` was added +* `staticRouteConfiguration()` was added +* `withMicroBfdState(models.MicroBfdState)` was added +* `microBfdState()` was added +* `withOptionBLayer3Configuration(models.OptionBLayer3ConfigurationPatchProperties)` was added + +#### `models.L3IsolationDomain$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withExportPolicyConfiguration(models.BmpExportPolicyPatchProperties)` was added +* `withV4routePrefixLimit(models.RoutePrefixLimitPatchProperties)` was added +* `withStaticRouteRoutePolicy(models.StaticRouteRoutePolicyPatch)` was added +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicyPatch)` was added +* `withV6routePrefixLimit(models.RoutePrefixLimitPatchProperties)` was added +* `withAggregateRouteConfiguration(models.AggregateRoutePatchConfiguration)` was added + +#### `models.IpCommunity` was modified + +* `lastOperation()` was added +* `networkFabricId()` was added + +#### `models.RoutePolicy` was modified + +* `lastOperation()` was added + +#### `models.NetworkToNetworkInterconnect$Definition` was modified + +* `withMicroBfdState(models.MicroBfdState)` was added +* `withOptionBLayer3Configuration(models.OptionBLayer3Configuration)` was added +* `withConditionalDefaultRouteConfiguration(models.ConditionalDefaultRouteProperties)` was added +* `withStaticRouteConfiguration(models.NniStaticRouteConfiguration)` was added + +#### `models.NetworkTap$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.BgpConfiguration` was modified + +* `v4OverV6BgpSession()` was added +* `withPeerAsn(long)` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `bmpConfiguration()` was added +* `v6OverV4BgpSession()` was added +* `withBmpConfiguration(models.InternalNetworkBmpProperties)` was added + +#### `models.NetworkFabricPatch` was modified + +* `featureFlags()` was added +* `hardwareAlertThreshold()` was added +* `withHardwareAlertThreshold(java.lang.Integer)` was added +* `withAuthorizedTransceiver(models.AuthorizedTransceiverPatchProperties)` was added +* `identity()` was added +* `storageAccountConfiguration()` was added +* `withTerminalServerConfiguration(models.TerminalServerPatchConfiguration)` was added +* `withUniqueRdConfiguration(models.UniqueRouteDistinguisherPatchProperties)` was added +* `trustedIpPrefixes()` was added +* `authorizedTransceiver()` was added +* `withQosConfiguration(models.QosPatchProperties)` was added +* `uniqueRdConfiguration()` was added +* `withManagementNetworkConfiguration(models.ManagementNetworkPatchConfiguration)` was added +* `withControlPlaneAcls(java.util.List)` was added +* `qosConfiguration()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withStorageAccountConfiguration(models.StorageAccountPatchConfiguration)` was added +* `controlPlaneAcls()` was added +* `withTrustedIpPrefixes(java.util.List)` was added +* `withFeatureFlags(java.util.List)` was added + +#### `models.NeighborGroup$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withDestination(models.NeighborGroupDestinationPatch)` was added + +#### `models.AccessControlList$Definition` was modified + +* `withAclType(models.AclType)` was added +* `withControlPlaneAclConfiguration(java.util.List)` was added +* `withGlobalAccessControlListActions(models.GlobalAccessControlListActionProperties)` was added +* `withDeviceRole(models.DeviceRole)` was added + +#### `models.L3IsolationDomain$Definition` was modified + +* `withUniqueRdConfiguration(models.L3UniqueRouteDistinguisherProperties)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withV6routePrefixLimit(models.RoutePrefixLimitProperties)` was added +* `withExportPolicyConfiguration(models.BmpExportPolicyProperties)` was added +* `withV4routePrefixLimit(models.RoutePrefixLimitProperties)` was added +* `withStaticRouteRoutePolicy(models.StaticRouteRoutePolicy)` was added + +#### `models.L2IsolationDomain$Update` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withExtendedVlan(models.ExtendedVlan)` was added +* `withNetworkToNetworkInterconnectId(java.lang.String)` was added + +#### `models.L2IsolationDomain` was modified + +* `identity()` was added +* `extendedVlan()` was added +* `lastOperation()` was added +* `networkToNetworkInterconnectId()` was added + +#### `models.NetworkFabric` was modified + +* `commitConfiguration(models.CommitConfigurationRequest,com.azure.core.util.Context)` was added +* `lockFabric(models.NetworkFabricLockRequest,com.azure.core.util.Context)` was added +* `qosConfiguration()` was added +* `storageAccountConfiguration()` was added +* `viewDeviceConfiguration()` was added +* `featureFlags()` was added +* `identity()` was added +* `trustedIpPrefixes()` was added +* `lockFabric(models.NetworkFabricLockRequest)` was added +* `uniqueRdConfiguration()` was added +* `discardCommitBatch(models.DiscardCommitBatchRequest,com.azure.core.util.Context)` was added +* `rotatePasswords(com.azure.core.util.Context)` was added +* `armConfigurationDiff(com.azure.core.util.Context)` was added +* `activeCommitBatches()` was added +* `fabricLocks()` was added +* `resyncPasswords(com.azure.core.util.Context)` was added +* `rotateCertificates()` was added +* `authorizedTransceiver()` was added +* `rotatePasswords()` was added +* `viewDeviceConfiguration(com.azure.core.util.Context)` was added +* `hardwareAlertThreshold()` was added +* `resyncPasswords()` was added +* `storageArrayCount()` was added +* `discardCommitBatch(models.DiscardCommitBatchRequest)` was added +* `resyncCertificates(com.azure.core.util.Context)` was added +* `rotateCertificates(com.azure.core.util.Context)` was added +* `resyncCertificates()` was added +* `secretRotationSummary()` was added +* `commitBatchStatus(models.CommitBatchStatusRequest,com.azure.core.util.Context)` was added +* `commitBatchStatus(models.CommitBatchStatusRequest)` was added +* `armConfigurationDiff()` was added +* `lastOperation()` was added +* `controlPlaneAcls()` was added + +#### `models.SourceDestinationType` was modified + +* `BIDIRECTIONAL` was added + +#### `models.ExternalNetwork` was modified + +* `networkFabricId()` was added +* `updateBfdAdministrativeState(models.ExternalNetworkUpdateBfdAdministrativeStateRequest)` was added +* `staticRouteConfiguration()` was added +* `lastOperation()` was added +* `updateBfdAdministrativeState(models.ExternalNetworkUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.NetworkFabric$Update` was modified + +* `withTerminalServerConfiguration(models.TerminalServerPatchConfiguration)` was added +* `withQosConfiguration(models.QosPatchProperties)` was added +* `withStorageAccountConfiguration(models.StorageAccountPatchConfiguration)` was added +* `withTrustedIpPrefixes(java.util.List)` was added +* `withHardwareAlertThreshold(java.lang.Integer)` was added +* `withUniqueRdConfiguration(models.UniqueRouteDistinguisherPatchProperties)` was added +* `withFeatureFlags(java.util.List)` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withControlPlaneAcls(java.util.List)` was added +* `withAuthorizedTransceiver(models.AuthorizedTransceiverPatchProperties)` was added +* `withManagementNetworkConfiguration(models.ManagementNetworkPatchConfiguration)` was added + +#### `models.NetworkToNetworkInterconnect$Update` was modified + +* `withOptionBLayer3Configuration(models.OptionBLayer3ConfigurationPatchProperties)` was added +* `withStaticRouteConfiguration(models.NniStaticRoutePatchConfiguration)` was added +* `withExportRoutePolicy(models.ExportRoutePolicyInformationPatch)` was added +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfigurationPatch)` was added +* `withMicroBfdState(models.MicroBfdState)` was added +* `withImportRoutePolicy(models.ImportRoutePolicyInformationPatch)` was added +* `withLayer2Configuration(models.Layer2ConfigurationPatch)` was added + +#### `models.NetworkDevicePatchParameters` was modified + +* `withIdentitySelector(models.IdentitySelectorPatch)` was added +* `withHostName(java.lang.String)` was added +* `hostName()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `identity()` was added +* `identitySelector()` was added + +#### `models.NetworkTap` was modified + +* `networkFabricIds()` was added +* `identity()` was added +* `lastOperation()` was added + +#### `models.NetworkToNetworkInterconnects` was modified + +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.NniUpdateBfdAdministrativeStateRequest)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.NniUpdateBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.NeighborGroup` was modified + +* `resync(com.azure.core.util.Context)` was added +* `identity()` was added +* `networkFabricIds()` was added +* `configurationState()` was added +* `lastOperation()` was added +* `resync()` was added + +#### `models.RoutePolicy$Update` was modified + +* `withStatementsForUpdate(java.util.List)` was added + +#### `models.ExternalNetwork$Definition` was modified + +* `withStaticRouteConfiguration(models.ExternalNetworkStaticRouteConfiguration)` was added + +#### `models.EnableDisableState` was modified + +* `UNDER_MAINTENANCE` was added + +#### `models.NeighborGroupPatch` was modified + +* `identity()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withDestination(models.NeighborGroupDestinationPatch)` was added + +#### `models.L2IsolationDomainPatch` was modified + +* `networkToNetworkInterconnectId()` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `extendedVlan()` was added +* `identity()` was added +* `withNetworkToNetworkInterconnectId(java.lang.String)` was added +* `withExtendedVlan(models.ExtendedVlan)` was added + +#### `models.InternetGatewayRule` was modified + +* `lastOperation()` was added + +#### `models.NetworkPacketBroker` was modified + +* `identity()` was added +* `configurationState()` was added +* `lastOperation()` was added + +#### `models.ExternalNetworkPatchPropertiesOptionAProperties` was modified + +* `bmpConfiguration()` was added +* `v6OverV4BgpSession()` was added +* `secondaryIpv6Prefix()` was added +* `withBmpConfiguration(models.ExternalNetworkBmpPatchProperties)` was added +* `primaryIpv4Prefix()` was added +* `nativeIpv6PrefixLimit()` was added +* `primaryIpv6Prefix()` was added +* `secondaryIpv4Prefix()` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitPatchProperties)` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `v4OverV6BgpSession()` was added +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitPatchProperties)` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `nativeIpv4PrefixLimit()` was added +* `withBfdConfiguration(models.BfdPatchConfiguration)` was added + +#### `models.AccessControlListAction` was modified + +* `remarkComment()` was added +* `withRemarkComment(java.lang.String)` was added +* `withPoliceRateConfiguration(models.PoliceRateConfigurationProperties)` was added +* `policeRateConfiguration()` was added + +#### `models.NetworkTapRulePatch` was modified + +* `globalNetworkTapRuleActions()` was added +* `withGlobalNetworkTapRuleActions(models.GlobalNetworkTapRuleActionPatchProperties)` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withIdentitySelector(models.IdentitySelectorPatch)` was added +* `identity()` was added +* `identitySelector()` was added + +#### `models.NetworkTapPatch` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `identity()` was added + +#### `models.StatementConditionProperties` was modified + +* `ipCommunityIds()` was added + +#### `models.PortType` was modified + +* `BIDIRECTIONAL` was added + +#### `models.OptionBLayer3Configuration` was modified -### Other Changes +* `peLoopbackIpAddress()` was added +* `bmpConfiguration()` was added +* `withPeLoopbackIpAddress(java.util.List)` was added +* `withPrefixLimits(java.util.List)` was added +* `prefixLimits()` was added +* `withVlanId(int)` was added +* `withPeerAsn(long)` was added +* `withBmpConfiguration(models.NniBmpProperties)` was added ## 1.1.0 (2024-12-11) diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md index d08de63fef32..a4cd6ea902b2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Managed Network Fabric client library for Java. -This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package api-version 2025-07-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-managednetworkfabric - 1.2.0-beta.1 + 1.2.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ManagedNetworkFabricManager manager = ManagedNetworkFabricManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -142,5 +142,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md index a19f857fd4f8..e9c843fa7c8b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md @@ -21,6 +21,7 @@ - [ListByL3IsolationDomain](#externalnetworks_listbyl3isolationdomain) - [Update](#externalnetworks_update) - [UpdateAdministrativeState](#externalnetworks_updateadministrativestate) +- [UpdateBfdAdministrativeState](#externalnetworks_updatebfdadministrativestate) - [UpdateStaticRouteBfdAdministrativeState](#externalnetworks_updatestaticroutebfdadministrativestate) ## InternalNetworks @@ -31,6 +32,7 @@ - [ListByL3IsolationDomain](#internalnetworks_listbyl3isolationdomain) - [Update](#internalnetworks_update) - [UpdateAdministrativeState](#internalnetworks_updateadministrativestate) +- [UpdateBfdAdministrativeState](#internalnetworks_updatebfdadministrativestate) - [UpdateBgpAdministrativeState](#internalnetworks_updatebgpadministrativestate) - [UpdateStaticRouteBfdAdministrativeState](#internalnetworks_updatestaticroutebfdadministrativestate) @@ -110,8 +112,32 @@ - [GetByResourceGroup](#neighborgroups_getbyresourcegroup) - [List](#neighborgroups_list) - [ListByResourceGroup](#neighborgroups_listbyresourcegroup) +- [Resync](#neighborgroups_resync) - [Update](#neighborgroups_update) +## NetworkBootstrapDevices + +- [Create](#networkbootstrapdevices_create) +- [Delete](#networkbootstrapdevices_delete) +- [GetByResourceGroup](#networkbootstrapdevices_getbyresourcegroup) +- [List](#networkbootstrapdevices_list) +- [ListByResourceGroup](#networkbootstrapdevices_listbyresourcegroup) +- [Reboot](#networkbootstrapdevices_reboot) +- [RefreshConfiguration](#networkbootstrapdevices_refreshconfiguration) +- [ResyncPasswords](#networkbootstrapdevices_resyncpasswords) +- [Update](#networkbootstrapdevices_update) +- [UpdateAdministrativeState](#networkbootstrapdevices_updateadministrativestate) +- [Upgrade](#networkbootstrapdevices_upgrade) + +## NetworkBootstrapInterfaces + +- [Create](#networkbootstrapinterfaces_create) +- [Delete](#networkbootstrapinterfaces_delete) +- [Get](#networkbootstrapinterfaces_get) +- [ListByNetworkBootstrapDevice](#networkbootstrapinterfaces_listbynetworkbootstrapdevice) +- [Update](#networkbootstrapinterfaces_update) +- [UpdateAdministrativeState](#networkbootstrapinterfaces_updateadministrativestate) + ## NetworkDeviceSkus - [Get](#networkdeviceskus_get) @@ -126,6 +152,10 @@ - [ListByResourceGroup](#networkdevices_listbyresourcegroup) - [Reboot](#networkdevices_reboot) - [RefreshConfiguration](#networkdevices_refreshconfiguration) +- [ResyncCertificates](#networkdevices_resynccertificates) +- [ResyncPasswords](#networkdevices_resyncpasswords) +- [RunRoCommand](#networkdevices_runrocommand) +- [RunRwCommand](#networkdevices_runrwcommand) - [Update](#networkdevices_update) - [UpdateAdministrativeState](#networkdevices_updateadministrativestate) - [Upgrade](#networkdevices_upgrade) @@ -146,21 +176,30 @@ ## NetworkFabrics +- [ArmConfigurationDiff](#networkfabrics_armconfigurationdiff) +- [CommitBatchStatus](#networkfabrics_commitbatchstatus) - [CommitConfiguration](#networkfabrics_commitconfiguration) - [Create](#networkfabrics_create) - [Delete](#networkfabrics_delete) - [Deprovision](#networkfabrics_deprovision) +- [DiscardCommitBatch](#networkfabrics_discardcommitbatch) - [GetByResourceGroup](#networkfabrics_getbyresourcegroup) - [GetTopology](#networkfabrics_gettopology) - [List](#networkfabrics_list) - [ListByResourceGroup](#networkfabrics_listbyresourcegroup) +- [LockFabric](#networkfabrics_lockfabric) - [Provision](#networkfabrics_provision) - [RefreshConfiguration](#networkfabrics_refreshconfiguration) +- [ResyncCertificates](#networkfabrics_resynccertificates) +- [ResyncPasswords](#networkfabrics_resyncpasswords) +- [RotateCertificates](#networkfabrics_rotatecertificates) +- [RotatePasswords](#networkfabrics_rotatepasswords) - [Update](#networkfabrics_update) - [UpdateInfraManagementBfdConfiguration](#networkfabrics_updateinframanagementbfdconfiguration) - [UpdateWorkloadManagementBfdConfiguration](#networkfabrics_updateworkloadmanagementbfdconfiguration) - [Upgrade](#networkfabrics_upgrade) - [ValidateConfiguration](#networkfabrics_validateconfiguration) +- [ViewDeviceConfiguration](#networkfabrics_viewdeviceconfiguration) ## NetworkInterfaces @@ -171,6 +210,16 @@ - [Update](#networkinterfaces_update) - [UpdateAdministrativeState](#networkinterfaces_updateadministrativestate) +## NetworkMonitors + +- [Create](#networkmonitors_create) +- [Delete](#networkmonitors_delete) +- [GetByResourceGroup](#networkmonitors_getbyresourcegroup) +- [List](#networkmonitors_list) +- [ListByResourceGroup](#networkmonitors_listbyresourcegroup) +- [Update](#networkmonitors_update) +- [UpdateAdministrativeState](#networkmonitors_updateadministrativestate) + ## NetworkPacketBrokers - [Create](#networkpacketbrokers_create) @@ -220,6 +269,7 @@ - [ListByNetworkFabric](#networktonetworkinterconnects_listbynetworkfabric) - [Update](#networktonetworkinterconnects_update) - [UpdateAdministrativeState](#networktonetworkinterconnects_updateadministrativestate) +- [UpdateBfdAdministrativeState](#networktonetworkinterconnects_updatebfdadministrativestate) - [UpdateNpbStaticRouteBfdAdministrativeState](#networktonetworkinterconnects_updatenpbstaticroutebfdadministrativestate) ## Operations @@ -245,13 +295,34 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMa import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -267,9 +338,7 @@ import java.util.Map; */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Create.json */ /** * Sample code: AccessControlLists_Create_MaximumSet_Gen. @@ -282,36 +351,42 @@ public final class AccessControlListsCreateSamples { .define("example-acl") .withRegion("eastUs") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withConfigurationType(ConfigurationType.FILE) + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withAclsUrl("https://ACL-Storage-URL") .withDefaultAction(CommunityActionTypes.PERMIT) .withMatchConfigurations( - Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") - .withSequenceNumber(123L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) - .withInnerVlans(Arrays.asList("30")) - .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) - .withIpGroupNames(Arrays.asList("example-ipGroup"))) - .withEtherTypes(Arrays.asList("0x1")) - .withFragments(Arrays.asList("0xff00-0xffff")) - .withIpLengths(Arrays.asList("4094-9214")) - .withTtlValues(Arrays.asList("23")) - .withDscpMarkings(Arrays.asList("32")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("1-20")) - .withPortGroupNames(Arrays.asList("example-portGroup")) - .withFlags(Arrays.asList("established"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("example-counter"))))) + Arrays.asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) @@ -320,7 +395,54 @@ public final class AccessControlListsCreateSamples { .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .create(); + } + + /* + * x-ms-original-file: 2025-07-15/AccessControlLists_Create_ControlPlaneAcl.json + */ + /** + * Sample code: AccessControlLists_Create_MaximumSet_Gen - generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsCreateMaximumSetGenGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.accessControlLists() + .define("example-acl") + .withRegion("eastus") + .withExistingResourceGroup("example-resource-group") + .withConfigurationType(ConfigurationType.INLINE) + .withTags(mapOf("key5032", "fakeTokenPlaceholder")) .withAnnotation("annotation") + .withAclsUrl("https://microsoft.com/a") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withControlPlaneAclConfiguration( + Arrays.asList(new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("example-match-config") + .withSequenceNumber(3779271459L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("tcp") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("10.0.0.0/24") + .withDestinationIpPrefix("10.0.0.0/24")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("1") + .withTtlMatchType(ControlPlaneAclTtlMatchType.EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("100")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("200")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS))) + .withFlags(Arrays.asList("established")) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("icmp")))) + .withAction(new ControlPlaneAclAction().withType(ControlPlaneAclActionType.fromString("Drop")) + .withRemarkComment("remark")))))) .create(); } @@ -346,9 +468,7 @@ public final class AccessControlListsCreateSamples { */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Delete.json */ /** * Sample code: AccessControlLists_Delete_MaximumSet_Gen. @@ -370,9 +490,7 @@ public final class AccessControlListsDeleteSamples { */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Get.json */ /** * Sample code: AccessControlLists_Get_MaximumSet_Gen. @@ -395,9 +513,7 @@ public final class AccessControlListsGetByResourceGroupSamples { */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ListBySubscription.json */ /** * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. @@ -419,9 +535,7 @@ public final class AccessControlListsListSamples { */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ListByResourceGroup.json */ /** * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. @@ -443,9 +557,7 @@ public final class AccessControlListsListByResourceGroupSamples { */ public final class AccessControlListsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Resync.json */ /** * Sample code: AccessControlLists_Resync_MaximumSet_Gen. @@ -463,24 +575,34 @@ public final class AccessControlListsResyncSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -490,9 +612,7 @@ import java.util.Map; */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Update.json */ /** * Sample code: AccessControlLists_Update_MaximumSet_Gen. @@ -505,45 +625,53 @@ public final class AccessControlListsUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAnnotation("annotation") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withConfigurationType(ConfigurationType.FILE) .withAclsUrl("https://microsoft.com/a") .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations( - Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") - .withSequenceNumber(123L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) - .withInnerVlans(Arrays.asList("30")) - .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) - .withIpGroupNames(Arrays.asList("example-ipGroup"))) - .withEtherTypes(Arrays.asList("0x1")) - .withFragments(Arrays.asList("0xff00-0xffff")) - .withIpLengths(Arrays.asList("4094-9214")) - .withTtlValues(Arrays.asList("23")) - .withDscpMarkings(Arrays.asList("32")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("1-20")) - .withPortGroupNames(Arrays.asList("example-portGroup")) - .withFlags(Arrays.asList("established"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("example-counter"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") + .withMatchConfigurationsForUpdate( + Arrays.asList(new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.POLICE_RATE) + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .withDynamicMatchConfigurationsForUpdate(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) - .withVlanGroups(Arrays - .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + new PortGroupPatchProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withAnnotation("annotation") .apply(); } @@ -573,9 +701,7 @@ import java.util.Arrays; */ public final class AccessControlListsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_UpdateAdministrativeState.json */ /** * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. @@ -600,9 +726,7 @@ public final class AccessControlListsUpdateAdministrativeStateSamples { */ public final class AccessControlListsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ValidateConfiguration.json */ /** * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. @@ -621,12 +745,21 @@ public final class AccessControlListsValidateConfigurationSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -634,9 +767,7 @@ import java.util.Arrays; */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Create.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. @@ -646,15 +777,26 @@ public final class ExternalNetworksCreateSamples { public static void externalNetworksCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .define("example-externalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .define("example-ext") + .withExistingL3IsolationDomain("example-rg", "example-externalnetwork") .withPeeringOption(PeeringOption.OPTIONA) + .withAnnotation("annotation") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) .withExportRouteTargets(Arrays.asList("65046:10039")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") .withSecondaryIpv4Prefix("10.1.1.4/30") @@ -662,26 +804,25 @@ public final class ExternalNetworksCreateSamples { .withMtu(1500) .withVlanId(1001) .withPeerAsn(65047L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) .withEgressAclId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) - .withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withAnnotation("annotation") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .create(); } } @@ -695,9 +836,7 @@ public final class ExternalNetworksCreateSamples { */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Delete.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. @@ -707,7 +846,7 @@ public final class ExternalNetworksDeleteSamples { public static void externalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } ``` @@ -720,9 +859,7 @@ public final class ExternalNetworksDeleteSamples { */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Get.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. @@ -732,7 +869,7 @@ public final class ExternalNetworksGetSamples { public static void externalNetworksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } ``` @@ -745,9 +882,7 @@ public final class ExternalNetworksGetSamples { */ public final class ExternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. @@ -757,7 +892,7 @@ public final class ExternalNetworksListByL3IsolationDomainSamples { public static void externalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-externalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -765,14 +900,23 @@ public final class ExternalNetworksListByL3IsolationDomainSamples { ### ExternalNetworks_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -780,9 +924,7 @@ import java.util.Arrays; */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Update.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. @@ -792,17 +934,28 @@ public final class ExternalNetworksUpdateSamples { public static void externalNetworksUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { ExternalNetwork resource = manager.externalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-externalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE) .getValue(); resource.update() + .withAnnotation("annotation1") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy(new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withOptionBProperties(new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10039")) .withExportRouteTargets(Arrays.asList("65046:10039")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withRouteTargets( + new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") @@ -811,24 +964,25 @@ public final class ExternalNetworksUpdateSamples { .withMtu(1500) .withVlanId(1001) .withPeerAsn(65047L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withEgressAclId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withAnnotation("annotation1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(13).withThreshold(24).withIdleTimeExpiry(8)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(13).withThreshold(24).withIdleTimeExpiry(8))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1/14").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .apply(); } } @@ -846,9 +1000,7 @@ import java.util.Arrays; */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. @@ -858,13 +1010,43 @@ public final class ExternalNetworksUpdateAdministrativeStateSamples { public static void externalNetworksUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", + .updateAdministrativeState("example-rg", "example-externalnetwork", "example-ext", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` +### ExternalNetworks_UpdateBfdAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; + +/** + * Samples for ExternalNetworks UpdateBfdAdministrativeState. + */ +public final class ExternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: ExternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void externalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.externalNetworks() + .updateBfdAdministrativeState("example-rg", "example-externalnetwork", "example-ext", + new ExternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), + com.azure.core.util.Context.NONE); + } +} +``` + ### ExternalNetworks_UpdateStaticRouteBfdAdministrativeState ```java @@ -877,16 +1059,14 @@ import java.util.Arrays; */ public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState.json */ /** - * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void externalNetworksUpdateStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", @@ -901,16 +1081,25 @@ public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSample ```java import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -918,9 +1107,7 @@ import java.util.Arrays; */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Create.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. @@ -931,34 +1118,15 @@ public final class InternalNetworksCreateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() .define("example-internalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .withExistingL3IsolationDomain("example-rg", "example-l3isd") .withVlanId(755) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("annotation") - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(10) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(61234L) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) - .withExtension(Extension.NO_EXTENSION)) + .withAnnotation("annotation") + .withExtension(Extension.NO_EXTENSION) .withMtu(1500) .withConnectedIPv4Subnets( Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) .withConnectedIPv6Subnets( Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportIpv6RoutePolicyId( @@ -972,8 +1140,34 @@ public final class InternalNetworksCreateSamples { .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NO_EXTENSION) - .withAnnotation("annotation") + .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::"))) + .withBmpConfiguration( + new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.1")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) .create(); } } @@ -987,9 +1181,7 @@ public final class InternalNetworksCreateSamples { */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Delete.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. @@ -999,7 +1191,7 @@ public final class InternalNetworksDeleteSamples { public static void internalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1012,9 +1204,7 @@ public final class InternalNetworksDeleteSamples { */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Get.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. @@ -1024,7 +1214,7 @@ public final class InternalNetworksGetSamples { public static void internalNetworksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } @@ -1038,9 +1228,7 @@ public final class InternalNetworksGetSamples { */ public final class InternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. @@ -1050,7 +1238,7 @@ public final class InternalNetworksListByL3IsolationDomainSamples { public static void internalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-l3isd", com.azure.core.util.Context.NONE); } } ``` @@ -1059,17 +1247,24 @@ public final class InternalNetworksListByL3IsolationDomainSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -1077,9 +1272,7 @@ import java.util.Arrays; */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Update.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. @@ -1089,35 +1282,15 @@ public final class InternalNetworksUpdateSamples { public static void internalNetworksUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { InternalNetwork resource = manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(10) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(61234L) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.20.20.20/25").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .withAnnotation("annotation") .withMtu(1500) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withConnectedIPv4SubnetsForUpdate( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6SubnetsForUpdate( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportIpv6RoutePolicyId( @@ -1131,7 +1304,31 @@ public final class InternalNetworksUpdateSamples { .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withAnnotation("annotation") + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.10")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) .apply(); } } @@ -1149,9 +1346,7 @@ import java.util.Arrays; */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. @@ -1161,28 +1356,56 @@ public final class InternalNetworksUpdateAdministrativeStateSamples { public static void internalNetworksUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-internalnetwork", + .updateAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` +### InternalNetworks_UpdateBfdAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; + +/** + * Samples for InternalNetworks UpdateBfdAdministrativeState. + */ +public final class InternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: InternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.internalNetworks() + .updateBfdAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.STATIC) + .withNeighborAddress("10.10.1.10") + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), + com.azure.core.util.Context.NONE); + } +} +``` + ### InternalNetworks_UpdateBgpAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; /** * Samples for InternalNetworks UpdateBgpAdministrativeState. */ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBgpAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. @@ -1192,8 +1415,9 @@ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .updateBgpAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBgpAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkUpdateBgpAdministrativeStateRequest().withNeighborAddress("10.10.10.10") + .withAdministrativeState(BgpAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } @@ -1211,16 +1435,14 @@ import java.util.Arrays; */ public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateStaticRouteBfdAdministrativeState.json */ /** - * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void internalNetworksUpdateStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", @@ -1234,6 +1456,8 @@ public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSample ```java import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -1244,9 +1468,7 @@ import java.util.Map; */ public final class InternetGatewayRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Create.json */ /** * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. @@ -1259,9 +1481,14 @@ public final class InternetGatewayRulesCreateSamples { .define("example-internetGatewayRule") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withRuleProperties( - new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("10.10.10.10"))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("10.10.10.10")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("11.11.10.11")) + .withSourceAddressList(Arrays.asList("10.10.10.10")) + .withHeaderAddressList(Arrays.asList(new HeaderAddressProperties().withHeaderName("abcHeader") + .withAddressList(Arrays.asList("10.10.10.10"))))) + .withTags(mapOf("KeyID", "fakeTokenPlaceholder")) .withAnnotation("annotationValue") .create(); } @@ -1288,9 +1515,7 @@ public final class InternetGatewayRulesCreateSamples { */ public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Delete.json */ /** * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. @@ -1313,9 +1538,7 @@ public final class InternetGatewayRulesDeleteSamples { */ public final class InternetGatewayRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Get.json */ /** * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. @@ -1339,9 +1562,7 @@ public final class InternetGatewayRulesGetByResourceGroupSamples { */ public final class InternetGatewayRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_ListBySubscription.json */ /** * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. @@ -1363,9 +1584,7 @@ public final class InternetGatewayRulesListSamples { */ public final class InternetGatewayRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_ListByResourceGroup.json */ /** * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. @@ -1392,9 +1611,7 @@ import java.util.Map; */ public final class InternetGatewayRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Update.json */ /** * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. @@ -1407,7 +1624,7 @@ public final class InternetGatewayRulesUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3311", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("KeyID", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -1436,9 +1653,7 @@ import java.util.Map; */ public final class InternetGatewaysCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Create.json */ /** * Sample code: InternetGateways_Create_MaximumSet_Gen. @@ -1451,13 +1666,14 @@ public final class InternetGatewaysCreateSamples { .define("example-internetGateway") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTypePropertiesType(GatewayType.INFRASTRUCTURE) .withNetworkFabricControllerId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController") - .withTags(mapOf("key3540", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withInternetGatewayRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") - .withAnnotation("annotation") + .withTypePropertiesType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) .create(); } @@ -1483,9 +1699,7 @@ public final class InternetGatewaysCreateSamples { */ public final class InternetGatewaysDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Delete.json */ /** * Sample code: InternetGateways_Delete_MaximumSet_Gen. @@ -1507,9 +1721,7 @@ public final class InternetGatewaysDeleteSamples { */ public final class InternetGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Get.json */ /** * Sample code: InternetGateways_Get_MaximumSet_Gen. @@ -1532,9 +1744,7 @@ public final class InternetGatewaysGetByResourceGroupSamples { */ public final class InternetGatewaysListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_ListBySubscription.json */ /** * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. @@ -1556,9 +1766,7 @@ public final class InternetGatewaysListSamples { */ public final class InternetGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_ListByResourceGroup.json */ /** * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. @@ -1584,9 +1792,7 @@ import java.util.Map; */ public final class InternetGatewaysUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Update.json */ /** * Sample code: InternetGateways_Update_MaximumSet_Gen. @@ -1599,7 +1805,7 @@ public final class InternetGatewaysUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key81", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withInternetGatewayRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") .apply(); @@ -1634,9 +1840,7 @@ import java.util.Map; */ public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Create.json */ /** * Sample code: IpCommunities_Create_MaximumSet_Gen. @@ -1649,11 +1853,11 @@ public final class IpCommunitiesCreateSamples { .define("example-ipcommunity") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) .withCommunityMembers(Arrays.asList("1:1")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } @@ -1680,9 +1884,7 @@ public final class IpCommunitiesCreateSamples { */ public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Delete.json */ /** * Sample code: IpCommunities_Delete_MaximumSet_Gen. @@ -1704,9 +1906,7 @@ public final class IpCommunitiesDeleteSamples { */ public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Get.json */ /** * Sample code: IpCommunities_Get_MaximumSet_Gen. @@ -1729,9 +1929,7 @@ public final class IpCommunitiesGetByResourceGroupSamples { */ public final class IpCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_ListBySubscription.json */ /** * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. @@ -1753,9 +1951,7 @@ public final class IpCommunitiesListSamples { */ public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_ListByResourceGroup.json */ /** * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. @@ -1777,15 +1973,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for IpCommunities Update. */ public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Update.json */ /** * Sample code: IpCommunities_Update_MaximumSet_Gen. @@ -1798,12 +1994,25 @@ public final class IpCommunitiesUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) .withCommunityMembers(Arrays.asList("1:1")))) .apply(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` @@ -1821,9 +2030,7 @@ import java.util.Map; */ public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Create.json */ /** * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. @@ -1840,7 +2047,7 @@ public final class IpExtendedCommunitiesCreateSamples { Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withRouteTargets(Arrays.asList("1234:2345")))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } @@ -1867,9 +2074,7 @@ public final class IpExtendedCommunitiesCreateSamples { */ public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Delete.json */ /** * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. @@ -1892,9 +2097,7 @@ public final class IpExtendedCommunitiesDeleteSamples { */ public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Get.json */ /** * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. @@ -1918,9 +2121,7 @@ public final class IpExtendedCommunitiesGetByResourceGroupSamples { */ public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListBySubscription.json */ /** * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. @@ -1942,9 +2143,7 @@ public final class IpExtendedCommunitiesListSamples { */ public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListByResourceGroup.json */ /** * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. @@ -1973,9 +2172,7 @@ import java.util.Map; */ public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Update.json */ /** * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. @@ -1989,7 +2186,8 @@ public final class IpExtendedCommunitiesUpdateSamples { com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withIpExtendedCommunityRules( Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) @@ -2026,9 +2224,7 @@ import java.util.Map; */ public final class IpPrefixesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Create.json */ /** * Sample code: IpPrefixes_Create_MaximumSet_Gen. @@ -2041,12 +2237,12 @@ public final class IpPrefixesCreateSamples { .define("example-ipPrefix") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withNetworkPrefix("10.10.10.10/30") .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) .withSubnetMaskLength("10"))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } @@ -2073,9 +2269,7 @@ public final class IpPrefixesCreateSamples { */ public final class IpPrefixesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Delete.json */ /** * Sample code: IpPrefixes_Delete_MaximumSet_Gen. @@ -2097,9 +2291,7 @@ public final class IpPrefixesDeleteSamples { */ public final class IpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Get.json */ /** * Sample code: IpPrefixes_Get_MaximumSet_Gen. @@ -2122,9 +2314,7 @@ public final class IpPrefixesGetByResourceGroupSamples { */ public final class IpPrefixesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_ListBySubscription.json */ /** * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. @@ -2146,9 +2336,7 @@ public final class IpPrefixesListSamples { */ public final class IpPrefixesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_ListByResourceGroup.json */ /** * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. @@ -2178,9 +2366,7 @@ import java.util.Map; */ public final class IpPrefixesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Update.json */ /** * Sample code: IpPrefixes_Update_MaximumSet_Gen. @@ -2193,13 +2379,13 @@ public final class IpPrefixesUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withNetworkPrefix("10.10.10.10/30") .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) .withSubnetMaskLength("10"))) - .withAnnotation("annotation") .apply(); } @@ -2225,9 +2411,7 @@ public final class IpPrefixesUpdateSamples { */ public final class L2IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_CommitConfiguration.json */ /** * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. @@ -2245,6 +2429,10 @@ public final class L2IsolationDomainsCommitConfigurationSamples { ### L2IsolationDomains_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -2253,9 +2441,7 @@ import java.util.Map; */ public final class L2IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Create.json */ /** * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. @@ -2271,8 +2457,13 @@ public final class L2IsolationDomainsCreateSamples { .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") .withVlanId(501) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withMtu(1500) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withAnnotation("annotation") .create(); } @@ -2299,9 +2490,7 @@ public final class L2IsolationDomainsCreateSamples { */ public final class L2IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Delete.json */ /** * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. @@ -2310,7 +2499,7 @@ public final class L2IsolationDomainsDeleteSamples { */ public static void l2IsolationDomainsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + manager.l2IsolationDomains().delete("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } ``` @@ -2323,9 +2512,7 @@ public final class L2IsolationDomainsDeleteSamples { */ public final class L2IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Get.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. @@ -2335,7 +2522,7 @@ public final class L2IsolationDomainsGetByResourceGroupSamples { public static void l2IsolationDomainsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } ``` @@ -2348,9 +2535,7 @@ public final class L2IsolationDomainsGetByResourceGroupSamples { */ public final class L2IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ListBySubscription.json */ /** * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. @@ -2372,9 +2557,7 @@ public final class L2IsolationDomainsListSamples { */ public final class L2IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. @@ -2392,6 +2575,9 @@ public final class L2IsolationDomainsListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -2400,9 +2586,7 @@ import java.util.Map; */ public final class L2IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Update.json */ /** * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. @@ -2412,11 +2596,15 @@ public final class L2IsolationDomainsUpdateSamples { public static void l2IsolationDomainsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { L2IsolationDomain resource = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) .withMtu(6000) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withAnnotation("annotation1") .apply(); } @@ -2447,19 +2635,17 @@ import java.util.Arrays; */ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L2IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.l2IsolationDomains() - .updateAdministrativeState("example-rg", "example-l2Domain", + .updateAdministrativeState("example-rg", "example-l2domain", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } @@ -2474,9 +2660,7 @@ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { */ public final class L2IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. @@ -2499,9 +2683,7 @@ public final class L2IsolationDomainsValidateConfigurationSamples { */ public final class L3IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_CommitConfiguration.json */ /** * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. @@ -2523,8 +2705,14 @@ import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2534,9 +2722,7 @@ import java.util.Map; */ public final class L3IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Create.json */ /** * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. @@ -2551,19 +2737,28 @@ public final class L3IsolationDomainsCreateSamples { .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) .withAggregateRouteConfiguration(new AggregateRouteConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) - .withAnnotation("annotation") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy().withExportRoutePolicy(new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withV4routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1000).withThreshold(90)) + .withV6routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1000).withThreshold(90)) .create(); } @@ -2589,9 +2784,7 @@ public final class L3IsolationDomainsCreateSamples { */ public final class L3IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Delete.json */ /** * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. @@ -2613,9 +2806,7 @@ public final class L3IsolationDomainsDeleteSamples { */ public final class L3IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Get.json */ /** * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. @@ -2638,9 +2829,7 @@ public final class L3IsolationDomainsGetByResourceGroupSamples { */ public final class L3IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ListBySubscription.json */ /** * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. @@ -2662,9 +2851,7 @@ public final class L3IsolationDomainsListSamples { */ public final class L3IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. @@ -2682,12 +2869,19 @@ public final class L3IsolationDomainsListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2697,9 +2891,7 @@ import java.util.Map; */ public final class L3IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Update.json */ /** * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. @@ -2712,19 +2904,29 @@ public final class L3IsolationDomainsUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key4953", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .withAnnotation("annotation1") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"))) - .withAnnotation("annotation1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withV4routePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(1000).withThreshold(50)) + .withV6routePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(1000).withThreshold(50)) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) .apply(); } @@ -2754,12 +2956,10 @@ import java.util.Arrays; */ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L3IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -2781,9 +2981,7 @@ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { */ public final class L3IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. @@ -2801,7 +2999,10 @@ public final class L3IsolationDomainsValidateConfigurationSamples { ### NeighborGroups_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2811,9 +3012,7 @@ import java.util.Map; */ public final class NeighborGroupsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Create.json */ /** * Sample code: NeighborGroups_Create_MaximumSet_Gen. @@ -2826,11 +3025,13 @@ public final class NeighborGroupsCreateSamples { .define("example-neighborGroup") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) .withDestination(new NeighborGroupDestination() .withIpv4Addresses(Arrays.asList("10.10.10.10", "20.10.10.10", "30.10.10.10", "40.10.10.10", "50.10.10.10", "60.10.10.10", "70.10.10.10", "80.10.10.10", "90.10.10.10")) .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withAnnotation("annotation") .create(); } @@ -2857,9 +3058,7 @@ public final class NeighborGroupsCreateSamples { */ public final class NeighborGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Delete.json */ /** * Sample code: NeighborGroups_Delete_MaximumSet_Gen. @@ -2881,9 +3080,7 @@ public final class NeighborGroupsDeleteSamples { */ public final class NeighborGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Get.json */ /** * Sample code: NeighborGroups_Get_MaximumSet_Gen. @@ -2906,9 +3103,7 @@ public final class NeighborGroupsGetByResourceGroupSamples { */ public final class NeighborGroupsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_ListBySubscription.json */ /** * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. @@ -2930,9 +3125,7 @@ public final class NeighborGroupsListSamples { */ public final class NeighborGroupsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_ListByResourceGroup.json */ /** * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. @@ -2946,11 +3139,36 @@ public final class NeighborGroupsListByResourceGroupSamples { } ``` +### NeighborGroups_Resync + +```java +/** + * Samples for NeighborGroups Resync. + */ +public final class NeighborGroupsResyncSamples { + /* + * x-ms-original-file: 2025-07-15/NeighborGroups_Resync.json + */ + /** + * Sample code: NeighborGroups_Resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + neighborGroupsResync(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().resync("example-rg", "example-neighborgroup", com.azure.core.util.Context.NONE); + } +} +``` + ### NeighborGroups_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2960,9 +3178,7 @@ import java.util.Map; */ public final class NeighborGroupsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Update.json */ /** * Sample code: NeighborGroups_Update_MaximumSet_Gen. @@ -2975,12 +3191,14 @@ public final class NeighborGroupsUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .withDestination(new NeighborGroupDestination() + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .withAnnotation("Updating") + .withDestination(new NeighborGroupDestinationPatch() .withIpv4Addresses(Arrays.asList("10.10.10.10", "20.10.10.10", "30.10.10.10", "40.10.10.10", "50.10.10.10", "60.10.10.10", "70.10.10.10", "80.10.10.10", "90.10.10.10")) .withIpv6Addresses(Arrays.asList("2F::/100"))) - .withAnnotation("Updating") .apply(); } @@ -2998,85 +3216,41 @@ public final class NeighborGroupsUpdateSamples { } ``` -### NetworkDeviceSkus_Get - -```java -/** - * Samples for NetworkDeviceSkus Get. - */ -public final class NetworkDeviceSkusGetSamples { - /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_Get_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDeviceSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDeviceSkus().getWithResponse("example-deviceSku", com.azure.core.util.Context.NONE); - } -} -``` - -### NetworkDeviceSkus_List - -```java -/** - * Samples for NetworkDeviceSkus List. - */ -public final class NetworkDeviceSkusListSamples { - /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDeviceSkusListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); - } -} -``` - -### NetworkDevices_Create +### NetworkBootstrapDevices_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** - * Samples for NetworkDevices Create. + * Samples for NetworkBootstrapDevices Create. */ -public final class NetworkDevicesCreateSamples { +public final class NetworkBootstrapDevicesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Create.json */ /** - * Sample code: NetworkDevices_Create_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Create_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesCreateMaximumSetGen( + public static void networkBootstrapDevicesCreateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices() + manager.networkBootstrapDevices() .define("example-device") .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withNetworkDeviceSku("DeviceSku") - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withNetworkDeviceSku("DeviceSku") .create(); } @@ -3094,188 +3268,207 @@ public final class NetworkDevicesCreateSamples { } ``` -### NetworkDevices_Delete +### NetworkBootstrapDevices_Delete ```java /** - * Samples for NetworkDevices Delete. + * Samples for NetworkBootstrapDevices Delete. */ -public final class NetworkDevicesDeleteSamples { +public final class NetworkBootstrapDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Delete.json */ /** - * Sample code: NetworkDevices_Delete_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Delete_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesDeleteMaximumSetGen( + public static void networkBootstrapDevicesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); + manager.networkBootstrapDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GetByResourceGroup +### NetworkBootstrapDevices_GetByResourceGroup ```java /** - * Samples for NetworkDevices GetByResourceGroup. + * Samples for NetworkBootstrapDevices GetByResourceGroup. */ -public final class NetworkDevicesGetByResourceGroupSamples { +public final class NetworkBootstrapDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Get.json */ /** - * Sample code: NetworkDevices_Get_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetMaximumSetGen( + public static void networkBootstrapDevicesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices() + manager.networkBootstrapDevices() .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_List +### NetworkBootstrapDevices_List ```java /** - * Samples for NetworkDevices List. + * Samples for NetworkBootstrapDevices List. */ -public final class NetworkDevicesListSamples { +public final class NetworkBootstrapDevicesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListBySubscription.json */ /** - * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_ListBySubscription. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesListBySubscriptionMaximumSetGen( + public static void networkBootstrapDevicesListBySubscription( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().list(com.azure.core.util.Context.NONE); + manager.networkBootstrapDevices().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_ListByResourceGroup +### NetworkBootstrapDevices_ListByResourceGroup ```java /** - * Samples for NetworkDevices ListByResourceGroup. + * Samples for NetworkBootstrapDevices ListByResourceGroup. */ -public final class NetworkDevicesListByResourceGroupSamples { +public final class NetworkBootstrapDevicesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListByResourceGroup.json */ /** - * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated + * by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + public static void + networkBootstrapDevicesListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_Reboot +### NetworkBootstrapDevices_Reboot ```java -import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; -import com.azure.resourcemanager.managednetworkfabric.models.RebootType; - /** - * Samples for NetworkDevices Reboot. + * Samples for NetworkBootstrapDevices Reboot. */ -public final class NetworkDevicesRebootSamples { +public final class NetworkBootstrapDevicesRebootSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Reboot_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Reboot.json */ /** - * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Reboot_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesRebootMaximumSetGen( + public static void networkBootstrapDevicesRebootMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices() - .reboot("example-rg", "example-device", - new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), - com.azure.core.util.Context.NONE); + manager.networkBootstrapDevices().reboot("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_RefreshConfiguration +### NetworkBootstrapDevices_RefreshConfiguration ```java /** - * Samples for NetworkDevices RefreshConfiguration. + * Samples for NetworkBootstrapDevices RefreshConfiguration. */ -public final class NetworkDevicesRefreshConfigurationSamples { +public final class NetworkBootstrapDevicesRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_RefreshConfiguration.json */ /** - * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_RefreshConfiguration_MaximumSet - generated by [MaximumSet] rule - generated + * by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesRefreshConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); + public static void + networkBootstrapDevicesRefreshConfigurationMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_Update +### NetworkBootstrapDevices_ResyncPasswords ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +/** + * Samples for NetworkBootstrapDevices ResyncPasswords. + */ +public final class NetworkBootstrapDevicesResyncPasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ResyncPasswords.json + */ + /** + * Sample code: Resync the latest passwords to the Network Bootstrap Device. - generated by [MaximumSet] rule - + * generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + resyncTheLatestPasswordsToTheNetworkBootstrapDeviceGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkBootstrapDevices_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** - * Samples for NetworkDevices Update. + * Samples for NetworkBootstrapDevices Update. */ -public final class NetworkDevicesUpdateSamples { +public final class NetworkBootstrapDevicesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Update.json */ /** - * Sample code: NetworkDevices_Update_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Update_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdateMaximumSetGen( + public static void networkBootstrapDevicesUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkDevice resource = manager.networkDevices() + NetworkBootstrapDevice resource = manager.networkBootstrapDevices() .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") .apply(); } @@ -3293,7 +3486,7 @@ public final class NetworkDevicesUpdateSamples { } ``` -### NetworkDevices_UpdateAdministrativeState +### NetworkBootstrapDevices_UpdateAdministrativeState ```java import com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState; @@ -3301,408 +3494,306 @@ import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdminis import java.util.Arrays; /** - * Samples for NetworkDevices UpdateAdministrativeState. + * Samples for NetworkBootstrapDevices UpdateAdministrativeState. */ -public final class NetworkDevicesUpdateAdministrativeStateSamples { +public final class NetworkBootstrapDevicesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_UpdateAdministrativeState.json */ /** - * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_UpdateAdministrativeState_MaximumSet - generated by [MaximumSet] rule - + * generated by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices() + public static void + networkBootstrapDevicesUpdateAdministrativeStateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() .updateAdministrativeState("example-rg", "example-device", - new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList("")) + new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList( + "/Subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device-1")) .withState(DeviceAdministrativeState.RMA), com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_Upgrade +### NetworkBootstrapDevices_Upgrade ```java import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; /** - * Samples for NetworkDevices Upgrade. + * Samples for NetworkBootstrapDevices Upgrade. */ -public final class NetworkDevicesUpgradeSamples { +public final class NetworkBootstrapDevicesUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Upgrade.json */ /** - * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. + * Sample code: NetworkBootstrapDevices_Upgrade_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpgradeMaximumSetGen( + public static void networkBootstrapDevicesUpgradeMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices() - .upgrade("example-rg", "example-device", new UpdateVersion().withVersion("1.0.0"), + manager.networkBootstrapDevices() + .upgrade("example-rg", "example-device", new UpdateVersion().withVersion("1.0"), com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_Create +### NetworkBootstrapInterfaces_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; -import java.util.Arrays; - /** - * Samples for NetworkFabricControllers Create. + * Samples for NetworkBootstrapInterfaces Create. */ -public final class NetworkFabricControllersCreateSamples { +public final class NetworkBootstrapInterfacesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Create.json */ /** - * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_Create_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersCreateMaximumSetGen( + public static void networkBootstrapInterfacesCreateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers() - .define("example-networkController") - .withRegion("eastus") - .withExistingResourceGroup("example-rg") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) - .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) - .withIpv4AddressSpace("172.253.0.0/19") - .withIpv6AddressSpace("::/60") - .withNfcSku(NfcSku.STANDARD) - .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withWorkloadExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + manager.networkBootstrapInterfaces() + .define("example-interface") + .withExistingNetworkBootstrapDevice("example-rg", "example-device") + .withAdditionalDescription("additionalDescription") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") .withAnnotation("annotation") .create(); } } ``` -### NetworkFabricControllers_Delete +### NetworkBootstrapInterfaces_Delete ```java /** - * Samples for NetworkFabricControllers Delete. + * Samples for NetworkBootstrapInterfaces Delete. */ -public final class NetworkFabricControllersDeleteSamples { +public final class NetworkBootstrapInterfacesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Delete.json */ /** - * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_Delete_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersDeleteMaximumSetGen( + public static void networkBootstrapInterfacesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers() - .delete("example-rg", "example-networkController", com.azure.core.util.Context.NONE); + manager.networkBootstrapInterfaces() + .delete("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_GetByResourceGroup +### NetworkBootstrapInterfaces_Get ```java /** - * Samples for NetworkFabricControllers GetByResourceGroup. + * Samples for NetworkBootstrapInterfaces Get. */ -public final class NetworkFabricControllersGetByResourceGroupSamples { +public final class NetworkBootstrapInterfacesGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Get.json */ /** - * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_Get_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersGetMaximumSetGen( + public static void networkBootstrapInterfacesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers() - .getByResourceGroupWithResponse("example-rg", "example-networkController", - com.azure.core.util.Context.NONE); + manager.networkBootstrapInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_List +### NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice ```java /** - * Samples for NetworkFabricControllers List. + * Samples for NetworkBootstrapInterfaces ListByNetworkBootstrapDevice. */ -public final class NetworkFabricControllersListSamples { +public final class NetworkBootstrapInterfacesListByNetworkBootstrapDeviceSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice.json */ /** - * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice_MaximumSet - generated by [MaximumSet] rule + * - generated by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); + public static void + networkBootstrapInterfacesListByNetworkBootstrapDeviceMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .listByNetworkBootstrapDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_ListByResourceGroup +### NetworkBootstrapInterfaces_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; + /** - * Samples for NetworkFabricControllers ListByResourceGroup. + * Samples for NetworkBootstrapInterfaces Update. */ -public final class NetworkFabricControllersListByResourceGroupSamples { +public final class NetworkBootstrapInterfacesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Update.json */ /** - * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_Update_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersListByResourceGroupMaximumSetGen( + public static void networkBootstrapInterfacesUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + NetworkBootstrapInterface resource = manager.networkBootstrapInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSerialNumber("Vendor;Model;HardwareRevisionId;SerialNumber") + .withAnnotation("annotation") + .apply(); } } ``` -### NetworkFabricControllers_Update +### NetworkBootstrapInterfaces_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** - * Samples for NetworkFabricControllers Update. - */ -public final class NetworkFabricControllersUpdateSamples { - /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Update_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkFabricControllersUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkFabricController resource = manager.networkFabricControllers() - .getByResourceGroupWithResponse("example-rg", "example-networkController", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withWorkloadExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .apply(); - } -} -``` - -### NetworkFabricSkus_Get - -```java -/** - * Samples for NetworkFabricSkus Get. + * Samples for NetworkBootstrapInterfaces UpdateAdministrativeState. */ -public final class NetworkFabricSkusGetSamples { +public final class NetworkBootstrapInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_UpdateAdministrativeState.json */ /** - * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. + * Sample code: NetworkBootstrapInterfaces_UpdateAdministrativeState_MaximumSet - generated by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricSkusGetMaximumSetGen( + public static void networkBootstrapInterfacesUpdateAdministrativeStateMaximumSetGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); + manager.networkBootstrapInterfaces() + .updateAdministrativeState("example-rg", "example-device", "example-interface", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricSkus_List +### NetworkDeviceSkus_Get ```java /** - * Samples for NetworkFabricSkus List. + * Samples for NetworkDeviceSkus Get. */ -public final class NetworkFabricSkusListSamples { +public final class NetworkDeviceSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDeviceSkus_Get.json */ /** - * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricSkusListBySubscriptionMaximumSetGen( + public static void networkDeviceSkusGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); + manager.networkDeviceSkus().getWithResponse("example-deviceSku", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_CommitConfiguration +### NetworkDeviceSkus_List ```java /** - * Samples for NetworkFabrics CommitConfiguration. + * Samples for NetworkDeviceSkus List. */ -public final class NetworkFabricsCommitConfigurationSamples { +public final class NetworkDeviceSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDeviceSkus_ListBySubscription.json */ /** - * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. + * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsCommitConfigurationMaximumSetGen( + public static void networkDeviceSkusListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Create +### NetworkDevices_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** - * Samples for NetworkFabrics Create. + * Samples for NetworkDevices Create. */ -public final class NetworkFabricsCreateSamples { +public final class NetworkDevicesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Create.json */ /** - * Sample code: NetworkFabrics_Create_MaximumSet_Gen. + * Sample code: NetworkDevices_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsCreateMaximumSetGen( + public static void networkDevicesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics() - .define("example-fabric") + manager.networkDevices() + .define("example-device") .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withNetworkFabricSku("M4-A400-A100-C16-aa") - .withNetworkFabricControllerId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") - .withServerCountPerRack(8) - .withIpv4Prefix("10.18.0.0/19") - .withFabricAsn(29249L) - .withTerminalServerConfiguration(new TerminalServerConfiguration().withUsername("username") - .withPassword("fakeTokenPlaceholder") - .withSerialNumber("123456") - .withPrimaryIpv4Prefix("10.0.0.12/30") - .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") - .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) - .withManagementNetworkConfiguration(new ManagementNetworkConfigurationProperties() - .withInfrastructureVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1501) - .withVlanId(3001) - .withPeerAsn(1235L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) - .withPrimaryIpv4Prefix("10.0.0.12/30") - .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") - .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) - .withWorkloadVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1500) - .withVlanId(3000) - .withPeerAsn(61234L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withPrimaryIpv4Prefix("10.0.0.14/30") - .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") - .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withFabricVersion("1.x.x") - .withRackCount(4) - .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + new UserAssignedIdentity()))) .withAnnotation("annotation") + .withHostName("NFA-Device") + .withIdentitySelector(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) + .withNetworkDeviceSku("DeviceSku") .create(); } @@ -3720,289 +3811,1420 @@ public final class NetworkFabricsCreateSamples { } ``` -### NetworkFabrics_Delete +### NetworkDevices_Delete ```java /** - * Samples for NetworkFabrics Delete. + * Samples for NetworkDevices Delete. */ -public final class NetworkFabricsDeleteSamples { +public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Delete.json */ /** - * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. + * Sample code: NetworkDevices_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsDeleteMaximumSetGen( + public static void networkDevicesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().delete("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Deprovision +### NetworkDevices_GetByResourceGroup ```java /** - * Samples for NetworkFabrics Deprovision. + * Samples for NetworkDevices GetByResourceGroup. */ -public final class NetworkFabricsDeprovisionSamples { +public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Get.json */ /** - * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. + * Sample code: NetworkDevices_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsDeprovisionMaximumSetGen( + public static void networkDevicesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().deprovision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_GetByResourceGroup +### NetworkDevices_List ```java /** - * Samples for NetworkFabrics GetByResourceGroup. + * Samples for NetworkDevices List. */ -public final class NetworkFabricsGetByResourceGroupSamples { +public final class NetworkDevicesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ListBySubscription.json */ /** - * Sample code: NetworkFabrics_Get_MaximumSet_Gen. + * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsGetMaximumSetGen( + public static void networkDevicesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics() - .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_GetTopology +### NetworkDevices_ListByResourceGroup ```java /** - * Samples for NetworkFabrics GetTopology. + * Samples for NetworkDevices ListByResourceGroup. */ -public final class NetworkFabricsGetTopologySamples { +public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_GetTopology_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ListByResourceGroup.json */ /** - * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. + * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsGetTopologyMaximumSetGen( + public static void networkDevicesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().getTopology("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_List +### NetworkDevices_Reboot ```java +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RebootType; + /** - * Samples for NetworkFabrics List. + * Samples for NetworkDevices Reboot. */ -public final class NetworkFabricsListSamples { +public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Reboot.json */ /** - * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsListBySubscriptionMaximumSetGen( + public static void networkDevicesRebootMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().list(com.azure.core.util.Context.NONE); + manager.networkDevices() + .reboot("example-rg", "example-device", + new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), + com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_ListByResourceGroup +### NetworkDevices_RefreshConfiguration ```java /** - * Samples for NetworkFabrics ListByResourceGroup. + * Samples for NetworkDevices RefreshConfiguration. */ -public final class NetworkFabricsListByResourceGroupSamples { +public final class NetworkDevicesRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_RefreshConfiguration.json */ /** - * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsListByResourceGroupMaximumSetGen( + public static void networkDevicesRefreshConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + manager.networkDevices().refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Provision +### NetworkDevices_ResyncCertificates ```java /** - * Samples for NetworkFabrics Provision. + * Samples for NetworkDevices ResyncCertificates. */ -public final class NetworkFabricsProvisionSamples { +public final class NetworkDevicesResyncCertificatesSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates.json */ /** - * Sample code: NetworkFabrics_provision_MaximumSet_Gen. + * Sample code: Successful certificate resync. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsProvisionMaximumSetGen( + public static void successfulCertificateResync( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().provision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices().resyncCertificates("example-rg", "example-device", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates_Error.json + */ + /** + * Sample code: Error while performing certificate resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void errorWhilePerformingCertificateResync( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncCertificates("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_RefreshConfiguration +### NetworkDevices_ResyncPasswords ```java /** - * Samples for NetworkFabrics RefreshConfiguration. + * Samples for NetworkDevices ResyncPasswords. */ -public final class NetworkFabricsRefreshConfigurationSamples { +public final class NetworkDevicesResyncPasswordsSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords.json */ /** - * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. + * Sample code: Successful password resync. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsRefreshConfigurationMaximumSetGen( + public static void + successfulPasswordResync(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords_Error.json + */ + /** + * Sample code: Error while performing password resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void errorWhilePerformingPasswordResync( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().refreshConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkDevices().resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Update +### NetworkDevices_RunRoCommand ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; /** - * Samples for NetworkFabrics Update. + * Samples for NetworkDevices RunRoCommand. */ -public final class NetworkFabricsUpdateSamples { +public final class NetworkDevicesRunRoCommandSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_RunRoCommand.json */ /** - * Sample code: NetworkFabrics_Update_MaximumSet_Gen. + * Sample code: NetworkDevices_RunRoCommand_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsUpdateMaximumSetGen( + public static void networkDevicesRunRoCommandMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkFabric resource = manager.networkFabrics() - .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withRackCount(6) - .withServerCountPerRack(10) - .withIpv4Prefix("10.18.0.0/17") - .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") - .withFabricAsn(12345L) - .withTerminalServerConfiguration( - new NetworkFabricPatchablePropertiesTerminalServerConfiguration().withUsername("username1") - .withPassword("fakeTokenPlaceholder") - .withSerialNumber("1234567") - .withPrimaryIpv4Prefix("10.0.0.12/30") - .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") - .withSecondaryIpv4Prefix("40.0.0.14/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) - .withManagementNetworkConfiguration(new ManagementNetworkConfigurationPatchableProperties() - .withInfrastructureVpnConfiguration(new VpnConfigurationPatchableProperties() - .withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(1501) - .withVlanId(3001) - .withPeerAsn(1235L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) - .withPrimaryIpv4Prefix("10.0.0.12/30") - .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + manager.networkDevices() + .runRoCommand("example-rg", "example-device", new DeviceRoCommand().withCommand("show version"), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDevices_RunRwCommand + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; + +/** + * Samples for NetworkDevices RunRwCommand. + */ +public final class NetworkDevicesRunRwCommandSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_RunRwCommand.json + */ + /** + * Sample code: NetworkDevices_RunRwCommand_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesRunRwCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices() + .runRwCommand("example-rg", "example-device", + new DeviceRwCommand().withCommand("show running-config") + .withCommandUrl("https://example.blob.core.windows.net/commands/config.txt"), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDevices_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkDevices Update. + */ +public final class NetworkDevicesUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_Update.json + */ + /** + * Sample code: NetworkDevices_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkDevice resource = manager.networkDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + new UserAssignedIdentity()))) + .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkDevices_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import java.util.Arrays; + +/** + * Samples for NetworkDevices UpdateAdministrativeState. + */ +public final class NetworkDevicesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices() + .updateAdministrativeState("example-rg", "example-device", + new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList("")) + .withState(DeviceAdministrativeState.RMA), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDevices_Upgrade + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; + +/** + * Samples for NetworkDevices Upgrade. + */ +public final class NetworkDevicesUpgradeSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_Upgrade.json + */ + /** + * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen - generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesUpgradeMaximumSetGenGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices() + .upgrade("rgmanagednetworkfabric", "example-device", + new NetworkDeviceUpgradeRequest().withVersion("1.0.0").withRwDeviceConfigUrl("https://microsoft.com/a"), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricControllers_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkFabricControllers Create. + */ +public final class NetworkFabricControllersCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Create.json + */ + /** + * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricControllers() + .define("example-networkController") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key4876", new UserAssignedIdentity()))) + .withAnnotation("annotation") + .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withWorkloadExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) + .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkFabricControllers_Delete + +```java +/** + * Samples for NetworkFabricControllers Delete. + */ +public final class NetworkFabricControllersDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Delete.json + */ + /** + * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricControllers() + .delete("example-rg", "example-networkController", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricControllers_GetByResourceGroup + +```java +/** + * Samples for NetworkFabricControllers GetByResourceGroup. + */ +public final class NetworkFabricControllersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Get.json + */ + /** + * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricControllers() + .getByResourceGroupWithResponse("example-rg", "example-networkController", + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricControllers_List + +```java +/** + * Samples for NetworkFabricControllers List. + */ +public final class NetworkFabricControllersListSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListBySubscription.json + */ + /** + * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricControllers_ListByResourceGroup + +```java +/** + * Samples for NetworkFabricControllers ListByResourceGroup. + */ +public final class NetworkFabricControllersListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListByResourceGroup.json + */ + /** + * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricControllers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricControllers_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkFabricControllers Update. + */ +public final class NetworkFabricControllersUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Update.json + */ + /** + * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricControllersUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkFabricController resource = manager.networkFabricControllers() + .getByResourceGroupWithResponse("example-rg", "example-networkController", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key1402", new UserAssignedIdentity()))) + .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withWorkloadExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkFabricSkus_Get + +```java +/** + * Samples for NetworkFabricSkus Get. + */ +public final class NetworkFabricSkusGetSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricSkus_Get.json + */ + /** + * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricSkusGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabricSkus_List + +```java +/** + * Samples for NetworkFabricSkus List. + */ +public final class NetworkFabricSkusListSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabricSkus_ListBySubscription.json + */ + /** + * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricSkusListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ArmConfigurationDiff + +```java +/** + * Samples for NetworkFabrics ArmConfigurationDiff. + */ +public final class NetworkFabricsArmConfigurationDiffSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ArmConfigurationDiff.json + */ + /** + * Sample code: NetworkFabrics_ArmConfigurationDiff_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsArmConfigurationDiffMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().armConfigurationDiff("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_CommitBatchStatus + +```java +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; + +/** + * Samples for NetworkFabrics CommitBatchStatus. + */ +public final class NetworkFabricsCommitBatchStatusSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_CommitBatchStatus.json + */ + /** + * Sample code: NetworkFabrics_CommitBatchStatus_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsCommitBatchStatusMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .commitBatchStatus("example-rg", "example-fabric", + new CommitBatchStatusRequest().withCommitBatchId("batch-id"), com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_CommitConfiguration + +```java + +/** + * Samples for NetworkFabrics CommitConfiguration. + */ +public final class NetworkFabricsCommitConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_CommitConfiguration.json + */ + /** + * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .commitConfiguration("example-rg", "example-networkFabric", null, com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkFabrics Create. + */ +public final class NetworkFabricsCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Create.json + */ + /** + * Sample code: NetworkFabrics_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .define("example-fabric") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkFabricSku("M4-A400-A100-C16-aa") + .withNetworkFabricControllerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") + .withServerCountPerRack(8) + .withIpv4Prefix("10.18.0.0/19") + .withFabricAsn(29249L) + .withTerminalServerConfiguration(new TerminalServerConfiguration().withUsername("username") + .withPassword("fakeTokenPlaceholder") + .withSerialNumber("123456") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration(new ManagementNetworkConfigurationProperties() + .withInfrastructureVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new VpnOptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)))) + .withWorkloadVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new VpnOptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("10.0.0.14/30") + .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") + .withSecondaryIpv4Prefix("10.0.0.15/30") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") + .withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5))))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withFabricVersion("version1") + .withStorageAccountConfiguration(new StorageAccountConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withRackCount(4) + .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .withHardwareAlertThreshold(74) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withStorageArrayCount(1) + .withAuthorizedTransceiver( + new AuthorizedTransceiverProperties().withVendor("vendorX").withKey("fakeTokenPlaceholder")) + .withAnnotation("annotation") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkFabrics_Delete + +```java +/** + * Samples for NetworkFabrics Delete. + */ +public final class NetworkFabricsDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Delete.json + */ + /** + * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().delete("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Deprovision + +```java +/** + * Samples for NetworkFabrics Deprovision. + */ +public final class NetworkFabricsDeprovisionSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Deprovision.json + */ + /** + * Sample code: NetworkFabrics_Deprovision_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsDeprovisionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().deprovision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_DiscardCommitBatch + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; + +/** + * Samples for NetworkFabrics DiscardCommitBatch. + */ +public final class NetworkFabricsDiscardCommitBatchSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_DiscardCommitBatch.json + */ + /** + * Sample code: NetworkFabrics_DiscardCommitBatch. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsDiscardCommitBatch( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .discardCommitBatch("example-rg", "example-fabric", + new DiscardCommitBatchRequest().withCommitBatchId("batchId1"), com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_GetByResourceGroup + +```java +/** + * Samples for NetworkFabrics GetByResourceGroup. + */ +public final class NetworkFabricsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Get.json + */ + /** + * Sample code: NetworkFabrics_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_GetTopology + +```java +/** + * Samples for NetworkFabrics GetTopology. + */ +public final class NetworkFabricsGetTopologySamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_GetTopology.json + */ + /** + * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsGetTopologyMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().getTopology("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_List + +```java +/** + * Samples for NetworkFabrics List. + */ +public final class NetworkFabricsListSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ListBySubscription.json + */ + /** + * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ListByResourceGroup + +```java +/** + * Samples for NetworkFabrics ListByResourceGroup. + */ +public final class NetworkFabricsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ListByResourceGroup.json + */ + /** + * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_LockFabric + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; + +/** + * Samples for NetworkFabrics LockFabric. + */ +public final class NetworkFabricsLockFabricSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_LockFabric.json + */ + /** + * Sample code: NetworkFabrics_LockFabric_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsLockFabricMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .lockFabric("example-rg", "example-networkFabric", + new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.ADMINISTRATIVE) + .withAction(NetworkFabricLockAction.LOCK), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Provision + +```java +/** + * Samples for NetworkFabrics Provision. + */ +public final class NetworkFabricsProvisionSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Provision.json + */ + /** + * Sample code: NetworkFabrics_Provision_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsProvisionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().provision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_RefreshConfiguration + +```java +/** + * Samples for NetworkFabrics RefreshConfiguration. + */ +public final class NetworkFabricsRefreshConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RefreshConfiguration.json + */ + /** + * Sample code: NetworkFabrics_RefreshConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsRefreshConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().refreshConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ResyncCertificates + +```java +/** + * Samples for NetworkFabrics ResyncCertificates. + */ +public final class NetworkFabricsResyncCertificatesSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates.json + */ + /** + * Sample code: Successful certificate resync for all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulCertificateResyncForAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_Error.json + */ + /** + * Sample code: Total failure to resync certificates. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToResyncCertificates( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_PartialSuccess.json + */ + /** + * Sample code: Partial failure to resync certificates for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToResyncCertificatesForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ResyncPasswords + +```java +/** + * Samples for NetworkFabrics ResyncPasswords. + */ +public final class NetworkFabricsResyncPasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_PartialSuccess.json + */ + /** + * Sample code: Partial failure to resync passwords for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToResyncPasswordsForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_Error.json + */ + /** + * Sample code: Total failure to resync passwords. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToResyncPasswords( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords.json + */ + /** + * Sample code: Successful password resync for the Terminal Server and all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulPasswordResyncForTheTerminalServerAndAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_RotateCertificates + +```java +/** + * Samples for NetworkFabrics RotateCertificates. + */ +public final class NetworkFabricsRotateCertificatesSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_Error.json + */ + /** + * Sample code: Total failure to rotate certificates. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToRotateCertificates( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_PartialSuccess.json + */ + /** + * Sample code: Partial failure to rotate certificates for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToRotateCertificatesForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates.json + */ + /** + * Sample code: Successful certificate rotation for all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulCertificateRotationForAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_RotatePasswords + +```java +/** + * Samples for NetworkFabrics RotatePasswords. + */ +public final class NetworkFabricsRotatePasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords.json + */ + /** + * Sample code: Successful password rotation for the Terminal Server and all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulPasswordRotationForTheTerminalServerAndAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_Error.json + */ + /** + * Sample code: Total failure to rotate passwords. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToRotatePasswords( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_PartialSuccess.json + */ + /** + * Sample code: Partial failure to rotate passwords for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToRotatePasswordsForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.QosConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkFabrics Update. + */ +public final class NetworkFabricsUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Update_QoS.json + */ + /** + * Sample code: NetworkFabrics_Update_QoS_Enable. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateQoSEnable( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkFabric resource = manager.networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withQosConfiguration(new QosPatchProperties().withQosConfigurationState(QosConfigurationState.ENABLED)) + .apply(); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Update.json + */ + /** + * Sample code: NetworkFabrics_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkFabric resource = manager.networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation1") + .withRackCount(6) + .withServerCountPerRack(10) + .withIpv4Prefix("10.18.0.0/17") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") + .withFabricAsn(12345L) + .withTerminalServerConfiguration(new TerminalServerPatchConfiguration().withUsername("username1") + .withPassword("fakeTokenPlaceholder") + .withSerialNumber("1234567") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration(new ManagementNetworkPatchConfiguration() + .withInfrastructureVpnConfiguration(new VpnConfigurationPatchableProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)))) .withWorkloadVpnConfiguration(new VpnConfigurationPatchableProperties() .withNetworkToNetworkInterconnectId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withOptionBProperties( + new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(1500) - .withVlanId(3000) - .withPeerAsn(61234L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withPrimaryIpv4Prefix("10.0.0.14/30") + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("10.0.0.14/30") .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) - .withAnnotation("annotation1") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") + .withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10))))) + .withStorageAccountConfiguration(new StorageAccountPatchConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withHardwareAlertThreshold(43) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withQosConfiguration(new QosPatchProperties().withQosConfigurationState(QosConfigurationState.ENABLED)) + .withFeatureFlags(Arrays.asList(new FeatureFlagProperties().withFeatureFlagName("uniqueRdConfiguration") + .withFeatureFlagValue("Enabled"))) .apply(); } @@ -4032,9 +5254,7 @@ import java.util.Arrays; */ public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateInfraManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. @@ -4059,221 +5279,488 @@ import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativ import java.util.Arrays; /** - * Samples for NetworkFabrics UpdateWorkloadManagementBfdConfiguration. + * Samples for NetworkFabrics UpdateWorkloadManagementBfdConfiguration. + */ +public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration.json + */ + /** + * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .updateWorkloadManagementBfdConfiguration("example-rg", "example-fabric", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Upgrade + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricUpgradeAction; +import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; + +/** + * Samples for NetworkFabrics Upgrade. + */ +public final class NetworkFabricsUpgradeSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Upgrade.json + */ + /** + * Sample code: NetworkFabrics_Upgrade_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpgradeMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .upgrade("example-rg", "example-fabric", + new UpgradeNetworkFabricProperties().withVersion("3.x.x").withAction(NetworkFabricUpgradeAction.START), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ValidateConfiguration + +```java +import com.azure.resourcemanager.managednetworkfabric.models.ValidateAction; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; + +/** + * Samples for NetworkFabrics ValidateConfiguration. + */ +public final class NetworkFabricsValidateConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ValidateConfiguration.json + */ + /** + * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .validateConfiguration("example-rg", "example-fabric", + new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_ViewDeviceConfiguration + +```java +/** + * Samples for NetworkFabrics ViewDeviceConfiguration. + */ +public final class NetworkFabricsViewDeviceConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ViewDeviceConfiguration.json + */ + /** + * Sample code: NetworkFabrics_ViewDeviceConfiguration_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsViewDeviceConfigurationMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .viewDeviceConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_Create + +```java +/** + * Samples for NetworkInterfaces Create. + */ +public final class NetworkInterfacesCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Create.json + */ + /** + * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkInterfacesCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkInterfaces() + .define("example-interface") + .withExistingNetworkDevice("example-rg", "example-device") + .withAdditionalDescription("device 1") + .withAnnotation("annotation") + .create(); + } +} +``` + +### NetworkInterfaces_Delete + +```java +/** + * Samples for NetworkInterfaces Delete. + */ +public final class NetworkInterfacesDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Delete.json + */ + /** + * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkInterfacesDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkInterfaces() + .delete("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_Get + +```java +/** + * Samples for NetworkInterfaces Get. + */ +public final class NetworkInterfacesGetSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Get.json + */ + /** + * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkInterfacesGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_ListByNetworkDevice + +```java +/** + * Samples for NetworkInterfaces ListByNetworkDevice. + */ +public final class NetworkInterfacesListByNetworkDeviceSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkInterfaces_ListByNetworkDevice.json + */ + /** + * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkInterfacesListByNetworkDeviceMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkInterfaces() + .listByNetworkDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; + +/** + * Samples for NetworkInterfaces Update. */ -public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { +public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Update.json */ /** - * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. + * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( + public static void networkInterfacesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics() - .updateWorkloadManagementBfdConfiguration("example-rg", "example-fabric", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), - com.azure.core.util.Context.NONE); + NetworkInterface resource = manager.networkInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withAdditionalDescription("device 1").withAnnotation("annotation").apply(); } } ``` -### NetworkFabrics_Upgrade +### NetworkInterfaces_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricUpgradeAction; -import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; /** - * Samples for NetworkFabrics Upgrade. + * Samples for NetworkInterfaces UpdateAdministrativeState. */ -public final class NetworkFabricsUpgradeSamples { +public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_UpdateAdministrativeState.json */ /** - * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. + * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsUpgradeMaximumSetGen( + public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics() - .upgrade("example-rg", "example-fabric", - new UpgradeNetworkFabricProperties().withVersion("3.x.x").withAction(NetworkFabricUpgradeAction.START), + manager.networkInterfaces() + .updateAdministrativeState("example-rg", "example-device", "example-interface", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_ValidateConfiguration +### NetworkMonitors_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.ValidateAction; -import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * Samples for NetworkFabrics ValidateConfiguration. + * Samples for NetworkMonitors Create. */ -public final class NetworkFabricsValidateConfigurationSamples { +public final class NetworkMonitorsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_Create.json */ /** - * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. + * Sample code: NetworkMonitors_Create. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics() - .validateConfiguration("example-rg", "example-fabric", - new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), - com.azure.core.util.Context.NONE); + public static void + networkMonitorsCreate(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors() + .define("example-monitor") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(62695) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST))) + .withAnnotation("annotation") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkInterfaces_Create +### NetworkMonitors_Delete ```java /** - * Samples for NetworkInterfaces Create. + * Samples for NetworkMonitors Delete. */ -public final class NetworkInterfacesCreateSamples { +public final class NetworkMonitorsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_Delete.json */ /** - * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. + * Sample code: NetworkMonitors_Delete_MaximumSet. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesCreateMaximumSetGen( + public static void networkMonitorsDeleteMaximumSet( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces() - .define("example-interface") - .withExistingNetworkDevice("example-rg", "example-device") - .withAnnotation("annotation") - .create(); + manager.networkMonitors().delete("rgmanagednetworkfabric", "example-monitor", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Delete +### NetworkMonitors_GetByResourceGroup ```java /** - * Samples for NetworkInterfaces Delete. + * Samples for NetworkMonitors GetByResourceGroup. */ -public final class NetworkInterfacesDeleteSamples { +public final class NetworkMonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_Get.json */ /** - * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. + * Sample code: NetworkMonitors_Get_MaximumSet. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesDeleteMaximumSetGen( + public static void networkMonitorsGetMaximumSet( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); + manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Get +### NetworkMonitors_List ```java /** - * Samples for NetworkInterfaces Get. + * Samples for NetworkMonitors List. */ -public final class NetworkInterfacesGetSamples { +public final class NetworkMonitorsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_ListBySubscription.json */ /** - * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. + * Sample code: NetworkMonitors_ListBySubscription. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesGetMaximumSetGen( + public static void networkMonitorsListBySubscription( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces() - .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); + manager.networkMonitors().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_ListByNetworkDevice +### NetworkMonitors_ListByResourceGroup ```java /** - * Samples for NetworkInterfaces ListByNetworkDevice. + * Samples for NetworkMonitors ListByResourceGroup. */ -public final class NetworkInterfacesListByNetworkDeviceSamples { +public final class NetworkMonitorsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_ListByResourceGroup.json */ /** - * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. + * Sample code: NetworkMonitors_ListByResourceGroup. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesListByNetworkDeviceMaximumSetGen( + public static void networkMonitorsListByResourceGroup( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces() - .listByNetworkDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); + manager.networkMonitors().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Update +### NetworkMonitors_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * Samples for NetworkInterfaces Update. + * Samples for NetworkMonitors Update. */ -public final class NetworkInterfacesUpdateSamples { +public final class NetworkMonitorsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_Update.json */ /** - * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. + * Sample code: NetworkMonitors_Update. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkInterface resource = manager.networkInterfaces() - .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) + public static void + networkMonitorsUpdate(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkMonitor resource = manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("annotation").apply(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withBmpConfiguration(new BmpConfigurationPatchProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(64685) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkInterfaces_UpdateAdministrativeState +### NetworkMonitors_UpdateAdministrativeState ```java import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; @@ -4281,23 +5768,21 @@ import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativ import java.util.Arrays; /** - * Samples for NetworkInterfaces UpdateAdministrativeState. + * Samples for NetworkMonitors UpdateAdministrativeState. */ -public final class NetworkInterfacesUpdateAdministrativeStateSamples { +public final class NetworkMonitorsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkMonitors_UpdateAdministrativeState.json */ /** - * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkMonitors_UpdateAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( + public static void networkMonitorsUpdateAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces() - .updateAdministrativeState("example-rg", "example-device", "example-interface", + manager.networkMonitors() + .updateAdministrativeState("example-rg", "example-monitor", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } @@ -4307,6 +5792,9 @@ public final class NetworkInterfacesUpdateAdministrativeStateSamples { ### NetworkPacketBrokers_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -4315,9 +5803,7 @@ import java.util.Map; */ public final class NetworkPacketBrokersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Create.json */ /** * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. @@ -4332,7 +5818,9 @@ public final class NetworkPacketBrokersCreateSamples { .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") - .withTags(mapOf("key2806", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .create(); } @@ -4358,9 +5846,7 @@ public final class NetworkPacketBrokersCreateSamples { */ public final class NetworkPacketBrokersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Delete.json */ /** * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. @@ -4383,9 +5869,7 @@ public final class NetworkPacketBrokersDeleteSamples { */ public final class NetworkPacketBrokersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Get.json */ /** * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. @@ -4409,9 +5893,7 @@ public final class NetworkPacketBrokersGetByResourceGroupSamples { */ public final class NetworkPacketBrokersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListBySubscription.json */ /** * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. @@ -4433,9 +5915,7 @@ public final class NetworkPacketBrokersListSamples { */ public final class NetworkPacketBrokersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListByResourceGroup.json */ /** * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. @@ -4452,7 +5932,10 @@ public final class NetworkPacketBrokersListByResourceGroupSamples { ### NetworkPacketBrokers_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -4461,9 +5944,7 @@ import java.util.Map; */ public final class NetworkPacketBrokersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Update.json */ /** * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. @@ -4476,7 +5957,11 @@ public final class NetworkPacketBrokersUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8772", "fakeTokenPlaceholder")).apply(); + resource.update() + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .apply(); } // Use "Map.of" if available @@ -4505,9 +5990,7 @@ import java.util.Map; */ public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Create.json */ /** * Sample code: NetworkRacks_Create_MaximumSet_Gen. @@ -4522,7 +6005,7 @@ public final class NetworkRacksCreateSamples { .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withNetworkRackType(NetworkRackType.AGGREGATE) .withAnnotation("annotation") .create(); @@ -4550,9 +6033,7 @@ public final class NetworkRacksCreateSamples { */ public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Delete.json */ /** * Sample code: NetworkRacks_Delete_MaximumSet_Gen. @@ -4574,9 +6055,7 @@ public final class NetworkRacksDeleteSamples { */ public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Get.json */ /** * Sample code: NetworkRacks_Get_MaximumSet_Gen. @@ -4599,9 +6078,7 @@ public final class NetworkRacksGetByResourceGroupSamples { */ public final class NetworkRacksListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_ListBySubscription.json */ /** * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. @@ -4623,9 +6100,7 @@ public final class NetworkRacksListSamples { */ public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_ListByResourceGroup.json */ /** * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. @@ -4651,9 +6126,7 @@ import java.util.Map; */ public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Update.json */ /** * Sample code: NetworkRacks_Update_MaximumSet_Gen. @@ -4665,7 +6138,7 @@ public final class NetworkRacksUpdateSamples { NetworkRack resource = manager.networkRacks() .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("keyID", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -4689,20 +6162,25 @@ import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; @@ -4714,9 +6192,7 @@ import java.util.Map; */ public final class NetworkTapRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Create.json */ /** * Sample code: NetworkTapRules_Create_MaximumSet_Gen. @@ -4727,12 +6203,18 @@ public final class NetworkTapRulesCreateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkTapRules() .define("example-tapRule") - .withRegion("eastus") + .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.THREE_ZERO) .withConfigurationType(ConfigurationType.FILE) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withTapRulesUrl("https://microsoft.com/a") + .withIdentitySelector(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) .withMatchConfigurations( Arrays .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") @@ -4740,12 +6222,12 @@ public final class NetworkTapRulesCreateSamples { .withIpAddressType(IpAddressType.IPV4) .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("10")) - .withInnerVlans(Arrays.asList("11-20")) - .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) .withIpGroupNames(Arrays.asList("example-ipGroup"))) .withEncapsulationType(EncapsulationType.NONE) .withPortCondition(new PortCondition() @@ -4760,16 +6242,17 @@ public final class NetworkTapRulesCreateSamples { "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") .withMatchConfigurationName("match1"))))) .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup1") + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("exmaple-vlanGroup").withVlans(Arrays.asList("10", "100-200")))) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays + .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup1").withPorts(Arrays.asList("100-200")), - new PortGroupProperties().withName("example-portGroup2") - .withPorts(Arrays.asList("900", "1000-2000")))))) - .withAnnotation("annotation") + new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withPollingIntervalInSeconds(30) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) .create(); } @@ -4795,9 +6278,7 @@ public final class NetworkTapRulesCreateSamples { */ public final class NetworkTapRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Delete.json */ /** * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. @@ -4819,9 +6300,7 @@ public final class NetworkTapRulesDeleteSamples { */ public final class NetworkTapRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Get.json */ /** * Sample code: NetworkTapRules_Get_MaximumSet_Gen. @@ -4844,9 +6323,7 @@ public final class NetworkTapRulesGetByResourceGroupSamples { */ public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ListBySubscription.json */ /** * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. @@ -4868,9 +6345,7 @@ public final class NetworkTapRulesListSamples { */ public final class NetworkTapRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ListByResourceGroup.json */ /** * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. @@ -4892,9 +6367,7 @@ public final class NetworkTapRulesListByResourceGroupSamples { */ public final class NetworkTapRulesResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Resync.json */ /** * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. @@ -4912,25 +6385,31 @@ public final class NetworkTapRulesResyncSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -4940,9 +6419,7 @@ import java.util.Map; */ public final class NetworkTapRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Update.json */ /** * Sample code: NetworkTapRules_Update_MaximumSet_Gen. @@ -4955,44 +6432,53 @@ public final class NetworkTapRulesUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withConfigurationType(ConfigurationType.FILE) .withTapRulesUrl("https://microsoft.com/amdsdx") - .withMatchConfigurations( + .withMatchConfigurationsForUpdate( Arrays - .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") + .asList(new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("config1") .withSequenceNumber(10L) .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("10")) - .withInnerVlans(Arrays.asList("11-20")) - .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) .withIpGroupNames(Arrays.asList("example-ipGroup"))) .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() + .withPortCondition(new PortConditionPatch() .withPortType(PortType.SOURCE_PORT) .withLayer4Protocol(Layer4Protocol.TCP) .withPorts(Arrays.asList("100")) .withPortGroupNames(Arrays.asList("example-portGroup1"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withActions(Arrays.asList(new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) .withTruncate("100") .withIsTimestampEnabled(BooleanEnumProperty.TRUE) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") .withMatchConfigurationName("match1"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup1") + .withDynamicMatchConfigurationsForUpdate(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("exmaple-vlanGroup").withVlans(Arrays.asList("10", "100-200")))) + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup1").withPorts(Arrays.asList("100-200")))))) - .withAnnotation("annotation") + new PortGroupPatchProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) .apply(); } @@ -5022,9 +6508,7 @@ import java.util.Arrays; */ public final class NetworkTapRulesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_UpdateAdministrativeState.json */ /** * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. @@ -5035,7 +6519,9 @@ public final class NetworkTapRulesUpdateAdministrativeStateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkTapRules() .updateAdministrativeState("example-rg", "example-tapRule", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-tapRule")) + .withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } @@ -5049,9 +6535,7 @@ public final class NetworkTapRulesUpdateAdministrativeStateSamples { */ public final class NetworkTapRulesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ValidateConfiguration.json */ /** * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. @@ -5069,11 +6553,14 @@ public final class NetworkTapRulesValidateConfigurationSamples { ### NetworkTaps_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5083,9 +6570,7 @@ import java.util.Map; */ public final class NetworkTapsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Create.json */ /** * Sample code: NetworkTaps_Create_MaximumSet_Gen. @@ -5100,8 +6585,7 @@ public final class NetworkTapsCreateSamples { .withExistingResourceGroup("example-rg") .withNetworkPacketBrokerId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") - .withDestinations(Arrays.asList(new NetworkTapPropertiesDestinationsItem() - .withName("example-destinaionName") + .withDestinations(Arrays.asList(new DestinationProperties().withName("example-destinaionName") .withDestinationType(DestinationType.ISOLATION_DOMAIN) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") @@ -5110,7 +6594,9 @@ public final class NetworkTapsCreateSamples { "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) .withDestinationTapRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withPollingType(PollingType.PULL) .withAnnotation("annotation") .create(); @@ -5138,9 +6624,7 @@ public final class NetworkTapsCreateSamples { */ public final class NetworkTapsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Delete.json */ /** * Sample code: NetworkTaps_Delete_MaximumSet_Gen. @@ -5162,9 +6646,7 @@ public final class NetworkTapsDeleteSamples { */ public final class NetworkTapsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Get.json */ /** * Sample code: NetworkTaps_Get_MaximumSet_Gen. @@ -5187,9 +6669,7 @@ public final class NetworkTapsGetByResourceGroupSamples { */ public final class NetworkTapsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_ListBySubscription.json */ /** * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. @@ -5211,9 +6691,7 @@ public final class NetworkTapsListSamples { */ public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_ListByResourceGroup.json */ /** * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. @@ -5235,9 +6713,7 @@ public final class NetworkTapsListByResourceGroupSamples { */ public final class NetworkTapsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Resync.json */ /** * Sample code: NetworkTaps_Resync_MaximumSet_Gen. @@ -5254,12 +6730,15 @@ public final class NetworkTapsResyncSamples { ### NetworkTaps_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5269,9 +6748,7 @@ import java.util.Map; */ public final class NetworkTapsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Update.json */ /** * Sample code: NetworkTaps_Update_MaximumSet_Gen. @@ -5284,14 +6761,16 @@ public final class NetworkTapsUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) .withPollingType(PollingType.PULL) - .withDestinationsForUpdate(Arrays.asList(new NetworkTapPatchableParametersDestinationsItem() - .withName("example-destinaionName") + .withDestinationsForUpdate(Arrays.asList(new DestinationPatchProperties().withName("example-destinaionName") .withDestinationType(DestinationType.ISOLATION_DOMAIN) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withIsolationDomainProperties(new IsolationDomainPatchProperties() + .withEncapsulation(Encapsulation.NONE) .withNeighborGroupIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) .withDestinationTapRuleId( @@ -5326,9 +6805,7 @@ import java.util.Arrays; */ public final class NetworkTapsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_UpdateAdministrativeState.json */ /** * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. @@ -5349,14 +6826,20 @@ public final class NetworkTapsUpdateAdministrativeStateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -5365,9 +6848,7 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Create.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. @@ -5378,26 +6859,34 @@ public final class NetworkToNetworkInterconnectsCreateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() .define("example-nni") - .withExistingNetworkFabric("example-rg", "example-fabric") + .withExistingNetworkFabric("example-rg", "example-nf") .withUseOptionB(BooleanEnumProperty.TRUE) .withNniType(NniType.CE) .withIsManagementType(IsManagementType.TRUE) .withLayer2Configuration(new Layer2Configuration().withMtu(1500) .withInterfaces(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("10.0.0.12/30") + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("10.0.0.12/30") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("40.0.0.14/30") .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") .withPeerAsn(61234L) - .withVlanId(1234)) + .withVlanId(1234) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(24)))) .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(25)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.0.0.12/30").withNextHop(Arrays.asList("21.20.20.20")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("3FFE:FFFF:0:CD30::ac/127") - .withNextHop(Arrays.asList("4FFE:FFFF:0:CD30::ac"))))) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withImportIpv6RoutePolicyId( @@ -5410,6 +6899,12 @@ public final class NetworkToNetworkInterconnectsCreateSamples { "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("fe08:00/64").withNextHop(Arrays.asList("fe01::1"))))) .create(); } } @@ -5423,9 +6918,7 @@ public final class NetworkToNetworkInterconnectsCreateSamples { */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Delete.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. @@ -5435,7 +6928,7 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { public static void networkToNetworkInterconnectsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } ``` @@ -5448,9 +6941,7 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Get.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. @@ -5460,7 +6951,7 @@ public final class NetworkToNetworkInterconnectsGetSamples { public static void networkToNetworkInterconnectsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } ``` @@ -5473,9 +6964,7 @@ public final class NetworkToNetworkInterconnectsGetSamples { */ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_ListByNetworkFabric.json */ /** * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. @@ -5485,7 +6974,7 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + .listByNetworkFabric("example-rg", "example-nf", com.azure.core.util.Context.NONE); } } ``` @@ -5493,14 +6982,19 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { ### NetworkToNetworkInterconnects_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; /** @@ -5508,9 +7002,7 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Update.json */ /** * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. @@ -5520,36 +7012,47 @@ public final class NetworkToNetworkInterconnectsUpdateSamples { public static void networkToNetworkInterconnectsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { NetworkToNetworkInterconnect resource = manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withLayer2Configuration(new Layer2Configuration().withMtu(1500) + .withLayer2Configuration(new Layer2ConfigurationPatch().withMtu(1500) .withInterfaces(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("20.0.0.12/29") + .withOptionBLayer3Configuration(new OptionBLayer3ConfigurationPatchProperties() + .withPrimaryIpv4Prefix("20.0.0.12/29") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.14/29") .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") .withPeerAsn(2345L) - .withVlanId(1235)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(310).withMultiplier(15)) + .withVlanId(1235) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.0.0.11/30").withNextHop(Arrays.asList("21.20.20.10")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("4FFE:FFFF:0:CD30::ac/127") - .withNextHop(Arrays.asList("5FFE:FFFF:0:CD30::ac"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + new StaticRoutePatchProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("fe80::/64").withNextHop(Arrays.asList("fe80::1"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withMicroBfdState(MicroBfdState.ENABLED) .apply(); } } @@ -5567,20 +7070,50 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .updateAdministrativeState("example-rg", "example-fabric", "example-nni", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateAdministrativeState("example-rg", "example-nf", "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList( + "/subscriptions/0000ABCD-0A0B-0000-0000-000000ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-nf/networkToNetworkInterconnects/example-nni")) + .withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkToNetworkInterconnects_UpdateBfdAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; + +/** + * Samples for NetworkToNetworkInterconnects UpdateBfdAdministrativeState. + */ +public final class NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkToNetworkInterconnects() + .updateBfdAdministrativeState("example-rg", "example-nf", "example-nni", + new NniUpdateBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } @@ -5596,18 +7129,16 @@ import java.util.Arrays; /** * Samples for NetworkToNetworkInterconnects UpdateNpbStaticRouteBfdAdministrativeState. */ -public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState { +public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() .updateNpbStaticRouteBfdAdministrativeState("example-rg", "example-fabric", "example-nni", @@ -5625,17 +7156,15 @@ public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministr */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ListOperations.json + * x-ms-original-file: 2025-07-15/Operations_List.json */ /** - * Sample code: ListOperations. + * Sample code: Operations_List_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void - listOperations(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void operationsListMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -5649,9 +7178,7 @@ public final class OperationsListSamples { */ public final class RoutePoliciesCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_CommitConfiguration.json */ /** * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. @@ -5689,9 +7216,7 @@ import java.util.Map; */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Create.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. @@ -5704,20 +7229,15 @@ public final class RoutePoliciesCreateSamples { .define("example-routePolicy") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withNetworkFabricId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("annotation") .withSequenceNumber(7L) .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") - .withIpExtendedCommunityIds(Arrays.asList( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) .withAction(new StatementActionProperties().withLocalPreference(20L) .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties(new ActionIpCommunityProperties() @@ -5734,7 +7254,12 @@ public final class RoutePoliciesCreateSamples { "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withAddressFamilyType(AddressFamilyType.IPV4) .create(); } @@ -5760,9 +7285,7 @@ public final class RoutePoliciesCreateSamples { */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Delete.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. @@ -5784,9 +7307,7 @@ public final class RoutePoliciesDeleteSamples { */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Get.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. @@ -5809,9 +7330,7 @@ public final class RoutePoliciesGetByResourceGroupSamples { */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ListBySubscription.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. @@ -5833,9 +7352,7 @@ public final class RoutePoliciesListSamples { */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ListByResourceGroup.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. @@ -5852,17 +7369,17 @@ public final class RoutePoliciesListByResourceGroupSamples { ### RoutePolicies_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5872,9 +7389,7 @@ import java.util.Map; */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Update.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. @@ -5887,27 +7402,28 @@ public final class RoutePoliciesUpdateSamples { .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("annotation") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withDefaultAction(CommunityActionTypes.PERMIT) + .withStatementsForUpdate(Arrays.asList(new RoutePolicyStatementPatchProperties() + .withAnnotation("annotation") .withSequenceNumber(7L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList( + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") - .withIpExtendedCommunityIds(Arrays.asList( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) - .withAction(new StatementActionProperties().withLocalPreference(20L) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .withAction(new StatementActionPatchProperties().withLocalPreference(20L) .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( @@ -5943,9 +7459,7 @@ import java.util.Arrays; */ public final class RoutePoliciesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_UpdateAdministrativeState.json */ /** * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. @@ -5970,9 +7484,7 @@ public final class RoutePoliciesUpdateAdministrativeStateSamples { */ public final class RoutePoliciesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ValidateConfiguration.json */ /** * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml index 3bde1bcfb91f..26b7c0895022 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-managednetworkfabric - 1.2.0-beta.1 + 1.2.0 jar Microsoft Azure SDK for Managed Network Fabric Management - This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. + This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package api-version 2025-07-15. https://github.com/Azure/azure-sdk-for-java @@ -45,8 +45,6 @@ UTF-8 0 0 - false - true diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java index 1967b45ba68b..2011a02ae308 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric; @@ -22,10 +22,10 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi; +import com.azure.resourcemanager.managednetworkfabric.fluent.ManagedNetworkFabricManagementClient; import com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsImpl; -import com.azure.resourcemanager.managednetworkfabric.implementation.AzureNetworkFabricManagementServiceApiBuilder; import com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesImpl; @@ -35,13 +35,17 @@ import com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.ManagedNetworkFabricManagementClientBuilder; import com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkBootstrapDevicesImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkBootstrapInterfacesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkMonitorsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesImpl; @@ -60,12 +64,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroups; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevices; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfaces; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkus; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevices; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllers; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkus; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaces; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitors; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokers; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacks; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules; @@ -77,6 +84,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -85,12 +93,14 @@ * Self service experience for Azure Network Fabric API. */ public final class ManagedNetworkFabricManager { - private AccessControlLists accessControlLists; + private Operations operations; - private InternetGateways internetGateways; + private AccessControlLists accessControlLists; private InternetGatewayRules internetGatewayRules; + private InternetGateways internetGateways; + private IpCommunities ipCommunities; private IpExtendedCommunities ipExtendedCommunities; @@ -129,16 +139,20 @@ public final class ManagedNetworkFabricManager { private NetworkTaps networkTaps; - private Operations operations; - private RoutePolicies routePolicies; - private final AzureNetworkFabricManagementServiceApi clientObject; + private NetworkMonitors networkMonitors; + + private NetworkBootstrapDevices networkBootstrapDevices; + + private NetworkBootstrapInterfaces networkBootstrapInterfaces; + + private final ManagedNetworkFabricManagementClient clientObject; private ManagedNetworkFabricManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureNetworkFabricManagementServiceApiBuilder().pipeline(httpPipeline) + this.clientObject = new ManagedNetworkFabricManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -185,6 +199,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-managednetworkfabric.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -292,12 +309,14 @@ public ManagedNetworkFabricManager authenticate(TokenCredential credential, Azur Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.managednetworkfabric") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -344,27 +363,27 @@ public ManagedNetworkFabricManager authenticate(TokenCredential credential, Azur } /** - * Gets the resource collection API of AccessControlLists. It manages AccessControlList. + * Gets the resource collection API of Operations. * - * @return Resource collection API of AccessControlLists. + * @return Resource collection API of Operations. */ - public AccessControlLists accessControlLists() { - if (this.accessControlLists == null) { - this.accessControlLists = new AccessControlListsImpl(clientObject.getAccessControlLists(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return accessControlLists; + return operations; } /** - * Gets the resource collection API of InternetGateways. It manages InternetGateway. + * Gets the resource collection API of AccessControlLists. It manages AccessControlList. * - * @return Resource collection API of InternetGateways. + * @return Resource collection API of AccessControlLists. */ - public InternetGateways internetGateways() { - if (this.internetGateways == null) { - this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this); + public AccessControlLists accessControlLists() { + if (this.accessControlLists == null) { + this.accessControlLists = new AccessControlListsImpl(clientObject.getAccessControlLists(), this); } - return internetGateways; + return accessControlLists; } /** @@ -379,6 +398,18 @@ public InternetGatewayRules internetGatewayRules() { return internetGatewayRules; } + /** + * Gets the resource collection API of InternetGateways. It manages InternetGateway. + * + * @return Resource collection API of InternetGateways. + */ + public InternetGateways internetGateways() { + if (this.internetGateways == null) { + this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this); + } + return internetGateways; + } + /** * Gets the resource collection API of IpCommunities. It manages IpCommunity. * @@ -609,18 +640,6 @@ public NetworkTaps networkTaps() { return networkTaps; } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of RoutePolicies. It manages RoutePolicy. * @@ -634,12 +653,50 @@ public RoutePolicies routePolicies() { } /** - * Gets wrapped service client AzureNetworkFabricManagementServiceApi providing direct access to the underlying + * Gets the resource collection API of NetworkMonitors. It manages NetworkMonitor. + * + * @return Resource collection API of NetworkMonitors. + */ + public NetworkMonitors networkMonitors() { + if (this.networkMonitors == null) { + this.networkMonitors = new NetworkMonitorsImpl(clientObject.getNetworkMonitors(), this); + } + return networkMonitors; + } + + /** + * Gets the resource collection API of NetworkBootstrapDevices. It manages NetworkBootstrapDevice. + * + * @return Resource collection API of NetworkBootstrapDevices. + */ + public NetworkBootstrapDevices networkBootstrapDevices() { + if (this.networkBootstrapDevices == null) { + this.networkBootstrapDevices + = new NetworkBootstrapDevicesImpl(clientObject.getNetworkBootstrapDevices(), this); + } + return networkBootstrapDevices; + } + + /** + * Gets the resource collection API of NetworkBootstrapInterfaces. It manages NetworkBootstrapInterface. + * + * @return Resource collection API of NetworkBootstrapInterfaces. + */ + public NetworkBootstrapInterfaces networkBootstrapInterfaces() { + if (this.networkBootstrapInterfaces == null) { + this.networkBootstrapInterfaces + = new NetworkBootstrapInterfacesImpl(clientObject.getNetworkBootstrapInterfaces(), this); + } + return networkBootstrapInterfaces; + } + + /** + * Gets wrapped service client ManagedNetworkFabricManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client AzureNetworkFabricManagementServiceApi. + * @return Wrapped service client ManagedNetworkFabricManagementClient. */ - public AzureNetworkFabricManagementServiceApi serviceClient() { + public ManagedNetworkFabricManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java index 7749316e9357..309d6bbd1773 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -22,43 +23,34 @@ */ public interface AccessControlListsClient { /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String accessControlListName, Context context); /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName); /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -67,14 +59,13 @@ SyncPoller, AccessControlListInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner body); /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -84,47 +75,43 @@ SyncPoller, AccessControlListInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner body, Context context); /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response}. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String accessControlListName, Context context); + AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body); /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName); + AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body, + Context context); /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -140,8 +127,6 @@ SyncPoller, AccessControlListInner> beginUpda String accessControlListName, AccessControlListPatch body); /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +143,6 @@ SyncPoller, AccessControlListInner> beginUpda String accessControlListName, AccessControlListPatch body, Context context); /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,8 +157,6 @@ SyncPoller, AccessControlListInner> beginUpda AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body); /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -192,8 +173,6 @@ AccessControlListInner update(String resourceGroupName, String accessControlList Context context); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -207,8 +186,6 @@ AccessControlListInner update(String resourceGroupName, String accessControlList SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -224,8 +201,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +213,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String accessControlListName); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,22 +226,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String accessControlListName, Context context); /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -276,40 +245,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,16 +281,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -337,16 +298,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -355,15 +314,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -373,15 +330,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -389,15 +344,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -406,15 +359,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName, Context context); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -422,14 +373,12 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -438,15 +387,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName, Context context); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -454,15 +401,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -471,15 +416,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName, Context context); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -487,14 +430,12 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -503,7 +444,7 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java index 536ab3d6de1a..0768c435f97b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** @@ -21,45 +23,36 @@ */ public interface ExternalNetworksClient { /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the External Network resource. + * @return defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -69,15 +62,13 @@ SyncPoller, ExternalNetworkInner> beginCreate(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -88,49 +79,46 @@ ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context); /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response}. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context); + ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkInner body); /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); + ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkInner body, Context context); /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -147,8 +135,6 @@ SyncPoller, ExternalNetworkInner> beginUpdate(S String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body); /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -166,8 +152,6 @@ SyncPoller, ExternalNetworkInner> beginUpdate(S String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context); /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -184,8 +168,6 @@ ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa ExternalNetworkPatch body); /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -203,8 +185,6 @@ ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa ExternalNetworkPatch body, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +200,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +216,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String externalNetworkName, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +229,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +243,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +250,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,15 +264,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -312,16 +280,14 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -332,16 +298,14 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -351,15 +315,13 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -370,15 +332,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -388,16 +348,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -408,16 +366,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -427,15 +383,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -446,9 +400,79 @@ CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java index 0b934b226256..47bb23c00fb9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,13 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** @@ -21,45 +25,36 @@ */ public interface InternalNetworksClient { /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Internal Network resource. + * @return a InternalNetworks along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Internal Network resource. + * @return a InternalNetworks. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -69,15 +64,13 @@ SyncPoller, InternalNetworkInner> beginCreate(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -88,49 +81,46 @@ InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context); /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks along with {@link Response}. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context); + InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkInner body); /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); + InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkInner body, Context context); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -147,8 +137,6 @@ SyncPoller, InternalNetworkInner> beginUpdate(S String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -166,8 +154,6 @@ SyncPoller, InternalNetworkInner> beginUpdate(S String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -184,8 +170,6 @@ InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa InternalNetworkPatch body); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -203,8 +187,6 @@ InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa InternalNetworkPatch body, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +202,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +218,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String internalNetworkName, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +231,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +245,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +252,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,16 +266,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -312,17 +282,15 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -332,17 +300,15 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -351,16 +317,14 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -370,15 +334,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -388,16 +350,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkUpdateBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body); + String internalNetworkName, InternalNetworkUpdateBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -408,16 +368,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkUpdateBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context); + String internalNetworkName, InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -427,15 +385,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkUpdateBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -446,15 +403,14 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkUpdateBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -464,16 +420,14 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -484,16 +438,14 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -503,15 +455,13 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -522,9 +472,79 @@ CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java index 86aea9efb00d..d2607cc227de 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,8 +19,34 @@ */ public interface InternetGatewayRulesClient { /** - * Creates an Internet Gateway rule. + * Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayRuleName, Context context); + + /** + * Gets an Internet Gateway Rule resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); + + /** * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -36,8 +62,6 @@ SyncPoller, InternetGatewayRuleInner> begin String internetGatewayRuleName, InternetGatewayRuleInner body); /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,8 +78,6 @@ SyncPoller, InternetGatewayRuleInner> begin String internetGatewayRuleName, InternetGatewayRuleInner body, Context context); /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -71,8 +93,6 @@ InternetGatewayRuleInner create(String resourceGroupName, String internetGateway InternetGatewayRuleInner body); /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,40 +109,6 @@ InternetGatewayRuleInner create(String resourceGroupName, String internetGateway InternetGatewayRuleInner body, Context context); /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayRuleName, Context context); - - /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); - - /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -138,8 +124,6 @@ SyncPoller, InternetGatewayRuleInner> begin String internetGatewayRuleName, InternetGatewayRulePatch body); /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -156,8 +140,6 @@ SyncPoller, InternetGatewayRuleInner> begin String internetGatewayRuleName, InternetGatewayRulePatch body, Context context); /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -173,8 +155,6 @@ InternetGatewayRuleInner update(String resourceGroupName, String internetGateway InternetGatewayRulePatch body); /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -191,8 +171,6 @@ InternetGatewayRuleInner update(String resourceGroupName, String internetGateway InternetGatewayRulePatch body, Context context); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ InternetGatewayRuleInner update(String resourceGroupName, String internetGateway SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String internetGatewayRuleName); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String internetGatewayRuleName, Context context); /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java index 0ab5ac5879d5..65abb1138168 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,43 +19,34 @@ */ public interface InternetGatewaysClient { /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String internetGatewayName, + Context context); /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName); /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -64,14 +55,13 @@ SyncPoller, InternetGatewayInner> beginCreate(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner body); /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,52 +71,48 @@ SyncPoller, InternetGatewayInner> beginCreate(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner body, Context context); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response}. + * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String internetGatewayName, - Context context); + InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName); + InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, + Context context); /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -137,13 +123,11 @@ SyncPoller, InternetGatewayInner> beginUpdate(S String internetGatewayName, InternetGatewayPatch body); /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -155,13 +139,11 @@ SyncPoller, InternetGatewayInner> beginUpdate(S String internetGatewayName, InternetGatewayPatch body, Context context); /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -171,13 +153,11 @@ SyncPoller, InternetGatewayInner> beginUpdate(S InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body); /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -189,8 +169,6 @@ InternetGatewayInner update(String resourceGroupName, String internetGatewayName Context context); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -204,8 +182,6 @@ InternetGatewayInner update(String resourceGroupName, String internetGatewayName SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -221,8 +197,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -235,8 +209,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String internetGatewayName); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -250,22 +222,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String internetGatewayName, Context context); /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -273,33 +241,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java index 882f59571d41..370a929561fc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,43 +19,34 @@ */ public interface IpCommunitiesClient { /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, + Context context); /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Community resource definition. + * @return the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -64,14 +55,13 @@ SyncPoller, IpCommunityInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner body); /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,46 +71,42 @@ SyncPoller, IpCommunityInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner body, Context context); /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response}. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, - Context context); + IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body); /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName); + IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, Context context); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +122,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re String ipCommunityName, IpCommunityPatch body); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -154,8 +138,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re String ipCommunityName, IpCommunityPatch body, Context context); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -170,8 +152,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -187,8 +167,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +180,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +194,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName, Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +206,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re void delete(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +219,18 @@ SyncPoller, IpCommunityInner> beginUpdate(String re void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +238,29 @@ SyncPoller, IpCommunityInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java index 5be8bb4fb566..7e4a9200145e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,8 +19,34 @@ */ public interface IpExtendedCommunitiesClient { /** - * Create an IP Extended Community. + * Implements IP Extended Community GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IP Extended Community resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String ipExtendedCommunityName, Context context); + + /** + * Implements IP Extended Community GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IP Extended Community resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); + + /** * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -36,8 +62,6 @@ SyncPoller, IpExtendedCommunityInner> begin String ipExtendedCommunityName, IpExtendedCommunityInner body); /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,8 +78,6 @@ SyncPoller, IpExtendedCommunityInner> begin String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context); /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -71,8 +93,6 @@ IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommu IpExtendedCommunityInner body); /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,40 +109,6 @@ IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommu IpExtendedCommunityInner body, Context context); /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String ipExtendedCommunityName, Context context); - - /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); - - /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -138,8 +124,6 @@ SyncPoller, IpExtendedCommunityInner> begin String ipExtendedCommunityName, IpExtendedCommunityPatch body); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -156,8 +140,6 @@ SyncPoller, IpExtendedCommunityInner> begin String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -173,8 +155,6 @@ IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommu IpExtendedCommunityPatch body); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -191,8 +171,6 @@ IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommu IpExtendedCommunityPatch body, Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommu SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String ipExtendedCommunityName, Context context); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java index fde7a73f7612..f02098ee3e6c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,43 +19,34 @@ */ public interface IpPrefixesClient { /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, - IpPrefixInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, + Context context); /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, - IpPrefixInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -64,14 +55,13 @@ SyncPoller, IpPrefixInner> beginCreate(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, + IpPrefixInner body); /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,46 +71,42 @@ SyncPoller, IpPrefixInner> beginCreate(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, + IpPrefixInner body, Context context); /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, - Context context); + IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body); /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName); + IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +122,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource IpPrefixPatch body); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -154,8 +138,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource IpPrefixPatch body, Context context); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -170,8 +152,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -187,8 +167,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +180,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +194,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +206,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource void delete(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +219,18 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource void delete(String resourceGroupName, String ipPrefixName, Context context); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +238,29 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java index ac85ee1f8539..1cee6a3d3d70 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -23,8 +23,34 @@ */ public interface L2IsolationDomainsClient { /** - * Create L2 Isolation Domain. + * Implements L2 Isolation Domain GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L2 Isolation Domain resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context); + + /** + * Implements L2 Isolation Domain GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L2 Isolation Domain resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); + + /** * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -41,8 +67,6 @@ SyncPoller, L2IsolationDomainInner> beginCrea String l2IsolationDomainName, L2IsolationDomainInner body); /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -60,8 +84,6 @@ SyncPoller, L2IsolationDomainInner> beginCrea String l2IsolationDomainName, L2IsolationDomainInner body, Context context); /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -77,8 +99,6 @@ SyncPoller, L2IsolationDomainInner> beginCrea L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body); /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -96,40 +116,6 @@ L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomain Context context); /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String l2IsolationDomainName, Context context); - - /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); - - /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -145,8 +131,6 @@ SyncPoller, L2IsolationDomainInner> beginUpda String l2IsolationDomainName, L2IsolationDomainPatch body); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,8 +147,6 @@ SyncPoller, L2IsolationDomainInner> beginUpda String l2IsolationDomainName, L2IsolationDomainPatch body, Context context); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -179,8 +161,6 @@ SyncPoller, L2IsolationDomainInner> beginUpda L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -197,8 +177,6 @@ L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomain Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -212,8 +190,6 @@ L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomain SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -229,8 +205,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,8 +217,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -258,8 +230,53 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. + * Displays L2IsolationDomains list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays L2IsolationDomains list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays L2IsolationDomains list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Displays L2IsolationDomains list by subscription GET method. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -268,16 +285,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -287,16 +302,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -305,15 +318,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -323,10 +334,10 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** @@ -337,7 +348,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -352,7 +363,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -366,7 +377,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName); @@ -380,15 +391,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -396,15 +405,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -413,15 +420,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -429,15 +434,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -446,64 +449,9 @@ CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java index bdb3981c39ce..01d2275bed3a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -23,8 +23,34 @@ */ public interface L3IsolationDomainsClient { /** - * Create L3 Isolation Domain. + * Retrieves details of this L3 Isolation Domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L3 Isolation Domain resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context); + + /** + * Retrieves details of this L3 Isolation Domain. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L3 Isolation Domain resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); + + /** * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -42,8 +68,6 @@ SyncPoller, L3IsolationDomainInner> beginCrea String l3IsolationDomainName, L3IsolationDomainInner body); /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -62,8 +86,6 @@ SyncPoller, L3IsolationDomainInner> beginCrea String l3IsolationDomainName, L3IsolationDomainInner body, Context context); /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -80,8 +102,6 @@ SyncPoller, L3IsolationDomainInner> beginCrea L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body); /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -100,40 +120,6 @@ L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomain Context context); /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String l3IsolationDomainName, Context context); - - /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); - - /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -149,8 +135,6 @@ SyncPoller, L3IsolationDomainInner> beginUpda String l3IsolationDomainName, L3IsolationDomainPatch body); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -167,8 +151,6 @@ SyncPoller, L3IsolationDomainInner> beginUpda String l3IsolationDomainName, L3IsolationDomainPatch body, Context context); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -183,8 +165,6 @@ SyncPoller, L3IsolationDomainInner> beginUpda L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -201,8 +181,6 @@ L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomain Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -216,8 +194,6 @@ L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomain SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -233,8 +209,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,8 +221,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -262,22 +234,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -285,41 +253,35 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -327,17 +289,15 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -346,17 +306,15 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -364,16 +322,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -382,10 +338,10 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); /** @@ -396,7 +352,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -411,7 +367,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -425,7 +381,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName); @@ -439,15 +395,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -455,15 +409,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -472,15 +424,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -488,15 +438,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -505,7 +453,7 @@ CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ManagedNetworkFabricManagementClient.java similarity index 86% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ManagedNetworkFabricManagementClient.java index a2020fe15fd7..83504c087e97 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ManagedNetworkFabricManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for AzureNetworkFabricManagementServiceApi class. + * The interface for ManagedNetworkFabricManagementClient class. */ -public interface AzureNetworkFabricManagementServiceApi { +public interface ManagedNetworkFabricManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,18 +47,18 @@ public interface AzureNetworkFabricManagementServiceApi { Duration getDefaultPollInterval(); /** - * Gets the AccessControlListsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AccessControlListsClient object. + * @return the OperationsClient object. */ - AccessControlListsClient getAccessControlLists(); + OperationsClient getOperations(); /** - * Gets the InternetGatewaysClient object to access its operations. + * Gets the AccessControlListsClient object to access its operations. * - * @return the InternetGatewaysClient object. + * @return the AccessControlListsClient object. */ - InternetGatewaysClient getInternetGateways(); + AccessControlListsClient getAccessControlLists(); /** * Gets the InternetGatewayRulesClient object to access its operations. @@ -67,6 +67,13 @@ public interface AzureNetworkFabricManagementServiceApi { */ InternetGatewayRulesClient getInternetGatewayRules(); + /** + * Gets the InternetGatewaysClient object to access its operations. + * + * @return the InternetGatewaysClient object. + */ + InternetGatewaysClient getInternetGateways(); + /** * Gets the IpCommunitiesClient object to access its operations. * @@ -201,16 +208,30 @@ public interface AzureNetworkFabricManagementServiceApi { NetworkTapsClient getNetworkTaps(); /** - * Gets the OperationsClient object to access its operations. + * Gets the RoutePoliciesClient object to access its operations. * - * @return the OperationsClient object. + * @return the RoutePoliciesClient object. */ - OperationsClient getOperations(); + RoutePoliciesClient getRoutePolicies(); /** - * Gets the RoutePoliciesClient object to access its operations. + * Gets the NetworkMonitorsClient object to access its operations. * - * @return the RoutePoliciesClient object. + * @return the NetworkMonitorsClient object. */ - RoutePoliciesClient getRoutePolicies(); + NetworkMonitorsClient getNetworkMonitors(); + + /** + * Gets the NetworkBootstrapDevicesClient object to access its operations. + * + * @return the NetworkBootstrapDevicesClient object. + */ + NetworkBootstrapDevicesClient getNetworkBootstrapDevices(); + + /** + * Gets the NetworkBootstrapInterfacesClient object to access its operations. + * + * @return the NetworkBootstrapInterfacesClient object. + */ + NetworkBootstrapInterfacesClient getNetworkBootstrapInterfaces(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java index 7ed3d93fdf8e..94a84012f2c1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; /** @@ -19,8 +20,34 @@ */ public interface NeighborGroupsClient { /** - * Creates the Neighbor Group. + * Gets the Neighbor Group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String neighborGroupName, + Context context); + + /** + * Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName); + + /** * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -36,8 +63,6 @@ SyncPoller, NeighborGroupInner> beginCreate(Strin String neighborGroupName, NeighborGroupInner body); /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,8 +79,6 @@ SyncPoller, NeighborGroupInner> beginCreate(Strin String neighborGroupName, NeighborGroupInner body, Context context); /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,8 +93,6 @@ SyncPoller, NeighborGroupInner> beginCreate(Strin NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body); /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -88,40 +109,6 @@ NeighborGroupInner create(String resourceGroupName, String neighborGroupName, Ne Context context); /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String neighborGroupName, - Context context); - - /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName); - - /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -137,8 +124,6 @@ SyncPoller, NeighborGroupInner> beginUpdate(Strin String neighborGroupName, NeighborGroupPatch body); /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -155,8 +140,6 @@ SyncPoller, NeighborGroupInner> beginUpdate(Strin String neighborGroupName, NeighborGroupPatch body, Context context); /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -171,8 +154,6 @@ SyncPoller, NeighborGroupInner> beginUpdate(Strin NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body); /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -189,8 +170,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne Context context); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -204,8 +183,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +197,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName, Context context); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -234,8 +209,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne void delete(String resourceGroupName, String neighborGroupName); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -249,22 +222,18 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne void delete(String resourceGroupName, String neighborGroupName, Context context); /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -272,34 +241,86 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupResyncResponseInner> + beginResync(String resourceGroupName, String neighborGroupName); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupResyncResponseInner> + beginResync(String resourceGroupName, String neighborGroupName, Context context); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupResyncResponseInner resync(String resourceGroupName, String neighborGroupName); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupResyncResponseInner resync(String resourceGroupName, String neighborGroupName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapDevicesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapDevicesClient.java new file mode 100644 index 000000000000..fb6722e8bff5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapDevicesClient.java @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevicePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; + +/** + * An instance of this class provides access to all the operations defined in NetworkBootstrapDevicesClient. + */ +public interface NetworkBootstrapDevicesClient { + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceInner getByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceInner> + beginCreate(String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body); + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body, Context context); + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceInner create(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body); + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceInner create(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body, Context context); + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceInner> + beginUpdate(String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body); + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body, Context context); + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceInner update(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body); + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceInner update(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body, Context context); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + Context context); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkBootstrapDeviceName, Context context); + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceRebootResponseInner> + beginReboot(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceRebootResponseInner> + beginReboot(String resourceGroupName, String networkBootstrapDeviceName, Context context); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceRebootResponseInner reboot(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceRebootResponseInner reboot(String resourceGroupName, String networkBootstrapDeviceName, + Context context); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkBootstrapDeviceName, Context context); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkBootstrapDeviceName, UpdateVersion body); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkBootstrapDeviceName, UpdateVersion body, Context context); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body, Context context); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + UpdateDeviceAdministrativeState body); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + UpdateDeviceAdministrativeState body, Context context); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body, Context context); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkBootstrapDeviceName, Context context); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapInterfacesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapInterfacesClient.java new file mode 100644 index 000000000000..46871aaf6700 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapInterfacesClient.java @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfacePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +/** + * An instance of this class provides access to all the operations defined in NetworkBootstrapInterfacesClient. + */ +public interface NetworkBootstrapInterfacesClient { + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, Context context); + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapInterfaceInner get(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName); + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapInterfaceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfaceInner body); + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapInterfaceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfaceInner body, Context context); + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapInterfaceInner create(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body); + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapInterfaceInner create(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body, Context context); + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapInterfaceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfacePatch body); + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkBootstrapInterfaceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfacePatch body, Context context); + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapInterfaceInner update(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body); + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkBootstrapInterfaceInner update(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body, Context context); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + Context context); + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, UpdateAdministrativeState body); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, UpdateAdministrativeState body, Context context); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body, + Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java index 454a093d786b..fb1b959f5368 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -16,8 +16,6 @@ */ public interface NetworkDeviceSkusClient { /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -31,8 +29,6 @@ public interface NetworkDeviceSkusClient { Response getWithResponse(String networkDeviceSkuName, Context context); /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -45,27 +41,23 @@ public interface NetworkDeviceSkusClient { NetworkDeviceSkuInner get(String networkDeviceSkuName); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java index 6a57b0b38d8c..0223970f2503 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,20 +11,55 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; /** * An instance of this class provides access to all the operations defined in NetworkDevicesClient. */ public interface NetworkDevicesClient { /** - * Create Network Device. + * Gets the Network Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Device resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkDeviceName, + Context context); + + /** + * Gets the Network Device resource details. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Device resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName); + + /** * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -40,8 +75,6 @@ SyncPoller, NetworkDeviceInner> beginCreate(Strin String networkDeviceName, NetworkDeviceInner body); /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -58,8 +91,6 @@ SyncPoller, NetworkDeviceInner> beginCreate(Strin String networkDeviceName, NetworkDeviceInner body, Context context); /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +105,6 @@ SyncPoller, NetworkDeviceInner> beginCreate(Strin NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body); /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,40 +121,6 @@ NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, Ne Context context); /** - * Gets a Network Device. - * - * Gets the Network Device resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkDeviceName, - Context context); - - /** - * Gets a Network Device. - * - * Gets the Network Device resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName); - - /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -141,8 +136,6 @@ SyncPoller, NetworkDeviceInner> beginUpdate(Strin String networkDeviceName, NetworkDevicePatchParameters body); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -159,8 +152,6 @@ SyncPoller, NetworkDeviceInner> beginUpdate(Strin String networkDeviceName, NetworkDevicePatchParameters body, Context context); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,8 +166,6 @@ SyncPoller, NetworkDeviceInner> beginUpdate(Strin NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -193,8 +182,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,8 +195,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -224,8 +209,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +221,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne void delete(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,22 +234,18 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne void delete(String resourceGroupName, String networkDeviceName, Context context); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -276,40 +253,34 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,15 +289,13 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body); + SyncPoller, OperationStatusResultInner> beginReboot(String resourceGroupName, + String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -336,15 +305,13 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); + SyncPoller, OperationStatusResultInner> beginReboot(String resourceGroupName, + String networkDeviceName, RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -353,15 +320,12 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body); + OperationStatusResultInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -371,15 +335,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body, Context context); + OperationStatusResultInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, + Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -387,15 +349,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkDeviceRefreshConfigurationResponseInner> beginRefreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -404,15 +364,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkDeviceRefreshConfigurationResponseInner> beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -420,15 +378,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + NetworkDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -437,15 +393,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, String networkDeviceName, - Context context); + NetworkDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -454,16 +408,14 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkDeviceUpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -473,16 +425,14 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkDeviceUpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -491,15 +441,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + NetworkDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -509,15 +457,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + NetworkDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -526,15 +472,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body); + SyncPoller, NetworkDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, NetworkDeviceUpgradeRequest body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -544,15 +488,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); + SyncPoller, NetworkDeviceUpgradeResponseInner> beginUpgrade( + String resourceGroupName, String networkDeviceName, NetworkDeviceUpgradeRequest body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -561,15 +503,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body); + NetworkDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -579,9 +519,271 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body, Context context); + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceRunRwCommandResponseInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceRunRwCommandResponseInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceRunRwCommandResponseInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceRunRwCommandResponseInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkDeviceName, Context context); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkDeviceName, + Context context); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkDeviceName, Context context); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkDeviceName, + Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java index 2e75b120c41c..8d75c4d3ec16 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,8 +19,34 @@ */ public interface NetworkFabricControllersClient { /** - * Create Network fabric controller. + * Shows the provisioning status of Network Fabric Controller. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric Controller resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricControllerName, Context context); + + /** + * Shows the provisioning status of Network Fabric Controller. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric Controller resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, String networkFabricControllerName); + + /** * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -36,8 +62,6 @@ public interface NetworkFabricControllersClient { beginCreate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body); /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -55,8 +79,6 @@ SyncPoller, NetworkFabricControllerInne Context context); /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -72,8 +94,6 @@ NetworkFabricControllerInner create(String resourceGroupName, String networkFabr NetworkFabricControllerInner body); /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,40 +110,6 @@ NetworkFabricControllerInner create(String resourceGroupName, String networkFabr NetworkFabricControllerInner body, Context context); /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricControllerName, Context context); - - /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, String networkFabricControllerName); - - /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -139,8 +125,6 @@ Response getByResourceGroupWithResponse(String res beginUpdate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +142,6 @@ SyncPoller, NetworkFabricControllerInne Context context); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,8 +157,6 @@ NetworkFabricControllerInner update(String resourceGroupName, String networkFabr NetworkFabricControllerPatch body); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -193,8 +173,6 @@ NetworkFabricControllerInner update(String resourceGroupName, String networkFabr NetworkFabricControllerPatch body, Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,8 +186,6 @@ NetworkFabricControllerInner update(String resourceGroupName, String networkFabr SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -225,8 +201,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -239,8 +213,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -254,22 +226,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricControllerName, Context context); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -277,33 +245,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java index bc0d0db1ab2d..c4ba89d29cc1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -16,8 +16,6 @@ */ public interface NetworkFabricSkusClient { /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -31,8 +29,6 @@ public interface NetworkFabricSkusClient { Response getWithResponse(String networkFabricSkuName, Context context); /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -45,27 +41,23 @@ public interface NetworkFabricSkusClient { NetworkFabricSkuInner get(String networkFabricSkuName); /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java index 787fbce21d32..6c001529034c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,10 +11,24 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; @@ -25,8 +39,34 @@ */ public interface NetworkFabricsClient { /** - * Create Network Fabric. + * Get Network Fabric resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Get Network Fabric resource details. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName); + + /** * Create Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -42,8 +82,6 @@ SyncPoller, NetworkFabricInner> beginCreate(Strin String networkFabricName, NetworkFabricInner body); /** - * Create Network Fabric. - * * Create Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -60,8 +98,6 @@ SyncPoller, NetworkFabricInner> beginCreate(Strin String networkFabricName, NetworkFabricInner body, Context context); /** - * Create Network Fabric. - * * Create Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -76,8 +112,6 @@ SyncPoller, NetworkFabricInner> beginCreate(Strin NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body); /** - * Create Network Fabric. - * * Create Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -94,40 +128,6 @@ NetworkFabricInner create(String resourceGroupName, String networkFabricName, Ne Context context); /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkFabricName, - Context context); - - /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName); - - /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -143,8 +143,6 @@ SyncPoller, NetworkFabricInner> beginUpdate(Strin String networkFabricName, NetworkFabricPatch body); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -161,8 +159,6 @@ SyncPoller, NetworkFabricInner> beginUpdate(Strin String networkFabricName, NetworkFabricPatch body, Context context); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -177,8 +173,6 @@ SyncPoller, NetworkFabricInner> beginUpdate(Strin NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -195,8 +189,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -210,8 +202,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -226,8 +216,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -240,8 +228,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne void delete(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -255,22 +241,18 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,40 +260,34 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -319,15 +295,13 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, OperationStatusResultInner> beginProvision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -336,15 +310,13 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, OperationStatusResultInner> beginProvision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -352,14 +324,12 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName); + OperationStatusResultInner provision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -368,15 +338,12 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName, - Context context); + OperationStatusResultInner provision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -384,15 +351,13 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, OperationStatusResultInner> beginDeprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -401,15 +366,13 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, OperationStatusResultInner> beginDeprovision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -417,14 +380,12 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName); + OperationStatusResultInner deprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -433,15 +394,12 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName, - Context context); + OperationStatusResultInner deprovision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -450,15 +408,13 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, OperationStatusResultInner> beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -468,16 +424,13 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, - Context context); + SyncPoller, OperationStatusResultInner> beginUpgrade( + String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -486,15 +439,13 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, + OperationStatusResultInner upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -504,15 +455,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, + OperationStatusResultInner upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -520,15 +469,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, OperationStatusResultInner> beginRefreshConfiguration(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -537,15 +484,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, OperationStatusResultInner> beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -553,15 +498,12 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, - String networkFabricName); + OperationStatusResultInner refreshConfiguration(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -570,15 +512,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, String networkFabricName, + OperationStatusResultInner refreshConfiguration(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -588,16 +528,14 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -608,16 +546,14 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -627,15 +563,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -646,15 +580,13 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -663,16 +595,14 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -682,16 +612,14 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -700,15 +628,13 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -718,15 +644,13 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -735,7 +659,7 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -743,8 +667,6 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio ValidateConfigurationProperties body); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -754,7 +676,7 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -762,8 +684,6 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio ValidateConfigurationProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -772,15 +692,13 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -790,15 +708,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -810,12 +726,10 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ValidateConfigurationResponseInner> + SyncPoller, GetTopologyResponseInner> beginGetTopology(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -828,12 +742,10 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ValidateConfigurationResponseInner> + SyncPoller, GetTopologyResponseInner> beginGetTopology(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -844,11 +756,9 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName); + GetTopologyResponseInner getTopology(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -860,11 +770,9 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName, Context context); + GetTopologyResponseInner getTopology(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -872,48 +780,647 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, CommitConfigurationResponseInner> beginCommitConfiguration(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context); + SyncPoller, CommitConfigurationResponseInner> beginCommitConfiguration( + String resourceGroupName, String networkFabricName, CommitConfigurationRequest body, Context context); /** - * Implements the operation to the underlying resources. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommitConfigurationResponseInner commitConfiguration(String resourceGroupName, String networkFabricName); + + /** * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName); + CommitConfigurationResponseInner commitConfiguration(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body, Context context); /** - * Implements the operation to the underlying resources. + * Post action: Returns a status of commit batch operation. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommitBatchStatusOperationResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommitBatchStatusOperationResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body, + Context context); + + /** + * Post action: Returns a status of commit batch operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommitBatchStatusOperationResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommitBatchStatusOperationResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiscardCommitBatchOperationResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiscardCommitBatchOperationResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body, + Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscardCommitBatchOperationResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscardCommitBatchOperationResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginLockFabric( + String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ViewDeviceConfigurationOperationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ViewDeviceConfigurationOperationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ViewDeviceConfigurationOperationResponseInner viewDeviceConfiguration(String resourceGroupName, + String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ViewDeviceConfigurationOperationResponseInner viewDeviceConfiguration(String resourceGroupName, + String networkFabricName, Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArmConfigurationDiffOperationResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArmConfigurationDiffOperationResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName, Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArmConfigurationDiffOperationResponseInner armConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArmConfigurationDiffOperationResponseInner armConfigurationDiff(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricRotatePasswordsResponseInner> + beginRotatePasswords(String resourceGroupName, String networkFabricName); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricRotatePasswordsResponseInner> + beginRotatePasswords(String resourceGroupName, String networkFabricName, Context context); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricRotatePasswordsResponseInner rotatePasswords(String resourceGroupName, String networkFabricName); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricRotatePasswordsResponseInner rotatePasswords(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkFabricName); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkFabricName, Context context); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkFabricName); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricRotateCertificatesResponseInner> + beginRotateCertificates(String resourceGroupName, String networkFabricName); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricRotateCertificatesResponseInner> + beginRotateCertificates(String resourceGroupName, String networkFabricName, Context context); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricRotateCertificatesResponseInner rotateCertificates(String resourceGroupName, String networkFabricName); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricRotateCertificatesResponseInner rotateCertificates(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkFabricName); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkFabricName, Context context); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkFabricName); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -921,9 +1428,9 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName, + NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkFabricName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java index bbc8637bacbc..3dd8c2d4ef55 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -21,45 +21,36 @@ */ public interface NetworkInterfacesClient { /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. + * @return the Network Interface resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context); /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. + * @return the Network Interface resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -69,15 +60,13 @@ SyncPoller, NetworkInterfaceInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body); /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -88,49 +77,46 @@ NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context); /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details along with {@link Response}. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context); + NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner body); /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); + NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner body, Context context); /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -147,8 +133,6 @@ SyncPoller, NetworkInterfaceInner> beginUpdate String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body); /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -166,8 +150,6 @@ SyncPoller, NetworkInterfaceInner> beginUpdate String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, Context context); /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -184,8 +166,6 @@ NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, NetworkInterfacePatch body); /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -203,8 +183,6 @@ NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, NetworkInterfacePatch body, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +198,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +214,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkInterfaceName, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +227,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +241,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +248,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,15 +262,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -312,16 +278,14 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -332,16 +296,14 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -351,15 +313,13 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -370,9 +330,9 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java new file mode 100644 index 000000000000..0efdd0582985 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +/** + * An instance of this class provides access to all the operations defined in NetworkMonitorsClient. + */ +public interface NetworkMonitorsClient { + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context); + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner getByResourceGroup(String resourceGroupName, String networkMonitorName); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body, Context context); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner body); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner body, + Context context); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body, Context context); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch body); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch body, + Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkMonitorName, + Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkMonitorName, Context context); + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body, Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java index fa835f22fc66..4e9ab43526fd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,8 +19,34 @@ */ public interface NetworkPacketBrokersClient { /** - * Create Network Packet Broker. + * Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkPacketBrokerName, Context context); + + /** + * Retrieves details of this Network Packet Broker. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); + + /** * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -36,8 +62,6 @@ SyncPoller, NetworkPacketBrokerInner> begin String networkPacketBrokerName, NetworkPacketBrokerInner body); /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,8 +78,6 @@ SyncPoller, NetworkPacketBrokerInner> begin String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context); /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -71,8 +93,6 @@ NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBr NetworkPacketBrokerInner body); /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,40 +109,6 @@ NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBr NetworkPacketBrokerInner body, Context context); /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String networkPacketBrokerName, Context context); - - /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); - - /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -138,8 +124,6 @@ SyncPoller, NetworkPacketBrokerInner> begin String networkPacketBrokerName, NetworkPacketBrokerPatch body); /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -156,8 +140,6 @@ SyncPoller, NetworkPacketBrokerInner> begin String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context); /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -173,8 +155,6 @@ NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBr NetworkPacketBrokerPatch body); /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -191,8 +171,6 @@ NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBr NetworkPacketBrokerPatch body, Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBr SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkPacketBrokerName); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkPacketBrokerName, Context context); /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java index fb1d067a5ef3..e85f5a79052e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -12,50 +12,41 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; /** * An instance of this class provides access to all the operations defined in NetworkRacksClient. */ public interface NetworkRacksClient { /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Rack resource definition. + * @return network Rack resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + Context context); /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Rack resource definition. + * @return network Rack resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName); /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -64,14 +55,13 @@ SyncPoller, NetworkRackInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner body); /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,46 +71,42 @@ SyncPoller, NetworkRackInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner body, Context context); /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details along with {@link Response}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, - Context context); + NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body); /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName); + NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, Context context); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,11 +119,9 @@ Response getByResourceGroupWithResponse(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body); + String networkRackName, NetworkRackPatch body); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -151,11 +135,9 @@ SyncPoller, NetworkRackInner> beginUpdate(String re */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context); + String networkRackName, NetworkRackPatch body, Context context); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -167,11 +149,9 @@ SyncPoller, NetworkRackInner> beginUpdate(String re * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body); + NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -184,11 +164,9 @@ SyncPoller, NetworkRackInner> beginUpdate(String re * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context); + NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +180,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +194,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName, Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +206,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re void delete(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +219,18 @@ SyncPoller, NetworkRackInner> beginUpdate(String re void delete(String resourceGroupName, String networkRackName, Context context); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +238,29 @@ SyncPoller, NetworkRackInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java index 669a34aa3346..af74b9064172 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -22,8 +23,34 @@ */ public interface NetworkTapRulesClient { /** - * Create Network Tap Rule. + * Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapRuleName, + Context context); + + /** + * Get Network Tap Rule resource details. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName); + + /** * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -39,8 +66,6 @@ SyncPoller, NetworkTapRuleInner> beginCreate(Str String networkTapRuleName, NetworkTapRuleInner body); /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -57,8 +82,6 @@ SyncPoller, NetworkTapRuleInner> beginCreate(Str String networkTapRuleName, NetworkTapRuleInner body, Context context); /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -73,8 +96,6 @@ SyncPoller, NetworkTapRuleInner> beginCreate(Str NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body); /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,40 +112,6 @@ NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, Context context); /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapRuleName, - Context context); - - /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName); - - /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -140,8 +127,6 @@ SyncPoller, NetworkTapRuleInner> beginUpdate(Str String networkTapRuleName, NetworkTapRulePatch body); /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +143,6 @@ SyncPoller, NetworkTapRuleInner> beginUpdate(Str String networkTapRuleName, NetworkTapRulePatch body, Context context); /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,8 +157,6 @@ SyncPoller, NetworkTapRuleInner> beginUpdate(Str NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body); /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -192,8 +173,6 @@ NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, Context context); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -207,8 +186,6 @@ NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -224,8 +201,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +213,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkTapRuleName); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,22 +226,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkTapRuleName, Context context); /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -276,40 +245,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,7 +281,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -326,8 +289,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -337,7 +298,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -345,8 +306,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body, Context context); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -355,15 +314,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -373,15 +330,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -389,15 +344,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkTapRuleResyncResponseInner> beginResync(String resourceGroupName, String networkTapRuleName); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -406,15 +359,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkTapRuleResyncResponseInner> beginResync(String resourceGroupName, String networkTapRuleName, Context context); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -422,14 +373,12 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName); + NetworkTapRuleResyncResponseInner resync(String resourceGroupName, String networkTapRuleName); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -438,15 +387,12 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName, - Context context); + NetworkTapRuleResyncResponseInner resync(String resourceGroupName, String networkTapRuleName, Context context); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -454,15 +400,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -471,15 +415,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName, Context context); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -487,14 +429,12 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -503,7 +443,7 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java index 9f64a116595a..1561d5c2164f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -22,43 +22,34 @@ */ public interface NetworkTapsClient { /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, + Context context); /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName); /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -67,14 +58,13 @@ SyncPoller, NetworkTapInner> beginCreate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner body); /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -84,46 +74,42 @@ SyncPoller, NetworkTapInner> beginCreate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner body, Context context); /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response}. + * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, - Context context); + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body); /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName); + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, Context context); /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -139,8 +125,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso String networkTapName, NetworkTapPatch body); /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -157,8 +141,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso String networkTapName, NetworkTapPatch body, Context context); /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -173,8 +155,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body); /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -190,8 +170,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -205,8 +183,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -221,8 +197,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName, Context context); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -235,8 +209,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso void delete(String resourceGroupName, String networkTapName); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -250,22 +222,18 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso void delete(String resourceGroupName, String networkTapName, Context context); /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -273,40 +241,34 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -315,15 +277,13 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -333,16 +293,14 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -351,15 +309,13 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -369,15 +325,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body, Context context); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -385,15 +339,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkTapResyncResponseInner> beginResync(String resourceGroupName, String networkTapName); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -402,15 +354,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, NetworkTapResyncResponseInner> beginResync(String resourceGroupName, String networkTapName, Context context); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -418,14 +368,12 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName); + NetworkTapResyncResponseInner resync(String resourceGroupName, String networkTapName); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -434,9 +382,8 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName, - Context context); + NetworkTapResyncResponseInner resync(String resourceGroupName, String networkTapName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java index 4938f8fa140a..654651d5bc0b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** @@ -21,8 +23,37 @@ */ public interface NetworkToNetworkInterconnectsClient { /** - * Configuration used to setup CE-PE connectivity. + * Implements NetworkToNetworkInterconnects GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, Context context); + + /** + * Implements NetworkToNetworkInterconnects GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName); + + /** * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -40,8 +71,6 @@ SyncPoller, NetworkToNetworkInterc NetworkToNetworkInterconnectInner body); /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -60,8 +89,6 @@ SyncPoller, NetworkToNetworkInterc NetworkToNetworkInterconnectInner body, Context context); /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -78,8 +105,6 @@ NetworkToNetworkInterconnectInner create(String resourceGroupName, String networ String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body); /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -97,43 +122,6 @@ NetworkToNetworkInterconnectInner create(String resourceGroupName, String networ String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context); /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context); - - /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName); - - /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -151,8 +139,6 @@ SyncPoller, NetworkToNetworkInterc NetworkToNetworkInterconnectPatch body); /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -171,8 +157,6 @@ SyncPoller, NetworkToNetworkInterc NetworkToNetworkInterconnectPatch body, Context context); /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -189,8 +173,6 @@ NetworkToNetworkInterconnectInner update(String resourceGroupName, String networ String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body); /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,8 +190,6 @@ NetworkToNetworkInterconnectInner update(String resourceGroupName, String networ String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -225,8 +205,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,8 +221,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkToNetworkInterconnectName, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -258,8 +234,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,8 +249,6 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo Context context); /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -284,15 +256,13 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName); /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -301,15 +271,13 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -319,16 +287,14 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -339,16 +305,14 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -358,15 +322,13 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -377,16 +339,14 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponseInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -396,16 +356,14 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -416,34 +374,64 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, UpdateAdministrativeState body); + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NniUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body); + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -454,10 +442,44 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NniUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, Context context); + + /** + * Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + NniUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body); + + /** + * Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NniUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java index 9e25c5990e32..c4ab3c48a5e6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Returns list of all operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java index 497d5d595070..cffa10f2eb9f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,9 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -23,43 +23,34 @@ */ public interface RoutePoliciesClient { /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, + Context context); /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -68,14 +59,13 @@ SyncPoller, RoutePolicyInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner body); /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -85,46 +75,42 @@ SyncPoller, RoutePolicyInner> beginCreate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner body, Context context); /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response}. + * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, - Context context); + RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body); /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName); + RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, Context context); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -140,8 +126,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re String routePolicyName, RoutePolicyPatch body); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +142,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re String routePolicyName, RoutePolicyPatch body, Context context); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,8 +156,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -191,8 +171,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -222,8 +198,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName, Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -236,8 +210,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re void delete(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -251,22 +223,18 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re void delete(String resourceGroupName, String routePolicyName, Context context); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -274,40 +242,34 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -316,16 +278,14 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -335,16 +295,14 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -353,15 +311,13 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -371,11 +327,11 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body, Context context); /** * Validates the configuration of the resources. @@ -385,7 +341,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -400,7 +356,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -414,7 +370,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName); @@ -428,15 +384,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -444,15 +398,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -461,15 +413,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -477,14 +427,12 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -493,7 +441,7 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java index 7c86a066724b..fd86244ebd0b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java @@ -1,22 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -29,7 +33,7 @@ @Fluent public final class AccessControlListInner extends Resource { /* - * Resource properties. + * The Access ControlList properties. */ private AccessControlListProperties innerProperties = new AccessControlListProperties(); @@ -60,7 +64,7 @@ public AccessControlListInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Access ControlList properties. * * @return the innerProperties value. */ @@ -126,39 +130,26 @@ public AccessControlListInner withTags(Map tags) { } /** - * Get the lastSyncedTime property: The last synced timestamp. - * - * @return the lastSyncedTime value. - */ - public OffsetDateTime lastSyncedTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); - } - - /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the AccessControlListInner object itself. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public AccessControlListInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** @@ -281,44 +272,152 @@ public List dynamicMatchConfigurations() { } /** - * Get the annotation property: Switch configuration description. + * Get the lastSyncedTime property: The last synced timestamp. * - * @return the annotation value. + * @return the lastSyncedTime value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public OffsetDateTime lastSyncedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); } /** - * Set the annotation property: Switch configuration description. + * Get the aclType property: Access Control List (ACL) Type. * - * @param annotation the annotation value to set. + * @return the aclType value. + */ + public AclType aclType() { + return this.innerProperties() == null ? null : this.innerProperties().aclType(); + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. * @return the AccessControlListInner object itself. */ - public AccessControlListInner withAnnotation(String annotation) { + public AccessControlListInner withAclType(AclType aclType) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withAclType(aclType); return this; } /** - * Validates the instance. + * Get the deviceRole property: Device Role. + * + * @return the deviceRole value. + */ + public DeviceRole deviceRole() { + return this.innerProperties() == null ? null : this.innerProperties().deviceRole(); + } + + /** + * Set the deviceRole property: Device Role. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListInner object itself. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AccessControlListInner")); - } else { - innerProperties().validate(); + public AccessControlListInner withDeviceRole(DeviceRole deviceRole) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); } + this.innerProperties().withDeviceRole(deviceRole); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListInner.class); + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionProperties globalAccessControlListActions() { + return this.innerProperties() == null ? null : this.innerProperties().globalAccessControlListActions(); + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListInner object itself. + */ + public AccessControlListInner + withGlobalAccessControlListActions(GlobalAccessControlListActionProperties globalAccessControlListActions) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); + } + this.innerProperties().withGlobalAccessControlListActions(globalAccessControlListActions); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricIds(); + } + + /** + * Get the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @return the controlPlaneAclConfiguration value. + */ + public List controlPlaneAclConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAclConfiguration(); + } + + /** + * Set the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @param controlPlaneAclConfiguration the controlPlaneAclConfiguration value to set. + * @return the AccessControlListInner object itself. + */ + public AccessControlListInner + withControlPlaneAclConfiguration(List controlPlaneAclConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); + } + this.innerProperties().withControlPlaneAclConfiguration(controlPlaneAclConfiguration); + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java index ef9cc820b6b0..5532a6ad727d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java @@ -1,18 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; import java.io.IOException; import java.util.List; @@ -20,7 +24,52 @@ * Access Control Lists patch properties. */ @Fluent -public final class AccessControlListPatchProperties extends AccessControlListPatchableProperties { +public final class AccessControlListPatchProperties implements JsonSerializable { + /* + * Input method to configure Access Control List. + */ + private ConfigurationType configurationType; + + /* + * Access Control List file URL. + */ + private String aclsUrl; + + /* + * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + */ + private CommunityActionTypes defaultAction; + + /* + * List of match configurations. + */ + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + private List dynamicMatchConfigurations; + + /* + * Access Control List (ACL) configurations. + */ + private List controlPlaneAclConfiguration; + + /* + * Access Control List (ACL) Type + */ + private AclType aclType; + + /* + * Device Role + */ + private DeviceRole deviceRole; + + /* + * Global Access Control List (ACL) actions + */ + private GlobalAccessControlListActionPatchProperties globalAccessControlListActions; + /* * Switch configuration description. */ @@ -33,85 +82,209 @@ public AccessControlListPatchProperties() { } /** - * Get the annotation property: Switch configuration description. + * Get the configurationType property: Input method to configure Access Control List. * - * @return the annotation value. + * @return the configurationType value. */ - public String annotation() { - return this.annotation; + public ConfigurationType configurationType() { + return this.configurationType; } /** - * Set the annotation property: Switch configuration description. + * Set the configurationType property: Input method to configure Access Control List. * - * @param annotation the annotation value to set. + * @param configurationType the configurationType value to set. * @return the AccessControlListPatchProperties object itself. */ - public AccessControlListPatchProperties withAnnotation(String annotation) { - this.annotation = annotation; + public AccessControlListPatchProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; return this; } /** - * {@inheritDoc} + * Get the aclsUrl property: Access Control List file URL. + * + * @return the aclsUrl value. */ - @Override - public AccessControlListPatchProperties withConfigurationType(ConfigurationType configurationType) { - super.withConfigurationType(configurationType); - return this; + public String aclsUrl() { + return this.aclsUrl; } /** - * {@inheritDoc} + * Set the aclsUrl property: Access Control List file URL. + * + * @param aclsUrl the aclsUrl value to set. + * @return the AccessControlListPatchProperties object itself. */ - @Override public AccessControlListPatchProperties withAclsUrl(String aclsUrl) { - super.withAclsUrl(aclsUrl); + this.aclsUrl = aclsUrl; return this; } /** - * {@inheritDoc} + * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @return the defaultAction value. + */ + public CommunityActionTypes defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @param defaultAction the defaultAction value to set. + * @return the AccessControlListPatchProperties object itself. */ - @Override public AccessControlListPatchProperties withDefaultAction(CommunityActionTypes defaultAction) { - super.withDefaultAction(defaultAction); + this.defaultAction = defaultAction; return this; } /** - * {@inheritDoc} + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the AccessControlListPatchProperties object itself. */ - @Override public AccessControlListPatchProperties - withMatchConfigurations(List matchConfigurations) { - super.withMatchConfigurations(matchConfigurations); + withMatchConfigurations(List matchConfigurations) { + this.matchConfigurations = matchConfigurations; return this; } /** - * {@inheritDoc} + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the AccessControlListPatchProperties object itself. */ - @Override public AccessControlListPatchProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { - super.withDynamicMatchConfigurations(dynamicMatchConfigurations); + withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; return this; } /** - * Validates the instance. + * Get the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the controlPlaneAclConfiguration value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public List controlPlaneAclConfiguration() { + return this.controlPlaneAclConfiguration; + } + + /** + * Set the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @param controlPlaneAclConfiguration the controlPlaneAclConfiguration value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties + withControlPlaneAclConfiguration(List controlPlaneAclConfiguration) { + this.controlPlaneAclConfiguration = controlPlaneAclConfiguration; + return this; + } + + /** + * Get the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + public AclType aclType() { + return this.aclType; + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withAclType(AclType aclType) { + this.aclType = aclType; + return this; + } + + /** + * Get the deviceRole property: Device Role. + * + * @return the deviceRole value. + */ + public DeviceRole deviceRole() { + return this.deviceRole; + } + + /** + * Set the deviceRole property: Device Role. + * + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withDeviceRole(DeviceRole deviceRole) { + this.deviceRole = deviceRole; + return this; + } + + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionPatchProperties globalAccessControlListActions() { + return this.globalAccessControlListActions; + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withGlobalAccessControlListActions( + GlobalAccessControlListActionPatchProperties globalAccessControlListActions) { + this.globalAccessControlListActions = globalAccessControlListActions; + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -121,13 +294,18 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("configurationType", - configurationType() == null ? null : configurationType().toString()); - jsonWriter.writeStringField("aclsUrl", aclsUrl()); - jsonWriter.writeStringField("defaultAction", defaultAction() == null ? null : defaultAction().toString()); - jsonWriter.writeArrayField("matchConfigurations", matchConfigurations(), + this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("aclsUrl", this.aclsUrl); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); + jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", dynamicMatchConfigurations(), + jsonWriter.writeArrayField("controlPlaneAclConfiguration", this.controlPlaneAclConfiguration, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("aclType", this.aclType == null ? null : this.aclType.toString()); + jsonWriter.writeStringField("deviceRole", this.deviceRole == null ? null : this.deviceRole.toString()); + jsonWriter.writeJsonField("globalAccessControlListActions", this.globalAccessControlListActions); jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -149,22 +327,34 @@ public static AccessControlListPatchProperties fromJson(JsonReader jsonReader) t reader.nextToken(); if ("configurationType".equals(fieldName)) { - deserializedAccessControlListPatchProperties - .withConfigurationType(ConfigurationType.fromString(reader.getString())); + deserializedAccessControlListPatchProperties.configurationType + = ConfigurationType.fromString(reader.getString()); } else if ("aclsUrl".equals(fieldName)) { - deserializedAccessControlListPatchProperties.withAclsUrl(reader.getString()); + deserializedAccessControlListPatchProperties.aclsUrl = reader.getString(); } else if ("defaultAction".equals(fieldName)) { - deserializedAccessControlListPatchProperties - .withDefaultAction(CommunityActionTypes.fromString(reader.getString())); + deserializedAccessControlListPatchProperties.defaultAction + = CommunityActionTypes.fromString(reader.getString()); } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> AccessControlListMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchProperties.withMatchConfigurations(matchConfigurations); + List matchConfigurations + = reader.readArray(reader1 -> AccessControlListMatchConfigurationPatch.fromJson(reader1)); + deserializedAccessControlListPatchProperties.matchConfigurations = matchConfigurations; } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchProperties - .withDynamicMatchConfigurations(dynamicMatchConfigurations); + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfigurationPatch.fromJson(reader1)); + deserializedAccessControlListPatchProperties.dynamicMatchConfigurations + = dynamicMatchConfigurations; + } else if ("controlPlaneAclConfiguration".equals(fieldName)) { + List controlPlaneAclConfiguration + = reader.readArray(reader1 -> ControlPlaneAclPatchProperties.fromJson(reader1)); + deserializedAccessControlListPatchProperties.controlPlaneAclConfiguration + = controlPlaneAclConfiguration; + } else if ("aclType".equals(fieldName)) { + deserializedAccessControlListPatchProperties.aclType = AclType.fromString(reader.getString()); + } else if ("deviceRole".equals(fieldName)) { + deserializedAccessControlListPatchProperties.deviceRole = DeviceRole.fromString(reader.getString()); + } else if ("globalAccessControlListActions".equals(fieldName)) { + deserializedAccessControlListPatchProperties.globalAccessControlListActions + = GlobalAccessControlListActionPatchProperties.fromJson(reader); } else if ("annotation".equals(fieldName)) { deserializedAccessControlListPatchProperties.annotation = reader.getString(); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java index 3c972a9bc3f2..35d6ad440ba9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java @@ -1,21 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -25,26 +30,11 @@ * Access Control List Properties defines the resource properties. */ @Fluent -public final class AccessControlListProperties extends AnnotationResource { +public final class AccessControlListProperties implements JsonSerializable { /* - * The last synced timestamp. + * Switch configuration description. */ - private OffsetDateTime lastSyncedTime; - - /* - * Configuration state of the resource. - */ - private ConfigurationState configurationState; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * Administrative state of the resource. - */ - private AdministrativeState administrativeState; + private String annotation; /* * Input method to configure Access Control List. @@ -71,46 +61,80 @@ public final class AccessControlListProperties extends AnnotationResource { */ private List dynamicMatchConfigurations; - /** - * Creates an instance of AccessControlListProperties class. + /* + * The last synced timestamp. */ - public AccessControlListProperties() { - } + private OffsetDateTime lastSyncedTime; - /** - * Get the lastSyncedTime property: The last synced timestamp. - * - * @return the lastSyncedTime value. + /* + * Access Control List (ACL) Type */ - public OffsetDateTime lastSyncedTime() { - return this.lastSyncedTime; - } + private AclType aclType; + + /* + * Device Role + */ + private DeviceRole deviceRole; + + /* + * Global Access Control List (ACL) actions + */ + private GlobalAccessControlListActionProperties globalAccessControlListActions; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + + /* + * Associated Network Fabric Resource IDs + */ + private List networkFabricIds; + + /* + * Access Control List (ACL) configurations. + */ + private List controlPlaneAclConfiguration; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of AccessControlListProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public AccessControlListProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the AccessControlListProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public AccessControlListProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -218,27 +242,139 @@ public List dynamicMatchConfigurations() { } /** - * {@inheritDoc} + * Get the lastSyncedTime property: The last synced timestamp. + * + * @return the lastSyncedTime value. */ - @Override - public AccessControlListProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; + } + + /** + * Get the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + public AclType aclType() { + return this.aclType; + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withAclType(AclType aclType) { + this.aclType = aclType; return this; } /** - * Validates the instance. + * Get the deviceRole property: Device Role. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the deviceRole value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public DeviceRole deviceRole() { + return this.deviceRole; + } + + /** + * Set the deviceRole property: Device Role. + * + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withDeviceRole(DeviceRole deviceRole) { + this.deviceRole = deviceRole; + return this; + } + + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionProperties globalAccessControlListActions() { + return this.globalAccessControlListActions; + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties + withGlobalAccessControlListActions(GlobalAccessControlListActionProperties globalAccessControlListActions) { + this.globalAccessControlListActions = globalAccessControlListActions; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.networkFabricIds; + } + + /** + * Get the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @return the controlPlaneAclConfiguration value. + */ + public List controlPlaneAclConfiguration() { + return this.controlPlaneAclConfiguration; + } + + /** + * Set the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @param controlPlaneAclConfiguration the controlPlaneAclConfiguration value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties + withControlPlaneAclConfiguration(List controlPlaneAclConfiguration) { + this.controlPlaneAclConfiguration = controlPlaneAclConfiguration; + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -247,15 +383,20 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("aclsUrl", this.aclsUrl); jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("aclType", this.aclType == null ? null : this.aclType.toString()); + jsonWriter.writeStringField("deviceRole", this.deviceRole == null ? null : this.deviceRole.toString()); + jsonWriter.writeJsonField("globalAccessControlListActions", this.globalAccessControlListActions); + jsonWriter.writeArrayField("controlPlaneAclConfiguration", this.controlPlaneAclConfiguration, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -265,6 +406,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AccessControlListProperties if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AccessControlListProperties. */ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws IOException { @@ -274,23 +416,11 @@ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedAccessControlListProperties.withAnnotation(reader.getString()); - } else if ("lastSyncedTime".equals(fieldName)) { - deserializedAccessControlListProperties.lastSyncedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("configurationState".equals(fieldName)) { - deserializedAccessControlListProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedAccessControlListProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedAccessControlListProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); - } else if ("configurationType".equals(fieldName)) { + if ("configurationType".equals(fieldName)) { deserializedAccessControlListProperties.configurationType = ConfigurationType.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedAccessControlListProperties.annotation = reader.getString(); } else if ("aclsUrl".equals(fieldName)) { deserializedAccessControlListProperties.aclsUrl = reader.getString(); } else if ("defaultAction".equals(fieldName)) { @@ -304,6 +434,34 @@ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws List dynamicMatchConfigurations = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); deserializedAccessControlListProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; + } else if ("lastSyncedTime".equals(fieldName)) { + deserializedAccessControlListProperties.lastSyncedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("aclType".equals(fieldName)) { + deserializedAccessControlListProperties.aclType = AclType.fromString(reader.getString()); + } else if ("deviceRole".equals(fieldName)) { + deserializedAccessControlListProperties.deviceRole = DeviceRole.fromString(reader.getString()); + } else if ("globalAccessControlListActions".equals(fieldName)) { + deserializedAccessControlListProperties.globalAccessControlListActions + = GlobalAccessControlListActionProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedAccessControlListProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("networkFabricIds".equals(fieldName)) { + List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListProperties.networkFabricIds = networkFabricIds; + } else if ("controlPlaneAclConfiguration".equals(fieldName)) { + List controlPlaneAclConfiguration + = reader.readArray(reader1 -> ControlPlaneAclProperties.fromJson(reader1)); + deserializedAccessControlListProperties.controlPlaneAclConfiguration = controlPlaneAclConfiguration; + } else if ("configurationState".equals(fieldName)) { + deserializedAccessControlListProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAccessControlListProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedAccessControlListProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffOperationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffOperationResponseInner.java new file mode 100644 index 000000000000..d84c05bb688d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffOperationResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Arm Configuration Diff Response V2. + */ +@Immutable +public final class ArmConfigurationDiffOperationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Arm Configuration Diff Response Properties. + */ + private ArmConfigurationDiffResponseProperties properties; + + /** + * Creates an instance of ArmConfigurationDiffOperationResponseInner class. + */ + private ArmConfigurationDiffOperationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Arm Configuration Diff Response Properties. + * + * @return the properties value. + */ + public ArmConfigurationDiffResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArmConfigurationDiffOperationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArmConfigurationDiffOperationResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ArmConfigurationDiffOperationResponseInner. + */ + public static ArmConfigurationDiffOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArmConfigurationDiffOperationResponseInner deserializedArmConfigurationDiffOperationResponseInner + = new ArmConfigurationDiffOperationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedArmConfigurationDiffOperationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedArmConfigurationDiffOperationResponseInner.properties + = ArmConfigurationDiffResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedArmConfigurationDiffOperationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusOperationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusOperationResponseInner.java new file mode 100644 index 000000000000..26ac990ad8af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusOperationResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Commit Batch Status Response. + */ +@Immutable +public final class CommitBatchStatusOperationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Commit Batch Status Response Properties. + */ + private CommitBatchStatusResponseProperties properties; + + /** + * Creates an instance of CommitBatchStatusOperationResponseInner class. + */ + private CommitBatchStatusOperationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Commit Batch Status Response Properties. + * + * @return the properties value. + */ + public CommitBatchStatusResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchStatusOperationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchStatusOperationResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CommitBatchStatusOperationResponseInner. + */ + public static CommitBatchStatusOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchStatusOperationResponseInner deserializedCommitBatchStatusOperationResponseInner + = new CommitBatchStatusOperationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedCommitBatchStatusOperationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCommitBatchStatusOperationResponseInner.properties + = CommitBatchStatusResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchStatusOperationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitConfigurationResponseInner.java new file mode 100644 index 000000000000..89d7c7828fc7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitConfigurationResponseInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Commit Configuration Response. + */ +@Immutable +public final class CommitConfigurationResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of CommitConfigurationResponseInner class. + */ + private CommitConfigurationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitConfigurationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitConfigurationResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CommitConfigurationResponseInner. + */ + public static CommitConfigurationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitConfigurationResponseInner deserializedCommitConfigurationResponseInner + = new CommitConfigurationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedCommitConfigurationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedCommitConfigurationResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitConfigurationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java new file mode 100644 index 000000000000..1731c11b0aeb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommonErrorResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The current status of an async operation. + */ +@Immutable +public final class CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner extends CommonErrorResponse { + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * The additional properties of the operation status result. + */ + private CommonPostActionResponseForDeviceROCommands properties; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * Operation status. + */ + private String status; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner class. + */ + private CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner() { + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the properties property: The additional properties of the operation status result. + * + * @return the properties value. + */ + public CommonPostActionResponseForDeviceROCommands properties() { + return this.properties; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + @Override + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", error()); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner if the JsonReader + * was pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner. + */ + public static CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner + = new CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.error + = ManagementError.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.status + = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("id".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.id + = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.name + = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.properties + = CommonPostActionResponseForDeviceROCommands.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.resourceId + = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java index b783f7a94dcc..418ba28c5446 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommonErrorResponse; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import java.io.IOException; import java.util.List; @@ -17,9 +17,8 @@ /** * Common response for device updates. */ -@Fluent -public final class CommonPostActionResponseForDeviceUpdateInner - implements JsonSerializable { +@Immutable +public final class CommonPostActionResponseForDeviceUpdateInner extends CommonErrorResponse { /* * Gets the configuration state. */ @@ -43,7 +42,7 @@ public final class CommonPostActionResponseForDeviceUpdateInner /** * Creates an instance of CommonPostActionResponseForDeviceUpdateInner class. */ - public CommonPostActionResponseForDeviceUpdateInner() { + private CommonPostActionResponseForDeviceUpdateInner() { } /** @@ -64,17 +63,6 @@ public List successfulDevices() { return this.successfulDevices; } - /** - * Set the successfulDevices property: List of ARM Resource IDs for which the given action applied successfully. - * - * @param successfulDevices the successfulDevices value to set. - * @return the CommonPostActionResponseForDeviceUpdateInner object itself. - */ - public CommonPostActionResponseForDeviceUpdateInner withSuccessfulDevices(List successfulDevices) { - this.successfulDevices = successfulDevices; - return this; - } - /** * Get the failedDevices property: List of ARM Resource IDs for which the given action failed to apply. * @@ -84,56 +72,27 @@ public List failedDevices() { return this.failedDevices; } - /** - * Set the failedDevices property: List of ARM Resource IDs for which the given action failed to apply. - * - * @param failedDevices the failedDevices value to set. - * @return the CommonPostActionResponseForDeviceUpdateInner object itself. - */ - public CommonPostActionResponseForDeviceUpdateInner withFailedDevices(List failedDevices) { - this.failedDevices = failedDevices; - return this; - } - /** * Get the error property: The error object. * * @return the error value. */ + @Override public ManagementError error() { return this.error; } - /** - * Set the error property: The error object. - * - * @param error the error value to set. - * @return the CommonPostActionResponseForDeviceUpdateInner object itself. - */ - public CommonPostActionResponseForDeviceUpdateInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", error()); jsonWriter.writeArrayField("successfulDevices", this.successfulDevices, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("failedDevices", this.failedDevices, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -153,7 +112,9 @@ public static CommonPostActionResponseForDeviceUpdateInner fromJson(JsonReader j String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceUpdateInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedCommonPostActionResponseForDeviceUpdateInner.configurationState = ConfigurationState.fromString(reader.getString()); } else if ("successfulDevices".equals(fieldName)) { @@ -162,8 +123,6 @@ public static CommonPostActionResponseForDeviceUpdateInner fromJson(JsonReader j } else if ("failedDevices".equals(fieldName)) { List failedDevices = reader.readArray(reader1 -> reader1.getString()); deserializedCommonPostActionResponseForDeviceUpdateInner.failedDevices = failedDevices; - } else if ("error".equals(fieldName)) { - deserializedCommonPostActionResponseForDeviceUpdateInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java index 4a3ab5df81d2..608046798014 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommonErrorResponse; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import java.io.IOException; /** * Common response for the state updates. */ -@Fluent -public final class CommonPostActionResponseForStateUpdateInner - implements JsonSerializable { +@Immutable +public final class CommonPostActionResponseForStateUpdateInner extends CommonErrorResponse { /* * Gets the configuration state. */ @@ -32,7 +31,7 @@ public final class CommonPostActionResponseForStateUpdateInner /** * Creates an instance of CommonPostActionResponseForStateUpdateInner class. */ - public CommonPostActionResponseForStateUpdateInner() { + private CommonPostActionResponseForStateUpdateInner() { } /** @@ -49,36 +48,18 @@ public ConfigurationState configurationState() { * * @return the error value. */ + @Override public ManagementError error() { return this.error; } - /** - * Set the error property: The error object. - * - * @param error the error value to set. - * @return the CommonPostActionResponseForStateUpdateInner object itself. - */ - public CommonPostActionResponseForStateUpdateInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("error", error()); return jsonWriter.writeEndObject(); } @@ -98,11 +79,11 @@ public static CommonPostActionResponseForStateUpdateInner fromJson(JsonReader js String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForStateUpdateInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedCommonPostActionResponseForStateUpdateInner.configurationState = ConfigurationState.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedCommonPostActionResponseForStateUpdateInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchOperationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchOperationResponseInner.java new file mode 100644 index 000000000000..a86466de3723 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchOperationResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Discard Commit Batch Response. + */ +@Immutable +public final class DiscardCommitBatchOperationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Discard commit batch response properties. + */ + private DiscardCommitBatchResponseProperties properties; + + /** + * Creates an instance of DiscardCommitBatchOperationResponseInner class. + */ + private DiscardCommitBatchOperationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Discard commit batch response properties. + * + * @return the properties value. + */ + public DiscardCommitBatchResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscardCommitBatchOperationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscardCommitBatchOperationResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiscardCommitBatchOperationResponseInner. + */ + public static DiscardCommitBatchOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscardCommitBatchOperationResponseInner deserializedDiscardCommitBatchOperationResponseInner + = new DiscardCommitBatchOperationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedDiscardCommitBatchOperationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDiscardCommitBatchOperationResponseInner.properties + = DiscardCommitBatchResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscardCommitBatchOperationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java index bd067ab806fb..7e1f74fe4b10 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,8 +14,10 @@ import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -27,7 +28,7 @@ @Fluent public final class ExternalNetworkInner extends ProxyResource { /* - * Resource properties. + * External Network Properties */ private ExternalNetworkProperties innerProperties = new ExternalNetworkProperties(); @@ -58,7 +59,7 @@ public ExternalNetworkInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: External Network Properties. * * @return the innerProperties value. */ @@ -106,262 +107,237 @@ public String id() { } /** - * Get the peeringOption property: Peering option list. + * Get the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - public PeeringOption peeringOption() { - return this.innerProperties() == null ? null : this.innerProperties().peeringOption(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the peeringOption property: Peering option list. + * Set the annotation property: Switch configuration description. * - * @param peeringOption the peeringOption value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withPeeringOption(PeeringOption peeringOption) { + public ExternalNetworkInner withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withPeeringOption(peeringOption); + this.innerProperties().withAnnotation(annotation); return this; } /** - * Get the optionBProperties property: option B properties object. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - public L3OptionBProperties optionBProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); + public String networkToNetworkInterconnectId() { + return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); } /** - * Set the optionBProperties property: option B properties object. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @param optionBProperties the optionBProperties value to set. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withOptionBProperties(L3OptionBProperties optionBProperties) { + public ExternalNetworkInner withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withOptionBProperties(optionBProperties); + this.innerProperties().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); + public ImportRoutePolicy importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } /** - * Set the optionAProperties property: option A properties object. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param optionAProperties the optionAProperties value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { + public ExternalNetworkInner withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withOptionAProperties(optionAProperties); + this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; } /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the provisioningState value. + * @return the exportRoutePolicy value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public ExportRoutePolicy exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the administrativeState value. + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkInner object itself. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public ExternalNetworkInner withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkProperties(); + } + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; } /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Get the peeringOption property: Peering option list. * - * @return the networkToNetworkInterconnectId value. + * @return the peeringOption value. */ - public String networkToNetworkInterconnectId() { - return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); + public PeeringOption peeringOption() { + return this.innerProperties() == null ? null : this.innerProperties().peeringOption(); } /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Set the peeringOption property: Peering option list. * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + public ExternalNetworkInner withPeeringOption(PeeringOption peeringOption) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); + this.innerProperties().withPeeringOption(peeringOption); return this; } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionBProperties property: option B properties object. * - * @return the importRoutePolicyId value. + * @return the optionBProperties value. */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); + public L3OptionBProperties optionBProperties() { + return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionBProperties property: option B properties object. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { + public ExternalNetworkInner withOptionBProperties(L3OptionBProperties optionBProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); + this.innerProperties().withOptionBProperties(optionBProperties); return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionAProperties property: option A properties object. * - * @return the exportRoutePolicyId value. + * @return the optionAProperties value. */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); + public ExternalNetworkPropertiesOptionAProperties optionAProperties() { + return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionAProperties property: option A properties object. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { + public ExternalNetworkInner withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); + this.innerProperties().withOptionAProperties(optionAProperties); return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @return the importRoutePolicy value. + * @return the staticRouteConfiguration value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); + public ExternalNetworkStaticRouteConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the staticRouteConfiguration property: Static Route Configuration. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + public ExternalNetworkInner + withStaticRouteConfiguration(ExternalNetworkStaticRouteConfiguration staticRouteConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } - this.innerProperties().withImportRoutePolicy(importRoutePolicy); + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the exportRoutePolicy value. + * @return the lastOperation value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the networkFabricId property: Associated Network Fabric Resource ID. * - * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the ExternalNetworkInner object itself. + * @return the networkFabricId value. */ - public ExternalNetworkInner withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withExportRoutePolicy(exportRoutePolicy); - return this; + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** - * Get the annotation property: Switch configuration description. + * Get the configurationState property: Configuration state of the resource. * - * @return the annotation value. + * @return the configurationState value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Set the annotation property: Switch configuration description. + * Get the provisioningState property: Provisioning state of the resource. * - * @param annotation the annotation value to set. - * @return the ExternalNetworkInner object itself. + * @return the provisioningState value. */ - public ExternalNetworkInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** - * Validates the instance. + * Get the administrativeState property: Administrative state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ExternalNetworkInner")); - } else { - innerProperties().validate(); - } + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } - private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworkInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java index 9417de8118a0..d05c9739e1dc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import java.io.IOException; @@ -20,46 +21,46 @@ * External Network Patch properties. */ @Fluent -public final class ExternalNetworkPatchProperties extends AnnotationResource { +public final class ExternalNetworkPatchProperties implements JsonSerializable { /* - * Peering option list. + * Switch configuration description. */ - private PeeringOption peeringOption; + private String annotation; /* - * option B properties object + * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. */ - private L3OptionBProperties optionBProperties; + private String networkToNetworkInterconnectId; /* - * option A properties object + * Import Route Policy either IPv4 or IPv6. */ - private ExternalNetworkPatchPropertiesOptionAProperties optionAProperties; + private ImportRoutePolicyPatch importRoutePolicy; /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. + * Export Route Policy either IPv4 or IPv6. */ - private String networkToNetworkInterconnectId; + private ExportRoutePolicyPatch exportRoutePolicy; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Peering option list. */ - private String importRoutePolicyId; + private PeeringOption peeringOption; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * option B properties object */ - private String exportRoutePolicyId; + private L3OptionBPatchProperties optionBProperties; /* - * Import Route Policy either IPv4 or IPv6. + * option A properties object */ - private ImportRoutePolicy importRoutePolicy; + private ExternalNetworkPatchPropertiesOptionAProperties optionAProperties; /* - * Export Route Policy either IPv4 or IPv6. + * Static Route Configuration. */ - private ExportRoutePolicy exportRoutePolicy; + private ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration; /** * Creates an instance of ExternalNetworkPatchProperties class. @@ -68,217 +69,183 @@ public ExternalNetworkPatchProperties() { } /** - * Get the peeringOption property: Peering option list. + * Get the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - public PeeringOption peeringOption() { - return this.peeringOption; + public String annotation() { + return this.annotation; } /** - * Set the peeringOption property: Peering option list. + * Set the annotation property: Switch configuration description. * - * @param peeringOption the peeringOption value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withPeeringOption(PeeringOption peeringOption) { - this.peeringOption = peeringOption; + public ExternalNetworkPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * Get the optionBProperties property: option B properties object. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - public L3OptionBProperties optionBProperties() { - return this.optionBProperties; + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; } /** - * Set the optionBProperties property: option B properties object. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @param optionBProperties the optionBProperties value to set. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withOptionBProperties(L3OptionBProperties optionBProperties) { - this.optionBProperties = optionBProperties; + public ExternalNetworkPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { - return this.optionAProperties; + public ImportRoutePolicyPatch importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the optionAProperties property: option A properties object. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param optionAProperties the optionAProperties value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties - withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { - this.optionAProperties = optionAProperties; + public ExternalNetworkPatchProperties withImportRoutePolicy(ImportRoutePolicyPatch importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; return this; } /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the networkToNetworkInterconnectId value. + * @return the exportRoutePolicy value. */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; + public ExportRoutePolicyPatch exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + public ExternalNetworkPatchProperties withExportRoutePolicy(ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; return this; } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the peeringOption property: Peering option list. * - * @return the importRoutePolicyId value. + * @return the peeringOption value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public PeeringOption peeringOption() { + return this.peeringOption; } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the peeringOption property: Peering option list. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public ExternalNetworkPatchProperties withPeeringOption(PeeringOption peeringOption) { + this.peeringOption = peeringOption; return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionBProperties property: option B properties object. * - * @return the exportRoutePolicyId value. + * @return the optionBProperties value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public L3OptionBPatchProperties optionBProperties() { + return this.optionBProperties; } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionBProperties property: option B properties object. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public ExternalNetworkPatchProperties withOptionBProperties(L3OptionBPatchProperties optionBProperties) { + this.optionBProperties = optionBProperties; return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the optionAProperties property: option A properties object. * - * @return the importRoutePolicy value. + * @return the optionAProperties value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; + public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { + return this.optionAProperties; } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the optionAProperties property: option A properties object. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; + public ExternalNetworkPatchProperties + withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { + this.optionAProperties = optionAProperties; return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @return the exportRoutePolicy value. + * @return the staticRouteConfiguration value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; + public ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Set the staticRouteConfiguration property: Static Route Configuration. * - * @param exportRoutePolicy the exportRoutePolicy value to set. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ExternalNetworkPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public ExternalNetworkPatchProperties + withStaticRouteConfiguration(ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (optionBProperties() != null) { - optionBProperties().validate(); - } - if (optionAProperties() != null) { - optionAProperties().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); - jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); - jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); + jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); + jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -299,25 +266,27 @@ public static ExternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.withAnnotation(reader.getString()); + deserializedExternalNetworkPatchProperties.annotation = reader.getString(); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("importRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.importRoutePolicy + = ImportRoutePolicyPatch.fromJson(reader); + } else if ("exportRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.exportRoutePolicy + = ExportRoutePolicyPatch.fromJson(reader); } else if ("peeringOption".equals(fieldName)) { deserializedExternalNetworkPatchProperties.peeringOption = PeeringOption.fromString(reader.getString()); } else if ("optionBProperties".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.optionBProperties = L3OptionBProperties.fromJson(reader); + deserializedExternalNetworkPatchProperties.optionBProperties + = L3OptionBPatchProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedExternalNetworkPatchProperties.optionAProperties = ExternalNetworkPatchPropertiesOptionAProperties.fromJson(reader); - } else if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.staticRouteConfiguration + = ExternalNetworkStaticRoutePatchConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java index bf5f26d05865..702d1573a7f3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java @@ -1,21 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -24,61 +25,71 @@ * External Network Properties. */ @Fluent -public final class ExternalNetworkProperties extends AnnotationResource { +public final class ExternalNetworkProperties implements JsonSerializable { /* - * Peering option list. + * Switch configuration description. */ - private PeeringOption peeringOption; + private String annotation; /* - * option B properties object + * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. */ - private L3OptionBProperties optionBProperties; + private String networkToNetworkInterconnectId; /* - * option A properties object + * Import Route Policy either IPv4 or IPv6. */ - private ExternalNetworkPropertiesOptionAProperties optionAProperties; + private ImportRoutePolicy importRoutePolicy; /* - * Configuration state of the resource. + * Export Route Policy either IPv4 or IPv6. */ - private ConfigurationState configurationState; + private ExportRoutePolicy exportRoutePolicy; /* - * Provisioning state of the resource. + * Peering option list. */ - private ProvisioningState provisioningState; + private PeeringOption peeringOption; /* - * Administrative state of the resource. + * option B properties object */ - private AdministrativeState administrativeState; + private L3OptionBProperties optionBProperties; /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. + * option A properties object */ - private String networkToNetworkInterconnectId; + private ExternalNetworkPropertiesOptionAProperties optionAProperties; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Static Route Configuration. */ - private String importRoutePolicyId; + private ExternalNetworkStaticRouteConfiguration staticRouteConfiguration; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Details of the last operation performed on the resource */ - private String exportRoutePolicyId; + private LastOperationProperties lastOperation; /* - * Import Route Policy either IPv4 or IPv6. + * Associated Network Fabric Resource ID */ - private ImportRoutePolicy importRoutePolicy; + private String networkFabricId; /* - * Export Route Policy either IPv4 or IPv6. + * Configuration state of the resource. */ - private ExportRoutePolicy exportRoutePolicy; + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** * Creates an instance of ExternalNetworkProperties class. @@ -87,235 +98,213 @@ public ExternalNetworkProperties() { } /** - * Get the peeringOption property: Peering option list. + * Get the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - public PeeringOption peeringOption() { - return this.peeringOption; + public String annotation() { + return this.annotation; } /** - * Set the peeringOption property: Peering option list. + * Set the annotation property: Switch configuration description. * - * @param peeringOption the peeringOption value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withPeeringOption(PeeringOption peeringOption) { - this.peeringOption = peeringOption; + public ExternalNetworkProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * Get the optionBProperties property: option B properties object. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - public L3OptionBProperties optionBProperties() { - return this.optionBProperties; + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; } /** - * Set the optionBProperties property: option B properties object. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @param optionBProperties the optionBProperties value to set. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withOptionBProperties(L3OptionBProperties optionBProperties) { - this.optionBProperties = optionBProperties; + public ExternalNetworkProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.optionAProperties; + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the optionAProperties property: option A properties object. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param optionAProperties the optionAProperties value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties - withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { - this.optionAProperties = optionAProperties; + public ExternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; return this; } /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.configurationState; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the provisioningState value. + * @return the exportRoutePolicy value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the administrativeState value. + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public ExternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; } /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Get the peeringOption property: Peering option list. * - * @return the networkToNetworkInterconnectId value. + * @return the peeringOption value. */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; + public PeeringOption peeringOption() { + return this.peeringOption; } /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Set the peeringOption property: Peering option list. * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + public ExternalNetworkProperties withPeeringOption(PeeringOption peeringOption) { + this.peeringOption = peeringOption; return this; } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionBProperties property: option B properties object. * - * @return the importRoutePolicyId value. + * @return the optionBProperties value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public L3OptionBProperties optionBProperties() { + return this.optionBProperties; } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionBProperties property: option B properties object. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public ExternalNetworkProperties withOptionBProperties(L3OptionBProperties optionBProperties) { + this.optionBProperties = optionBProperties; return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionAProperties property: option A properties object. * - * @return the exportRoutePolicyId value. + * @return the optionAProperties value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public ExternalNetworkPropertiesOptionAProperties optionAProperties() { + return this.optionAProperties; } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionAProperties property: option A properties object. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public ExternalNetworkProperties + withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { + this.optionAProperties = optionAProperties; return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @return the importRoutePolicy value. + * @return the staticRouteConfiguration value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; + public ExternalNetworkStaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the staticRouteConfiguration property: Static Route Configuration. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; + public ExternalNetworkProperties + withStaticRouteConfiguration(ExternalNetworkStaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the exportRoutePolicy value. + * @return the lastOperation value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the networkFabricId property: Associated Network Fabric Resource ID. * - * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the ExternalNetworkProperties object itself. + * @return the networkFabricId value. */ - public ExternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; + public String networkFabricId() { + return this.networkFabricId; } /** - * {@inheritDoc} + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. */ - @Override - public ExternalNetworkProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - @Override - public void validate() { - if (peeringOption() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property peeringOption in model ExternalNetworkProperties")); - } - if (optionBProperties() != null) { - optionBProperties().validate(); - } - if (optionAProperties() != null) { - optionAProperties().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public ProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworkProperties.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } /** * {@inheritDoc} @@ -323,15 +312,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); - jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); - jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); + jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -351,15 +339,28 @@ public static ExternalNetworkProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedExternalNetworkProperties.withAnnotation(reader.getString()); - } else if ("peeringOption".equals(fieldName)) { + if ("peeringOption".equals(fieldName)) { deserializedExternalNetworkProperties.peeringOption = PeeringOption.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedExternalNetworkProperties.annotation = reader.getString(); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedExternalNetworkProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("importRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); + } else if ("exportRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); } else if ("optionBProperties".equals(fieldName)) { deserializedExternalNetworkProperties.optionBProperties = L3OptionBProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedExternalNetworkProperties.optionAProperties = ExternalNetworkPropertiesOptionAProperties.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedExternalNetworkProperties.staticRouteConfiguration + = ExternalNetworkStaticRouteConfiguration.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedExternalNetworkProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("networkFabricId".equals(fieldName)) { + deserializedExternalNetworkProperties.networkFabricId = reader.getString(); } else if ("configurationState".equals(fieldName)) { deserializedExternalNetworkProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -369,16 +370,6 @@ public static ExternalNetworkProperties fromJson(JsonReader jsonReader) throws I } else if ("administrativeState".equals(fieldName)) { deserializedExternalNetworkProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkUpdateBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkUpdateBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..d53149c84655 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkUpdateBfdAdministrativeStateResponseInner.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * External Network Update Administrative State response. + */ +@Immutable +public final class ExternalNetworkUpdateBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Response properties. + */ + private ExternalNetworkUpdateBfdAdministrativeStateResponseProperties properties; + + /** + * Creates an instance of ExternalNetworkUpdateBfdAdministrativeStateResponseInner class. + */ + private ExternalNetworkUpdateBfdAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Response properties. + * + * @return the properties value. + */ + public ExternalNetworkUpdateBfdAdministrativeStateResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkUpdateBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkUpdateBfdAdministrativeStateResponseInner if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * ExternalNetworkUpdateBfdAdministrativeStateResponseInner. + */ + public static ExternalNetworkUpdateBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkUpdateBfdAdministrativeStateResponseInner deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner + = new ExternalNetworkUpdateBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.resourceId + = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner.properties + = ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkUpdateBfdAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetTopologyResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetTopologyResponseInner.java new file mode 100644 index 000000000000..eaf88b4f2a55 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetTopologyResponseInner.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * GetTopology Response. + */ +@Immutable +public final class GetTopologyResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Properties of the GetTopology Response. + */ + private GetTopologyResponseProperties properties; + + /** + * Creates an instance of GetTopologyResponseInner class. + */ + private GetTopologyResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Properties of the GetTopology Response. + * + * @return the properties value. + */ + public GetTopologyResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GetTopologyResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GetTopologyResponseInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GetTopologyResponseInner. + */ + public static GetTopologyResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GetTopologyResponseInner deserializedGetTopologyResponseInner = new GetTopologyResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedGetTopologyResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedGetTopologyResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGetTopologyResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedGetTopologyResponseInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedGetTopologyResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedGetTopologyResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedGetTopologyResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedGetTopologyResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedGetTopologyResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGetTopologyResponseInner.properties = GetTopologyResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGetTopologyResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java index 98184b86f8cf..5e75c1001fad 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java @@ -1,26 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import java.io.IOException; import java.util.List; @@ -30,7 +32,7 @@ @Fluent public final class InternalNetworkInner extends ProxyResource { /* - * Resource properties. + * The Internal Network Properties */ private InternalNetworkProperties innerProperties = new InternalNetworkProperties(); @@ -61,7 +63,7 @@ public InternalNetworkInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Internal Network Properties. * * @return the innerProperties value. */ @@ -109,102 +111,51 @@ public String id() { } /** - * Get the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. - */ - public int vlanId() { - return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); - } - - /** - * Set the vlanId property: Vlan identifier. Example: 1001. - * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withVlanId(int vlanId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withVlanId(vlanId); - return this; - } - - /** - * Get the bgpConfiguration property: BGP configuration properties. + * Get the annotation property: Switch configuration description. * - * @return the bgpConfiguration value. + * @return the annotation value. */ - public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the bgpConfiguration property: BGP configuration properties. + * Set the annotation property: Switch configuration description. * - * @param bgpConfiguration the bgpConfiguration value to set. + * @param annotation the annotation value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { + public InternalNetworkInner withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withBgpConfiguration(bgpConfiguration); + this.innerProperties().withAnnotation(annotation); return this; } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the extension property: Extension. Example: NoExtension | NPB. * - * @return the staticRouteConfiguration value. + * @return the extension value. */ - public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + public Extension extension() { + return this.innerProperties() == null ? null : this.innerProperties().extension(); } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the extension property: Extension. Example: NoExtension | NPB. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param extension the extension value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkInner withExtension(Extension extension) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + this.innerProperties().withExtension(extension); return this; } - /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - /** * Get the mtu property: Maximum transmission unit. Default value is 1500. * @@ -274,56 +225,6 @@ public InternalNetworkInner withConnectedIPv6Subnets(List conne return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -440,67 +341,164 @@ public InternalNetworkInner withIsMonitoringEnabled(IsMonitoringEnabled isMonito } /** - * Get the extension property: Extension. Example: NoExtension | NPB. + * Get the vlanId property: Vlan identifier. Example: 1001. * - * @return the extension value. + * @return the vlanId value. */ - public Extension extension() { - return this.innerProperties() == null ? null : this.innerProperties().extension(); + public int vlanId() { + return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); } /** - * Set the extension property: Extension. Example: NoExtension | NPB. + * Set the vlanId property: Vlan identifier. Example: 1001. * - * @param extension the extension value to set. + * @param vlanId the vlanId value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withExtension(Extension extension) { + public InternalNetworkInner withVlanId(int vlanId) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withExtension(extension); + this.innerProperties().withVlanId(vlanId); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the bgpConfiguration property: BGP configuration properties. * - * @return the annotation value. + * @return the bgpConfiguration value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public BgpConfiguration bgpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); } /** - * Set the annotation property: Switch configuration description. + * Set the bgpConfiguration property: BGP configuration properties. * - * @param annotation the annotation value to set. + * @param bgpConfiguration the bgpConfiguration value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withAnnotation(String annotation) { + public InternalNetworkInner withBgpConfiguration(BgpConfiguration bgpConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withBgpConfiguration(bgpConfiguration); return this; } /** - * Validates the instance. + * Get the staticRouteConfiguration property: Static Route Configuration properties. + * + * @return the staticRouteConfiguration value. + */ + public StaticRouteConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkInner object itself. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternalNetworkInner")); - } else { - innerProperties().validate(); + public InternalNetworkInner withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(InternalNetworkInner.class); + /** + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().nativeIpv4PrefixLimit(); + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withNativeIpv4PrefixLimit(nativeIpv4PrefixLimit); + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().nativeIpv6PrefixLimit(); + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withNativeIpv6PrefixLimit(nativeIpv6PrefixLimit); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java index 3a708c796ecf..72adb00dfb96 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; import java.io.IOException; import java.util.List; @@ -22,16 +24,11 @@ * InternalNetwork Patch properties. */ @Fluent -public final class InternalNetworkPatchProperties extends AnnotationResource { +public final class InternalNetworkPatchProperties implements JsonSerializable { /* - * BGP configuration properties. - */ - private BgpConfiguration bgpConfiguration; - - /* - * Static Route Configuration properties. + * Switch configuration description. */ - private StaticRouteConfiguration staticRouteConfiguration; + private String annotation; /* * Maximum transmission unit. Default value is 1500. @@ -41,22 +38,12 @@ public final class InternalNetworkPatchProperties extends AnnotationResource { /* * List of Connected IPv4 Subnets. */ - private List connectedIPv4Subnets; + private List connectedIPv4Subnets; /* * List of connected IPv6 Subnets. */ - private List connectedIPv6Subnets; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; + private List connectedIPv6Subnets; /* * Import Route Policy either IPv4 or IPv6. @@ -83,50 +70,49 @@ public final class InternalNetworkPatchProperties extends AnnotationResource { */ private IsMonitoringEnabled isMonitoringEnabled; - /** - * Creates an instance of InternalNetworkPatchProperties class. + /* + * BGP configuration properties. */ - public InternalNetworkPatchProperties() { - } + private BgpPatchConfiguration bgpConfiguration; - /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. + /* + * Static Route Configuration properties. */ - public BgpConfiguration bgpConfiguration() { - return this.bgpConfiguration; - } + private StaticRoutePatchConfiguration staticRouteConfiguration; + + /* + * Native IPv4 Prefix Limit Configuration properties. + */ + private NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 Prefix Limit Configuration properties. + */ + private NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit; /** - * Set the bgpConfiguration property: BGP configuration properties. - * - * @param bgpConfiguration the bgpConfiguration value to set. - * @return the InternalNetworkPatchProperties object itself. + * Creates an instance of InternalNetworkPatchProperties class. */ - public InternalNetworkPatchProperties withBgpConfiguration(BgpConfiguration bgpConfiguration) { - this.bgpConfiguration = bgpConfiguration; - return this; + public InternalNetworkPatchProperties() { } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the annotation property: Switch configuration description. * - * @return the staticRouteConfiguration value. + * @return the annotation value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.staticRouteConfiguration; + public String annotation() { + return this.annotation; } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the annotation property: Switch configuration description. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param annotation the annotation value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties - withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { - this.staticRouteConfiguration = staticRouteConfiguration; + public InternalNetworkPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } @@ -155,7 +141,7 @@ public InternalNetworkPatchProperties withMtu(Integer mtu) { * * @return the connectedIPv4Subnets value. */ - public List connectedIPv4Subnets() { + public List connectedIPv4Subnets() { return this.connectedIPv4Subnets; } @@ -165,7 +151,7 @@ public List connectedIPv4Subnets() { * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { + public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { this.connectedIPv4Subnets = connectedIPv4Subnets; return this; } @@ -175,7 +161,7 @@ public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv6Subnets() { + public List connectedIPv6Subnets() { return this.connectedIPv6Subnets; } @@ -185,55 +171,11 @@ public List connectedIPv6Subnets() { * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { + public InternalNetworkPatchProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { this.connectedIPv6Subnets = connectedIPv6Subnets; return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the InternalNetworkPatchProperties object itself. - */ - public InternalNetworkPatchProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkPatchProperties object itself. - */ - public InternalNetworkPatchProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -335,39 +277,86 @@ public InternalNetworkPatchProperties withIsMonitoringEnabled(IsMonitoringEnable } /** - * {@inheritDoc} + * Get the bgpConfiguration property: BGP configuration properties. + * + * @return the bgpConfiguration value. */ - @Override - public InternalNetworkPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public BgpPatchConfiguration bgpConfiguration() { + return this.bgpConfiguration; + } + + /** + * Set the bgpConfiguration property: BGP configuration properties. + * + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties withBgpConfiguration(BgpPatchConfiguration bgpConfiguration) { + this.bgpConfiguration = bgpConfiguration; return this; } /** - * Validates the instance. + * Get the staticRouteConfiguration property: Static Route Configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteConfiguration value. */ - @Override - public void validate() { - if (bgpConfiguration() != null) { - bgpConfiguration().validate(); - } - if (staticRouteConfiguration() != null) { - staticRouteConfiguration().validate(); - } - if (connectedIPv4Subnets() != null) { - connectedIPv4Subnets().forEach(e -> e.validate()); - } - if (connectedIPv6Subnets() != null) { - connectedIPv6Subnets().forEach(e -> e.validate()); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public StaticRoutePatchConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties + withStaticRouteConfiguration(StaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -376,22 +365,22 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); - jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("isMonitoringEnabled", this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); + jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -412,26 +401,17 @@ public static InternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.withAnnotation(reader.getString()); - } else if ("bgpConfiguration".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.bgpConfiguration = BgpConfiguration.fromJson(reader); - } else if ("staticRouteConfiguration".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.staticRouteConfiguration - = StaticRouteConfiguration.fromJson(reader); + deserializedInternalNetworkPatchProperties.annotation = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedInternalNetworkPatchProperties.mtu = reader.getNullable(JsonReader::getInt); } else if ("connectedIPv4Subnets".equals(fieldName)) { - List connectedIPv4Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); + List connectedIPv4Subnets + = reader.readArray(reader1 -> ConnectedSubnetPatch.fromJson(reader1)); deserializedInternalNetworkPatchProperties.connectedIPv4Subnets = connectedIPv4Subnets; } else if ("connectedIPv6Subnets".equals(fieldName)) { - List connectedIPv6Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); + List connectedIPv6Subnets + = reader.readArray(reader1 -> ConnectedSubnetPatch.fromJson(reader1)); deserializedInternalNetworkPatchProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.exportRoutePolicyId = reader.getString(); } else if ("importRoutePolicy".equals(fieldName)) { deserializedInternalNetworkPatchProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { @@ -443,6 +423,18 @@ public static InternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr } else if ("isMonitoringEnabled".equals(fieldName)) { deserializedInternalNetworkPatchProperties.isMonitoringEnabled = IsMonitoringEnabled.fromString(reader.getString()); + } else if ("bgpConfiguration".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.bgpConfiguration + = BgpPatchConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.staticRouteConfiguration + = StaticRoutePatchConfiguration.fromJson(reader); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitPatchProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java index d2efc613cbc0..016becd68bea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java @@ -1,24 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import java.io.IOException; import java.util.List; @@ -26,36 +29,16 @@ * Internal Network Properties defines the properties of the resource. */ @Fluent -public final class InternalNetworkProperties extends AnnotationResource { +public final class InternalNetworkProperties implements JsonSerializable { /* - * Vlan identifier. Example: 1001. - */ - private int vlanId; - - /* - * BGP configuration properties. - */ - private InternalNetworkPropertiesBgpConfiguration bgpConfiguration; - - /* - * Static Route Configuration properties. + * Switch configuration description. */ - private InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration; + private String annotation; /* - * Configuration state of the resource. - */ - private ConfigurationState configurationState; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * Administrative state of the resource. + * Extension. Example: NoExtension | NPB. */ - private AdministrativeState administrativeState; + private Extension extension; /* * Maximum transmission unit. Default value is 1500. @@ -72,16 +55,6 @@ public final class InternalNetworkProperties extends AnnotationResource { */ private List connectedIPv6Subnets; - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - /* * Import Route Policy either IPv4 or IPv6. */ @@ -108,102 +81,99 @@ public final class InternalNetworkProperties extends AnnotationResource { private IsMonitoringEnabled isMonitoringEnabled; /* - * Extension. Example: NoExtension | NPB. + * Vlan identifier. Example: 1001. */ - private Extension extension; + private int vlanId; - /** - * Creates an instance of InternalNetworkProperties class. + /* + * BGP configuration properties. */ - public InternalNetworkProperties() { - } + private BgpConfiguration bgpConfiguration; - /** - * Get the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. + /* + * Static Route Configuration properties. */ - public int vlanId() { - return this.vlanId; - } + private StaticRouteConfiguration staticRouteConfiguration; - /** - * Set the vlanId property: Vlan identifier. Example: 1001. - * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkProperties object itself. + /* + * Native IPv4 Prefix Limit Configuration properties. */ - public InternalNetworkProperties withVlanId(int vlanId) { - this.vlanId = vlanId; - return this; - } + private NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit; - /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. + /* + * Native IPv6 Prefix Limit Configuration properties. */ - public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { - return this.bgpConfiguration; - } + private NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit; - /** - * Set the bgpConfiguration property: BGP configuration properties. - * - * @param bgpConfiguration the bgpConfiguration value to set. - * @return the InternalNetworkProperties object itself. + /* + * Details of the last operation performed on the resource */ - public InternalNetworkProperties withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { - this.bgpConfiguration = bgpConfiguration; - return this; - } + private LastOperationProperties lastOperation; + + /* + * Associated Network Fabric Resource ID + */ + private String networkFabricId; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. - * - * @return the staticRouteConfiguration value. + * Creates an instance of InternalNetworkProperties class. */ - public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { - return this.staticRouteConfiguration; + public InternalNetworkProperties() { } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Get the annotation property: Switch configuration description. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. - * @return the InternalNetworkProperties object itself. + * @return the annotation value. */ - public InternalNetworkProperties - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { - this.staticRouteConfiguration = staticRouteConfiguration; - return this; + public String annotation() { + return this.annotation; } /** - * Get the configurationState property: Configuration state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the configurationState value. + * @param annotation the annotation value to set. + * @return the InternalNetworkProperties object itself. */ - public ConfigurationState configurationState() { - return this.configurationState; + public InternalNetworkProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the extension property: Extension. Example: NoExtension | NPB. * - * @return the provisioningState value. + * @return the extension value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public Extension extension() { + return this.extension; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the extension property: Extension. Example: NoExtension | NPB. * - * @return the administrativeState value. + * @param extension the extension value to set. + * @return the InternalNetworkProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public InternalNetworkProperties withExtension(Extension extension) { + this.extension = extension; + return this; } /** @@ -266,50 +236,6 @@ public InternalNetworkProperties withConnectedIPv6Subnets(List return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the InternalNetworkProperties object itself. - */ - public InternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkProperties object itself. - */ - public InternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -411,59 +337,148 @@ public InternalNetworkProperties withIsMonitoringEnabled(IsMonitoringEnabled isM } /** - * Get the extension property: Extension. Example: NoExtension | NPB. + * Get the vlanId property: Vlan identifier. Example: 1001. * - * @return the extension value. + * @return the vlanId value. */ - public Extension extension() { - return this.extension; + public int vlanId() { + return this.vlanId; } /** - * Set the extension property: Extension. Example: NoExtension | NPB. + * Set the vlanId property: Vlan identifier. Example: 1001. * - * @param extension the extension value to set. + * @param vlanId the vlanId value to set. * @return the InternalNetworkProperties object itself. */ - public InternalNetworkProperties withExtension(Extension extension) { - this.extension = extension; + public InternalNetworkProperties withVlanId(int vlanId) { + this.vlanId = vlanId; return this; } /** - * {@inheritDoc} + * Get the bgpConfiguration property: BGP configuration properties. + * + * @return the bgpConfiguration value. */ - @Override - public InternalNetworkProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public BgpConfiguration bgpConfiguration() { + return this.bgpConfiguration; + } + + /** + * Set the bgpConfiguration property: BGP configuration properties. + * + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withBgpConfiguration(BgpConfiguration bgpConfiguration) { + this.bgpConfiguration = bgpConfiguration; return this; } /** - * Validates the instance. + * Get the staticRouteConfiguration property: Static Route Configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteConfiguration value. */ - @Override - public void validate() { - if (bgpConfiguration() != null) { - bgpConfiguration().validate(); - } - if (staticRouteConfiguration() != null) { - staticRouteConfiguration().validate(); - } - if (connectedIPv4Subnets() != null) { - connectedIPv4Subnets().forEach(e -> e.validate()); - } - if (connectedIPv6Subnets() != null) { - connectedIPv6Subnets().forEach(e -> e.validate()); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public StaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.networkFabricId; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -472,24 +487,24 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeIntField("vlanId", this.vlanId); - jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); - jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("isMonitoringEnabled", this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); - jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); + jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -509,25 +524,12 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedInternalNetworkProperties.withAnnotation(reader.getString()); - } else if ("vlanId".equals(fieldName)) { + if ("vlanId".equals(fieldName)) { deserializedInternalNetworkProperties.vlanId = reader.getInt(); - } else if ("bgpConfiguration".equals(fieldName)) { - deserializedInternalNetworkProperties.bgpConfiguration - = InternalNetworkPropertiesBgpConfiguration.fromJson(reader); - } else if ("staticRouteConfiguration".equals(fieldName)) { - deserializedInternalNetworkProperties.staticRouteConfiguration - = InternalNetworkPropertiesStaticRouteConfiguration.fromJson(reader); - } else if ("configurationState".equals(fieldName)) { - deserializedInternalNetworkProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedInternalNetworkProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedInternalNetworkProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedInternalNetworkProperties.annotation = reader.getString(); + } else if ("extension".equals(fieldName)) { + deserializedInternalNetworkProperties.extension = Extension.fromString(reader.getString()); } else if ("mtu".equals(fieldName)) { deserializedInternalNetworkProperties.mtu = reader.getNullable(JsonReader::getInt); } else if ("connectedIPv4Subnets".equals(fieldName)) { @@ -538,10 +540,6 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I List connectedIPv6Subnets = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); deserializedInternalNetworkProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkProperties.exportRoutePolicyId = reader.getString(); } else if ("importRoutePolicy".equals(fieldName)) { deserializedInternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { @@ -553,8 +551,30 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I } else if ("isMonitoringEnabled".equals(fieldName)) { deserializedInternalNetworkProperties.isMonitoringEnabled = IsMonitoringEnabled.fromString(reader.getString()); - } else if ("extension".equals(fieldName)) { - deserializedInternalNetworkProperties.extension = Extension.fromString(reader.getString()); + } else if ("bgpConfiguration".equals(fieldName)) { + deserializedInternalNetworkProperties.bgpConfiguration = BgpConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedInternalNetworkProperties.staticRouteConfiguration + = StaticRouteConfiguration.fromJson(reader); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternalNetworkProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("networkFabricId".equals(fieldName)) { + deserializedInternalNetworkProperties.networkFabricId = reader.getString(); + } else if ("configurationState".equals(fieldName)) { + deserializedInternalNetworkProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedInternalNetworkProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..5f748e031de1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBfdAdministrativeStateResponseInner.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Internal Network BFD Administrative State response. + */ +@Immutable +public final class InternalNetworkUpdateBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Internal Network BFD Administrative State response properties + */ + private InternalNetworkUpdateBfdAdministrativeStateResponseProperties properties; + + /** + * Creates an instance of InternalNetworkUpdateBfdAdministrativeStateResponseInner class. + */ + private InternalNetworkUpdateBfdAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Internal Network BFD Administrative State response properties. + * + * @return the properties value. + */ + public InternalNetworkUpdateBfdAdministrativeStateResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBfdAdministrativeStateResponseInner if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * InternalNetworkUpdateBfdAdministrativeStateResponseInner. + */ + public static InternalNetworkUpdateBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBfdAdministrativeStateResponseInner deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner + = new InternalNetworkUpdateBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.resourceId + = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner.properties + = InternalNetworkUpdateBfdAdministrativeStateResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBfdAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBgpAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBgpAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..8b42085e8c7a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBgpAdministrativeStateResponseInner.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Internal Network Administrative State Response. + */ +@Immutable +public final class InternalNetworkUpdateBgpAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Internal Network BGP Administrative State response properties + */ + private InternalNetworkUpdateBgpAdministrativeStateResponseProperties properties; + + /** + * Creates an instance of InternalNetworkUpdateBgpAdministrativeStateResponseInner class. + */ + private InternalNetworkUpdateBgpAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Internal Network BGP Administrative State response properties. + * + * @return the properties value. + */ + public InternalNetworkUpdateBgpAdministrativeStateResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBgpAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBgpAdministrativeStateResponseInner if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * InternalNetworkUpdateBgpAdministrativeStateResponseInner. + */ + public static InternalNetworkUpdateBgpAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBgpAdministrativeStateResponseInner deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner + = new InternalNetworkUpdateBgpAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.resourceId + = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner.properties + = InternalNetworkUpdateBgpAdministrativeStateResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBgpAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java index 09464c1bf977..7f0899bfa09a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.Map; @@ -22,7 +22,7 @@ @Fluent public final class InternetGatewayInner extends Resource { /* - * Resource properties. + * The Internet Gateway Properties */ private InternetGatewayProperties innerProperties = new InternetGatewayProperties(); @@ -53,7 +53,7 @@ public InternetGatewayInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Internet Gateway Properties. * * @return the innerProperties value. */ @@ -118,6 +118,52 @@ public InternetGatewayInner withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.innerProperties() == null ? null : this.innerProperties().internetGatewayRuleId(); + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withInternetGatewayRuleId(String internetGatewayRuleId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withInternetGatewayRuleId(internetGatewayRuleId); + return this; + } + /** * Get the ipv4Address property: IPv4 Address of Internet Gateway. * @@ -160,100 +206,69 @@ public InternetGatewayInner withTypePropertiesType(GatewayType type) { } /** - * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Get the internetGatewayType property: Gateway Type of the resource. * - * @return the networkFabricControllerId value. + * @return the internetGatewayType value. */ - public String networkFabricControllerId() { - return this.innerProperties() == null ? null : this.innerProperties().networkFabricControllerId(); + public GatewayType internetGatewayType() { + return this.innerProperties() == null ? null : this.innerProperties().internetGatewayType(); } /** - * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Set the internetGatewayType property: Gateway Type of the resource. * - * @param networkFabricControllerId the networkFabricControllerId value to set. + * @param internetGatewayType the internetGatewayType value to set. * @return the InternetGatewayInner object itself. */ - public InternetGatewayInner withNetworkFabricControllerId(String networkFabricControllerId) { + public InternetGatewayInner withInternetGatewayType(GatewayType internetGatewayType) { if (this.innerProperties() == null) { this.innerProperties = new InternetGatewayProperties(); } - this.innerProperties().withNetworkFabricControllerId(networkFabricControllerId); + this.innerProperties().withInternetGatewayType(internetGatewayType); return this; } /** - * Get the provisioningState property: Provisioning state of resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @return the internetGatewayRuleId value. + * @return the networkFabricControllerId value. */ - public String internetGatewayRuleId() { - return this.innerProperties() == null ? null : this.innerProperties().internetGatewayRuleId(); + public String networkFabricControllerId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricControllerId(); } /** - * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @param networkFabricControllerId the networkFabricControllerId value to set. * @return the InternetGatewayInner object itself. */ - public InternetGatewayInner withInternetGatewayRuleId(String internetGatewayRuleId) { + public InternetGatewayInner withNetworkFabricControllerId(String networkFabricControllerId) { if (this.innerProperties() == null) { this.innerProperties = new InternetGatewayProperties(); } - this.innerProperties().withInternetGatewayRuleId(internetGatewayRuleId); + this.innerProperties().withNetworkFabricControllerId(networkFabricControllerId); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the annotation value. + * @return the lastOperation value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Set the annotation property: Switch configuration description. - * - * @param annotation the annotation value to set. - * @return the InternetGatewayInner object itself. - */ - public InternetGatewayInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new InternetGatewayProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternetGatewayInner")); - } else { - innerProperties().validate(); - } + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchProperties.java similarity index 58% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchProperties.java index 17223d29e284..fe5c398516f2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -12,19 +12,19 @@ import java.io.IOException; /** - * Internet Gateway Patchable Properties defines the patchable properties of the resource. + * PatchProperties for InternetGateway. */ @Fluent -public class InternetGatewayPatchableProperties implements JsonSerializable { +public final class InternetGatewayPatchProperties implements JsonSerializable { /* * ARM Resource ID of the Internet Gateway Rule. */ private String internetGatewayRuleId; /** - * Creates an instance of InternetGatewayPatchableProperties class. + * Creates an instance of InternetGatewayPatchProperties class. */ - public InternetGatewayPatchableProperties() { + public InternetGatewayPatchProperties() { } /** @@ -40,21 +40,13 @@ public String internetGatewayRuleId() { * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. * * @param internetGatewayRuleId the internetGatewayRuleId value to set. - * @return the InternetGatewayPatchableProperties object itself. + * @return the InternetGatewayPatchProperties object itself. */ - public InternetGatewayPatchableProperties withInternetGatewayRuleId(String internetGatewayRuleId) { + public InternetGatewayPatchProperties withInternetGatewayRuleId(String internetGatewayRuleId) { this.internetGatewayRuleId = internetGatewayRuleId; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -66,29 +58,29 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of InternetGatewayPatchableProperties from the JsonReader. + * Reads an instance of InternetGatewayPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of InternetGatewayPatchableProperties if the JsonReader was pointing to an instance of it, or + * @return An instance of InternetGatewayPatchProperties if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternetGatewayPatchableProperties. + * @throws IOException If an error occurs while reading the InternetGatewayPatchProperties. */ - public static InternetGatewayPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static InternetGatewayPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - InternetGatewayPatchableProperties deserializedInternetGatewayPatchableProperties - = new InternetGatewayPatchableProperties(); + InternetGatewayPatchProperties deserializedInternetGatewayPatchProperties + = new InternetGatewayPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("internetGatewayRuleId".equals(fieldName)) { - deserializedInternetGatewayPatchableProperties.internetGatewayRuleId = reader.getString(); + deserializedInternetGatewayPatchProperties.internetGatewayRuleId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedInternetGatewayPatchableProperties; + return deserializedInternetGatewayPatchProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java index becd5c745750..5565c3a54ad6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -18,7 +18,17 @@ * Internet Gateway Properties defines the properties of the resource. */ @Fluent -public final class InternetGatewayProperties extends AnnotationResource { +public final class InternetGatewayProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Internet Gateway Rule. + */ + private String internetGatewayRuleId; + /* * IPv4 Address of Internet Gateway. */ @@ -34,20 +44,25 @@ public final class InternetGatewayProperties extends AnnotationResource { */ private GatewayType type; + /* + * Gateway Type of the resource. + */ + private GatewayType internetGatewayType; + /* * ARM Resource ID of the Network Fabric Controller. */ private String networkFabricControllerId; /* - * Provisioning state of resource. + * Details of the last operation performed on the resource */ - private ProvisioningState provisioningState; + private LastOperationProperties lastOperation; /* - * ARM Resource ID of the Internet Gateway Rule. + * Provisioning state of resource. */ - private String internetGatewayRuleId; + private ProvisioningState provisioningState; /** * Creates an instance of InternetGatewayProperties class. @@ -55,6 +70,46 @@ public final class InternetGatewayProperties extends AnnotationResource { public InternetGatewayProperties() { } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.internetGatewayRuleId; + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withInternetGatewayRuleId(String internetGatewayRuleId) { + this.internetGatewayRuleId = internetGatewayRuleId; + return this; + } + /** * Get the ipv4Address property: IPv4 Address of Internet Gateway. * @@ -94,93 +149,75 @@ public InternetGatewayProperties withType(GatewayType type) { } /** - * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Get the internetGatewayType property: Gateway Type of the resource. * - * @return the networkFabricControllerId value. + * @return the internetGatewayType value. */ - public String networkFabricControllerId() { - return this.networkFabricControllerId; + public GatewayType internetGatewayType() { + return this.internetGatewayType; } /** - * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Set the internetGatewayType property: Gateway Type of the resource. * - * @param networkFabricControllerId the networkFabricControllerId value to set. + * @param internetGatewayType the internetGatewayType value to set. * @return the InternetGatewayProperties object itself. */ - public InternetGatewayProperties withNetworkFabricControllerId(String networkFabricControllerId) { - this.networkFabricControllerId = networkFabricControllerId; + public InternetGatewayProperties withInternetGatewayType(GatewayType internetGatewayType) { + this.internetGatewayType = internetGatewayType; return this; } /** - * Get the provisioningState property: Provisioning state of resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @return the internetGatewayRuleId value. + * @return the networkFabricControllerId value. */ - public String internetGatewayRuleId() { - return this.internetGatewayRuleId; + public String networkFabricControllerId() { + return this.networkFabricControllerId; } /** - * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @param networkFabricControllerId the networkFabricControllerId value to set. * @return the InternetGatewayProperties object itself. */ - public InternetGatewayProperties withInternetGatewayRuleId(String internetGatewayRuleId) { - this.internetGatewayRuleId = internetGatewayRuleId; + public InternetGatewayProperties withNetworkFabricControllerId(String networkFabricControllerId) { + this.networkFabricControllerId = networkFabricControllerId; return this; } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public InternetGatewayProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - @Override - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model InternetGatewayProperties")); - } - if (networkFabricControllerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricControllerId in model InternetGatewayProperties")); - } + public ProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("networkFabricControllerId", this.networkFabricControllerId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("internetGatewayRuleId", this.internetGatewayRuleId); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("internetGatewayType", + this.internetGatewayType == null ? null : this.internetGatewayType.toString()); return jsonWriter.writeEndObject(); } @@ -200,21 +237,26 @@ public static InternetGatewayProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedInternetGatewayProperties.withAnnotation(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedInternetGatewayProperties.type = GatewayType.fromString(reader.getString()); - } else if ("networkFabricControllerId".equals(fieldName)) { + if ("networkFabricControllerId".equals(fieldName)) { deserializedInternetGatewayProperties.networkFabricControllerId = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedInternetGatewayProperties.annotation = reader.getString(); + } else if ("internetGatewayRuleId".equals(fieldName)) { + deserializedInternetGatewayProperties.internetGatewayRuleId = reader.getString(); } else if ("ipv4Address".equals(fieldName)) { deserializedInternetGatewayProperties.ipv4Address = reader.getString(); } else if ("port".equals(fieldName)) { deserializedInternetGatewayProperties.port = reader.getNullable(JsonReader::getInt); + } else if ("type".equals(fieldName)) { + deserializedInternetGatewayProperties.type = GatewayType.fromString(reader.getString()); + } else if ("internetGatewayType".equals(fieldName)) { + deserializedInternetGatewayProperties.internetGatewayType + = GatewayType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternetGatewayProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedInternetGatewayProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("internetGatewayRuleId".equals(fieldName)) { - deserializedInternetGatewayProperties.internetGatewayRuleId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java index 89f89ed01824..9967c32d9136 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.io.IOException; @@ -23,7 +23,7 @@ @Fluent public final class InternetGatewayRuleInner extends Resource { /* - * Resource properties. + * The Internet Gateway Rule properties */ private InternetGatewayRuleProperties innerProperties = new InternetGatewayRuleProperties(); @@ -54,7 +54,7 @@ public InternetGatewayRuleInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Internet Gateway Rule properties. * * @return the innerProperties value. */ @@ -142,6 +142,15 @@ public InternetGatewayRuleInner withRuleProperties(RuleProperties ruleProperties return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -183,23 +192,6 @@ public InternetGatewayRuleInner withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternetGatewayRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java index c7908dbaa9ec..2f647b1763ec 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.io.IOException; @@ -25,6 +25,11 @@ public final class InternetGatewayRuleProperties extends AnnotationResource { */ private RuleProperties ruleProperties; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ @@ -61,6 +66,15 @@ public InternetGatewayRuleProperties withRuleProperties(RuleProperties rulePrope return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -88,24 +102,6 @@ public InternetGatewayRuleProperties withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (ruleProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ruleProperties in model InternetGatewayRuleProperties")); - } else { - ruleProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleProperties.class); - /** * {@inheritDoc} */ @@ -138,6 +134,8 @@ public static InternetGatewayRuleProperties fromJson(JsonReader jsonReader) thro deserializedInternetGatewayRuleProperties.withAnnotation(reader.getString()); } else if ("ruleProperties".equals(fieldName)) { deserializedInternetGatewayRuleProperties.ruleProperties = RuleProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternetGatewayRuleProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedInternetGatewayRuleProperties.provisioningState = ProvisioningState.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java index 3667dc88f6c4..fe58d9a0798a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -25,7 +25,7 @@ @Fluent public final class IpCommunityInner extends Resource { /* - * Resource properties. + * The IP Community Properties */ private IpCommunityProperties innerProperties = new IpCommunityProperties(); @@ -56,7 +56,7 @@ public IpCommunityInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The IP Community Properties. * * @return the innerProperties value. */ @@ -122,30 +122,35 @@ public IpCommunityInner withTags(Map tags) { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpCommunityInner object itself. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public IpCommunityInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new IpCommunityProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** @@ -172,44 +177,40 @@ public IpCommunityInner withIpCommunityRules(List ipCommunityRu } /** - * Get the annotation property: Switch configuration description. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the annotation value. + * @return the lastOperation value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Set the annotation property: Switch configuration description. + * Get the configurationState property: Configuration state of the resource. * - * @param annotation the annotation value to set. - * @return the IpCommunityInner object itself. + * @return the configurationState value. */ - public IpCommunityInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model IpCommunityInner")); - } else { - innerProperties().validate(); - } + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(IpCommunityInner.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java index e81bd5ea4635..647a9e7fbe05 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -17,7 +17,7 @@ * IP Community patchable properties. */ @Fluent -public class IpCommunityPatchableProperties implements JsonSerializable { +public final class IpCommunityPatchableProperties implements JsonSerializable { /* * List of IP Community Rules. */ @@ -49,17 +49,6 @@ public IpCommunityPatchableProperties withIpCommunityRules(List return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipCommunityRules() != null) { - ipCommunityRules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java index f526bbd2c167..d9a9ab4bba1d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -20,7 +21,27 @@ * IP Community Properties defines the resource properties. */ @Fluent -public final class IpCommunityProperties extends AnnotationResource { +public final class IpCommunityProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * List of IP Community Rules. + */ + private List ipCommunityRules; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -36,11 +57,6 @@ public final class IpCommunityProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * List of IP Community Rules. - */ - private List ipCommunityRules; - /** * Creates an instance of IpCommunityProperties class. */ @@ -48,30 +64,32 @@ public IpCommunityProperties() { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpCommunityProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpCommunityProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public String networkFabricId() { + return this.networkFabricId; } /** @@ -95,24 +113,39 @@ public IpCommunityProperties withIpCommunityRules(List ipCommun } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public IpCommunityProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - @Override - public void validate() { - if (ipCommunityRules() != null) { - ipCommunityRules().forEach(e -> e.validate()); - } + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -121,9 +154,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipCommunityRules", this.ipCommunityRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -133,6 +166,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpCommunityProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpCommunityProperties. */ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOException { @@ -142,8 +176,16 @@ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpCommunityProperties.withAnnotation(reader.getString()); + if ("ipCommunityRules".equals(fieldName)) { + List ipCommunityRules + = reader.readArray(reader1 -> IpCommunityRule.fromJson(reader1)); + deserializedIpCommunityProperties.ipCommunityRules = ipCommunityRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpCommunityProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpCommunityProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpCommunityProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpCommunityProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -153,10 +195,6 @@ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("administrativeState".equals(fieldName)) { deserializedIpCommunityProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("ipCommunityRules".equals(fieldName)) { - List ipCommunityRules - = reader.readArray(reader1 -> IpCommunityRule.fromJson(reader1)); - deserializedIpCommunityProperties.ipCommunityRules = ipCommunityRules; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java index 2a2240106e8b..a67ee33cb88f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -25,7 +25,7 @@ @Fluent public final class IpExtendedCommunityInner extends Resource { /* - * Resource properties. + * The IpExtendedCommunity properties */ private IpExtendedCommunityProperties innerProperties = new IpExtendedCommunityProperties(); @@ -56,7 +56,7 @@ public IpExtendedCommunityInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The IpExtendedCommunity properties. * * @return the innerProperties value. */ @@ -122,30 +122,26 @@ public IpExtendedCommunityInner withTags(Map tags) { } /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the IpExtendedCommunityInner object itself. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public IpExtendedCommunityInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new IpExtendedCommunityProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** @@ -173,44 +169,49 @@ public List ipExtendedCommunityRules() { } /** - * Get the annotation property: Switch configuration description. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the annotation value. + * @return the networkFabricId value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** - * Set the annotation property: Switch configuration description. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @param annotation the annotation value to set. - * @return the IpExtendedCommunityInner object itself. + * @return the lastOperation value. */ - public IpExtendedCommunityInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model IpExtendedCommunityInner")); - } else { - innerProperties().validate(); - } + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityInner.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java index 3f2697f41e48..7370959b4018 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java @@ -1,15 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchableProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.io.IOException; import java.util.List; @@ -18,12 +17,17 @@ * IP Extended Community patchable properties. */ @Fluent -public final class IpExtendedCommunityPatchProperties extends IpExtendedCommunityPatchableProperties { +public final class IpExtendedCommunityPatchProperties implements JsonSerializable { /* * Switch configuration description. */ private String annotation; + /* + * List of IP Extended Community Rules. + */ + private List ipExtendedCommunityRules; + /** * Creates an instance of IpExtendedCommunityPatchProperties class. */ @@ -51,42 +55,35 @@ public IpExtendedCommunityPatchProperties withAnnotation(String annotation) { } /** - * {@inheritDoc} + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. */ - @Override - public IpExtendedCommunityPatchProperties - withIpExtendedCommunityRules(List ipExtendedCommunityRules) { - super.withIpExtendedCommunityRules(ipExtendedCommunityRules); - return this; + public List ipExtendedCommunityRules() { + return this.ipExtendedCommunityRules; } /** - * Validates the instance. + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityPatchProperties object itself. */ - @Override - public void validate() { - if (ipExtendedCommunityRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityPatchProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } + public IpExtendedCommunityPatchProperties + withIpExtendedCommunityRules(List ipExtendedCommunityRules) { + this.ipExtendedCommunityRules = ipExtendedCommunityRules; + return this; } - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityPatchProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipExtendedCommunityRules", ipExtendedCommunityRules(), - (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -96,7 +93,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpExtendedCommunityPatchProperties if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpExtendedCommunityPatchProperties. */ public static IpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { @@ -107,13 +103,12 @@ public static IpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("ipExtendedCommunityRules".equals(fieldName)) { + if ("annotation".equals(fieldName)) { + deserializedIpExtendedCommunityPatchProperties.annotation = reader.getString(); + } else if ("ipExtendedCommunityRules".equals(fieldName)) { List ipExtendedCommunityRules = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); - deserializedIpExtendedCommunityPatchProperties - .withIpExtendedCommunityRules(ipExtendedCommunityRules); - } else if ("annotation".equals(fieldName)) { - deserializedIpExtendedCommunityPatchProperties.annotation = reader.getString(); + deserializedIpExtendedCommunityPatchProperties.ipExtendedCommunityRules = ipExtendedCommunityRules; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java index 913ff4125ed3..7d11574d5abd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -21,7 +21,27 @@ * IP Extended Community Properties defines the resource properties. */ @Fluent -public final class IpExtendedCommunityProperties extends AnnotationResource { +public final class IpExtendedCommunityProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * List of IP Extended Community Rules. + */ + private List ipExtendedCommunityRules; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -37,11 +57,6 @@ public final class IpExtendedCommunityProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * List of IP Extended Community Rules. - */ - private List ipExtendedCommunityRules; - /** * Creates an instance of IpExtendedCommunityProperties class. */ @@ -49,30 +64,23 @@ public IpExtendedCommunityProperties() { } /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.configurationState; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the IpExtendedCommunityProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public IpExtendedCommunityProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -97,31 +105,49 @@ public List ipExtendedCommunityRules() { } /** - * {@inheritDoc} + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. */ - @Override - public IpExtendedCommunityProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public String networkFabricId() { + return this.networkFabricId; } /** - * Validates the instance. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the lastOperation value. */ - @Override - public void validate() { - if (ipExtendedCommunityRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityProperties.class); + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } /** * {@inheritDoc} @@ -129,9 +155,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -152,12 +178,16 @@ public static IpExtendedCommunityProperties fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpExtendedCommunityProperties.withAnnotation(reader.getString()); - } else if ("ipExtendedCommunityRules".equals(fieldName)) { + if ("ipExtendedCommunityRules".equals(fieldName)) { List ipExtendedCommunityRules = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); deserializedIpExtendedCommunityProperties.ipExtendedCommunityRules = ipExtendedCommunityRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpExtendedCommunityProperties.configurationState = ConfigurationState.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java index d91926868cf9..9d073e64e4c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -25,7 +25,7 @@ @Fluent public final class IpPrefixInner extends Resource { /* - * Resource properties. + * The IP Prefix properties */ private IpPrefixProperties innerProperties = new IpPrefixProperties(); @@ -56,7 +56,7 @@ public IpPrefixInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The IP Prefix properties. * * @return the innerProperties value. */ @@ -122,30 +122,35 @@ public IpPrefixInner withTags(Map tags) { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpPrefixInner object itself. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public IpPrefixInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new IpPrefixProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** @@ -172,43 +177,40 @@ public IpPrefixInner withIpPrefixRules(List ipPrefixRules) { } /** - * Get the annotation property: Switch configuration description. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the annotation value. + * @return the lastOperation value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Set the annotation property: Switch configuration description. + * Get the configurationState property: Configuration state of the resource. * - * @param annotation the annotation value to set. - * @return the IpPrefixInner object itself. + * @return the configurationState value. */ - public IpPrefixInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpPrefixProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model IpPrefixInner")); - } else { - innerProperties().validate(); - } + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixInner.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java index d71d589d51f0..7dc3b8281006 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.io.IOException; import java.util.List; @@ -17,7 +17,12 @@ * IP Prefix patchable properties. */ @Fluent -public final class IpPrefixPatchProperties extends AnnotationResource { +public final class IpPrefixPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * The list of IP Prefix Rules. */ @@ -30,44 +35,43 @@ public IpPrefixPatchProperties() { } /** - * Get the ipPrefixRules property: The list of IP Prefix Rules. + * Get the annotation property: Switch configuration description. * - * @return the ipPrefixRules value. + * @return the annotation value. */ - public List ipPrefixRules() { - return this.ipPrefixRules; + public String annotation() { + return this.annotation; } /** - * Set the ipPrefixRules property: The list of IP Prefix Rules. + * Set the annotation property: Switch configuration description. * - * @param ipPrefixRules the ipPrefixRules value to set. + * @param annotation the annotation value to set. * @return the IpPrefixPatchProperties object itself. */ - public IpPrefixPatchProperties withIpPrefixRules(List ipPrefixRules) { - this.ipPrefixRules = ipPrefixRules; + public IpPrefixPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * {@inheritDoc} + * Get the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. */ - @Override - public IpPrefixPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public List ipPrefixRules() { + return this.ipPrefixRules; } /** - * Validates the instance. + * Set the ipPrefixRules property: The list of IP Prefix Rules. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipPrefixRules the ipPrefixRules value to set. + * @return the IpPrefixPatchProperties object itself. */ - @Override - public void validate() { - if (ipPrefixRules() != null) { - ipPrefixRules().forEach(e -> e.validate()); - } + public IpPrefixPatchProperties withIpPrefixRules(List ipPrefixRules) { + this.ipPrefixRules = ipPrefixRules; + return this; } /** @@ -76,7 +80,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -97,7 +101,7 @@ public static IpPrefixPatchProperties fromJson(JsonReader jsonReader) throws IOE reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedIpPrefixPatchProperties.withAnnotation(reader.getString()); + deserializedIpPrefixPatchProperties.annotation = reader.getString(); } else if ("ipPrefixRules".equals(fieldName)) { List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); deserializedIpPrefixPatchProperties.ipPrefixRules = ipPrefixRules; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java index 9e8a0527165a..f0bbf9d263be 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -20,7 +21,27 @@ * IP Prefix Properties defines the properties of the resource. */ @Fluent -public final class IpPrefixProperties extends AnnotationResource { +public final class IpPrefixProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * The list of IP Prefix Rules. + */ + private List ipPrefixRules; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -36,11 +57,6 @@ public final class IpPrefixProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * The list of IP Prefix Rules. - */ - private List ipPrefixRules; - /** * Creates an instance of IpPrefixProperties class. */ @@ -48,30 +64,32 @@ public IpPrefixProperties() { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpPrefixProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpPrefixProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public String networkFabricId() { + return this.networkFabricId; } /** @@ -95,24 +113,39 @@ public IpPrefixProperties withIpPrefixRules(List ipPrefixRules) { } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public IpPrefixProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - @Override - public void validate() { - if (ipPrefixRules() != null) { - ipPrefixRules().forEach(e -> e.validate()); - } + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -121,8 +154,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -132,6 +165,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpPrefixProperties if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpPrefixProperties. */ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOException { @@ -141,8 +175,15 @@ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpPrefixProperties.withAnnotation(reader.getString()); + if ("ipPrefixRules".equals(fieldName)) { + List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); + deserializedIpPrefixProperties.ipPrefixRules = ipPrefixRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpPrefixProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpPrefixProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpPrefixProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpPrefixProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -151,9 +192,6 @@ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOExcept } else if ("administrativeState".equals(fieldName)) { deserializedIpPrefixProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("ipPrefixRules".equals(fieldName)) { - List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); - deserializedIpPrefixProperties.ipPrefixRules = ipPrefixRules; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java index 9e5b1f3da88d..dc77c73e0511 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java @@ -1,18 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.Map; @@ -23,10 +25,15 @@ @Fluent public final class L2IsolationDomainInner extends Resource { /* - * Resource properties. + * The L2IsolationDomain properties */ private L2IsolationDomainProperties innerProperties = new L2IsolationDomainProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -54,7 +61,7 @@ public L2IsolationDomainInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The L2IsolationDomain properties. * * @return the innerProperties value. */ @@ -62,6 +69,26 @@ private L2IsolationDomainProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the L2IsolationDomainInner object itself. + */ + public L2IsolationDomainInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -188,6 +215,63 @@ public L2IsolationDomainInner withMtu(Integer mtu) { return this; } + /** + * Get the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @return the extendedVlan value. + */ + public ExtendedVlan extendedVlan() { + return this.innerProperties() == null ? null : this.innerProperties().extendedVlan(); + } + + /** + * Set the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainInner object itself. + */ + public L2IsolationDomainInner withExtendedVlan(ExtendedVlan extendedVlan) { + if (this.innerProperties() == null) { + this.innerProperties = new L2IsolationDomainProperties(); + } + this.innerProperties().withExtendedVlan(extendedVlan); + return this; + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainInner object itself. + */ + public L2IsolationDomainInner withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + if (this.innerProperties() == null) { + this.innerProperties = new L2IsolationDomainProperties(); + } + this.innerProperties().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -238,23 +322,6 @@ public L2IsolationDomainInner withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model L2IsolationDomainInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainInner.class); - /** * {@inheritDoc} */ @@ -264,6 +331,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -296,6 +364,8 @@ public static L2IsolationDomainInner fromJson(JsonReader jsonReader) throws IOEx deserializedL2IsolationDomainInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedL2IsolationDomainInner.innerProperties = L2IsolationDomainProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedL2IsolationDomainInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedL2IsolationDomainInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java index a3881293c1d6..2e85d0d5d7ee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import java.io.IOException; /** @@ -21,6 +22,16 @@ public final class L2IsolationDomainPatchProperties extends AnnotationResource { */ private Integer mtu; + /* + * Extended VLAN status. + */ + private ExtendedVlan extendedVlan; + + /* + * ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource. + */ + private String networkToNetworkInterconnectId; + /** * Creates an instance of L2IsolationDomainPatchProperties class. */ @@ -48,21 +59,54 @@ public L2IsolationDomainPatchProperties withMtu(Integer mtu) { } /** - * {@inheritDoc} + * Get the extendedVlan property: Extended VLAN status. + * + * @return the extendedVlan value. */ - @Override - public L2IsolationDomainPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public ExtendedVlan extendedVlan() { + return this.extendedVlan; + } + + /** + * Set the extendedVlan property: Extended VLAN status. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withExtendedVlan(ExtendedVlan extendedVlan) { + this.extendedVlan = extendedVlan; return this; } /** - * Validates the instance. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { + public L2IsolationDomainPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; } /** @@ -73,6 +117,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeStringField("extendedVlan", this.extendedVlan == null ? null : this.extendedVlan.toString()); + jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); return jsonWriter.writeEndObject(); } @@ -96,6 +142,11 @@ public static L2IsolationDomainPatchProperties fromJson(JsonReader jsonReader) t deserializedL2IsolationDomainPatchProperties.withAnnotation(reader.getString()); } else if ("mtu".equals(fieldName)) { deserializedL2IsolationDomainPatchProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("extendedVlan".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.extendedVlan + = ExtendedVlan.fromString(reader.getString()); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.networkToNetworkInterconnectId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java index 40cadabd1eb1..c878733c216d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -35,6 +36,21 @@ public final class L2IsolationDomainProperties extends AnnotationResource { */ private Integer mtu; + /* + * Extended VLAN status, default value is Disabled. + */ + private ExtendedVlan extendedVlan; + + /* + * ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource. + */ + private String networkToNetworkInterconnectId; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -116,6 +132,57 @@ public L2IsolationDomainProperties withMtu(Integer mtu) { return this; } + /** + * Get the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @return the extendedVlan value. + */ + public ExtendedVlan extendedVlan() { + return this.extendedVlan; + } + + /** + * Set the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainProperties object itself. + */ + public L2IsolationDomainProperties withExtendedVlan(ExtendedVlan extendedVlan) { + this.extendedVlan = extendedVlan; + return this; + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainProperties object itself. + */ + public L2IsolationDomainProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -152,22 +219,6 @@ public L2IsolationDomainProperties withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model L2IsolationDomainProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainProperties.class); - /** * {@inheritDoc} */ @@ -178,6 +229,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("networkFabricId", this.networkFabricId); jsonWriter.writeIntField("vlanId", this.vlanId); jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeStringField("extendedVlan", this.extendedVlan == null ? null : this.extendedVlan.toString()); + jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); return jsonWriter.writeEndObject(); } @@ -205,6 +258,12 @@ public static L2IsolationDomainProperties fromJson(JsonReader jsonReader) throws deserializedL2IsolationDomainProperties.vlanId = reader.getInt(); } else if ("mtu".equals(fieldName)) { deserializedL2IsolationDomainProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("extendedVlan".equals(fieldName)) { + deserializedL2IsolationDomainProperties.extendedVlan = ExtendedVlan.fromString(reader.getString()); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedL2IsolationDomainProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedL2IsolationDomainProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedL2IsolationDomainProperties.configurationState = ConfigurationState.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java index 667e6834ae70..76b6e68f55a7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java @@ -1,23 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.io.IOException; import java.util.Map; @@ -27,10 +32,15 @@ @Fluent public final class L3IsolationDomainInner extends Resource { /* - * Resource properties. + * The L3 Isolation Domain Properties */ private L3IsolationDomainProperties innerProperties = new L3IsolationDomainProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -58,7 +68,7 @@ public L3IsolationDomainInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The L3 Isolation Domain Properties. * * @return the innerProperties value. */ @@ -66,6 +76,26 @@ private L3IsolationDomainProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -124,55 +154,28 @@ public L3IsolationDomainInner withTags(Map tags) { } /** - * Get the networkFabricId property: ARM Resource ID of the Network Fabric. + * Get the annotation property: Switch configuration description. * - * @return the networkFabricId value. + * @return the annotation value. */ - public String networkFabricId() { - return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the networkFabricId property: ARM Resource ID of the Network Fabric. + * Set the annotation property: Switch configuration description. * - * @param networkFabricId the networkFabricId value to set. + * @param annotation the annotation value to set. * @return the L3IsolationDomainInner object itself. */ - public L3IsolationDomainInner withNetworkFabricId(String networkFabricId) { + public L3IsolationDomainInner withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainProperties(); } - this.innerProperties().withNetworkFabricId(networkFabricId); + this.innerProperties().withAnnotation(annotation); return this; } - /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - /** * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". * @@ -269,44 +272,179 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { } /** - * Get the annotation property: Switch configuration description. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the annotation value. + * @return the networkFabricId value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** - * Set the annotation property: Switch configuration description. + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @param annotation the annotation value to set. + * @param networkFabricId the networkFabricId value to set. * @return the L3IsolationDomainInner object itself. */ - public L3IsolationDomainInner withAnnotation(String annotation) { + public L3IsolationDomainInner withNetworkFabricId(String networkFabricId) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withNetworkFabricId(networkFabricId); return this; } /** - * Validates the instance. + * Get the staticRouteRoutePolicy property: Static Route - route policy. + * + * @return the staticRouteRoutePolicy value. + */ + public StaticRouteRoutePolicy staticRouteRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteRoutePolicy(); + } + + /** + * Set the staticRouteRoutePolicy property: Static Route - route policy. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. + * @return the L3IsolationDomainInner object itself. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model L3IsolationDomainInner")); - } else { - innerProperties().validate(); + public L3IsolationDomainInner withStaticRouteRoutePolicy(StaticRouteRoutePolicy staticRouteRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainProperties(); } + this.innerProperties().withStaticRouteRoutePolicy(staticRouteRoutePolicy); + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public L3UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().uniqueRdConfiguration(); } - private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainInner.class); + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner + withUniqueRdConfiguration(L3UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainProperties(); + } + this.innerProperties().withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + /** + * Get the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @return the v4routePrefixLimit value. + */ + public RoutePrefixLimitProperties v4routePrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().v4routePrefixLimit(); + } + + /** + * Set the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @param v4routePrefixLimit the v4routePrefixLimit value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner withV4routePrefixLimit(RoutePrefixLimitProperties v4routePrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainProperties(); + } + this.innerProperties().withV4routePrefixLimit(v4routePrefixLimit); + return this; + } + + /** + * Get the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @return the v6routePrefixLimit value. + */ + public RoutePrefixLimitProperties v6routePrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().v6routePrefixLimit(); + } + + /** + * Set the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @param v6routePrefixLimit the v6routePrefixLimit value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner withV6routePrefixLimit(RoutePrefixLimitProperties v6routePrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainProperties(); + } + this.innerProperties().withV6routePrefixLimit(v6routePrefixLimit); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyProperties exportPolicyConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().exportPolicyConfiguration(); + } + + /** + * Set the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainProperties(); + } + this.innerProperties().withExportPolicyConfiguration(exportPolicyConfiguration); + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} @@ -317,6 +455,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -349,6 +488,8 @@ public static L3IsolationDomainInner fromJson(JsonReader jsonReader) throws IOEx deserializedL3IsolationDomainInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedL3IsolationDomainInner.innerProperties = L3IsolationDomainProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedL3IsolationDomainInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedL3IsolationDomainInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java index 414036b8b194..165a62b43ade 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java @@ -1,25 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.io.IOException; /** * Resource properties. */ @Fluent -public final class L3IsolationDomainPatchProperties extends AnnotationResource { +public final class L3IsolationDomainPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Advertise Connected Subnets. Ex: "True" | "False". */ @@ -33,12 +41,32 @@ public final class L3IsolationDomainPatchProperties extends AnnotationResource { /* * Aggregate route configurations. */ - private AggregateRouteConfiguration aggregateRouteConfiguration; + private AggregateRoutePatchConfiguration aggregateRouteConfiguration; /* * Connected Subnet RoutePolicy */ - private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy; + + /* + * Static Route - route policy. + */ + private StaticRouteRoutePolicyPatch staticRouteRoutePolicy; + + /* + * IPv4 VRF Limit configuration. + */ + private RoutePrefixLimitPatchProperties v4routePrefixLimit; + + /* + * IPv6 VRF Limit configuration. + */ + private RoutePrefixLimitPatchProperties v6routePrefixLimit; + + /* + * BMP Export Policy configuration. + */ + private BmpExportPolicyPatchProperties exportPolicyConfiguration; /** * Creates an instance of L3IsolationDomainPatchProperties class. @@ -46,6 +74,26 @@ public final class L3IsolationDomainPatchProperties extends AnnotationResource { public L3IsolationDomainPatchProperties() { } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". * @@ -93,7 +141,7 @@ public RedistributeStaticRoutes redistributeStaticRoutes() { * * @return the aggregateRouteConfiguration value. */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { + public AggregateRoutePatchConfiguration aggregateRouteConfiguration() { return this.aggregateRouteConfiguration; } @@ -104,7 +152,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * @return the L3IsolationDomainPatchProperties object itself. */ public L3IsolationDomainPatchProperties - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { + withAggregateRouteConfiguration(AggregateRoutePatchConfiguration aggregateRouteConfiguration) { this.aggregateRouteConfiguration = aggregateRouteConfiguration; return this; } @@ -114,7 +162,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * * @return the connectedSubnetRoutePolicy value. */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy() { return this.connectedSubnetRoutePolicy; } @@ -125,33 +173,91 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { * @return the L3IsolationDomainPatchProperties object itself. */ public L3IsolationDomainPatchProperties - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy) { this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; return this; } /** - * {@inheritDoc} + * Get the staticRouteRoutePolicy property: Static Route - route policy. + * + * @return the staticRouteRoutePolicy value. */ - @Override - public L3IsolationDomainPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public StaticRouteRoutePolicyPatch staticRouteRoutePolicy() { + return this.staticRouteRoutePolicy; + } + + /** + * Set the staticRouteRoutePolicy property: Static Route - route policy. + * + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties + withStaticRouteRoutePolicy(StaticRouteRoutePolicyPatch staticRouteRoutePolicy) { + this.staticRouteRoutePolicy = staticRouteRoutePolicy; return this; } /** - * Validates the instance. + * Get the v4routePrefixLimit property: IPv4 VRF Limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the v4routePrefixLimit value. */ - @Override - public void validate() { - if (aggregateRouteConfiguration() != null) { - aggregateRouteConfiguration().validate(); - } - if (connectedSubnetRoutePolicy() != null) { - connectedSubnetRoutePolicy().validate(); - } + public RoutePrefixLimitPatchProperties v4routePrefixLimit() { + return this.v4routePrefixLimit; + } + + /** + * Set the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @param v4routePrefixLimit the v4routePrefixLimit value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties withV4routePrefixLimit(RoutePrefixLimitPatchProperties v4routePrefixLimit) { + this.v4routePrefixLimit = v4routePrefixLimit; + return this; + } + + /** + * Get the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @return the v6routePrefixLimit value. + */ + public RoutePrefixLimitPatchProperties v6routePrefixLimit() { + return this.v6routePrefixLimit; + } + + /** + * Set the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @param v6routePrefixLimit the v6routePrefixLimit value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties withV6routePrefixLimit(RoutePrefixLimitPatchProperties v6routePrefixLimit) { + this.v6routePrefixLimit = v6routePrefixLimit; + return this; + } + + /** + * Get the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyPatchProperties exportPolicyConfiguration() { + return this.exportPolicyConfiguration; + } + + /** + * Set the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties + withExportPolicyConfiguration(BmpExportPolicyPatchProperties exportPolicyConfiguration) { + this.exportPolicyConfiguration = exportPolicyConfiguration; + return this; } /** @@ -160,13 +266,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("redistributeConnectedSubnets", this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); jsonWriter.writeStringField("redistributeStaticRoutes", this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); + jsonWriter.writeJsonField("staticRouteRoutePolicy", this.staticRouteRoutePolicy); + jsonWriter.writeJsonField("v4routePrefixLimit", this.v4routePrefixLimit); + jsonWriter.writeJsonField("v6routePrefixLimit", this.v6routePrefixLimit); + jsonWriter.writeJsonField("exportPolicyConfiguration", this.exportPolicyConfiguration); return jsonWriter.writeEndObject(); } @@ -187,7 +297,7 @@ public static L3IsolationDomainPatchProperties fromJson(JsonReader jsonReader) t reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedL3IsolationDomainPatchProperties.withAnnotation(reader.getString()); + deserializedL3IsolationDomainPatchProperties.annotation = reader.getString(); } else if ("redistributeConnectedSubnets".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.redistributeConnectedSubnets = RedistributeConnectedSubnets.fromString(reader.getString()); @@ -196,10 +306,22 @@ public static L3IsolationDomainPatchProperties fromJson(JsonReader jsonReader) t = RedistributeStaticRoutes.fromString(reader.getString()); } else if ("aggregateRouteConfiguration".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.aggregateRouteConfiguration - = AggregateRouteConfiguration.fromJson(reader); + = AggregateRoutePatchConfiguration.fromJson(reader); } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.connectedSubnetRoutePolicy - = ConnectedSubnetRoutePolicy.fromJson(reader); + = ConnectedSubnetRoutePolicyPatch.fromJson(reader); + } else if ("staticRouteRoutePolicy".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.staticRouteRoutePolicy + = StaticRouteRoutePolicyPatch.fromJson(reader); + } else if ("v4routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.v4routePrefixLimit + = RoutePrefixLimitPatchProperties.fromJson(reader); + } else if ("v6routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.v6routePrefixLimit + = RoutePrefixLimitPatchProperties.fromJson(reader); + } else if ("exportPolicyConfiguration".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.exportPolicyConfiguration + = BmpExportPolicyPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java index d21c9f95ff50..30645a36f695 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java @@ -1,120 +1,132 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.io.IOException; /** * L3 Isolation Domain Properties defines the properties of the resource. */ @Fluent -public final class L3IsolationDomainProperties extends AnnotationResource { +public final class L3IsolationDomainProperties implements JsonSerializable { /* - * ARM Resource ID of the Network Fabric. + * Switch configuration description. */ - private String networkFabricId; + private String annotation; /* - * Configuration state of the resource. + * Advertise Connected Subnets. Ex: "True" | "False". */ - private ConfigurationState configurationState; + private RedistributeConnectedSubnets redistributeConnectedSubnets; /* - * Provisioning state of the resource. + * Advertise Static Routes. Ex: "True" | "False". */ - private ProvisioningState provisioningState; + private RedistributeStaticRoutes redistributeStaticRoutes; /* - * Administrative state of the resource. + * Aggregate route configurations. */ - private AdministrativeState administrativeState; + private AggregateRouteConfiguration aggregateRouteConfiguration; /* - * Advertise Connected Subnets. Ex: "True" | "False". + * Connected Subnet RoutePolicy */ - private RedistributeConnectedSubnets redistributeConnectedSubnets; + private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; /* - * Advertise Static Routes. Ex: "True" | "False". + * ARM Resource ID of the Network Fabric. */ - private RedistributeStaticRoutes redistributeStaticRoutes; + private String networkFabricId; /* - * Aggregate route configurations. + * Static Route - route policy. */ - private AggregateRouteConfiguration aggregateRouteConfiguration; + private StaticRouteRoutePolicy staticRouteRoutePolicy; /* - * Connected Subnet RoutePolicy + * Unique Route Distinguisher configuration */ - private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private L3UniqueRouteDistinguisherProperties uniqueRdConfiguration; - /** - * Creates an instance of L3IsolationDomainProperties class. + /* + * IPv4 VRF Limit configuration. */ - public L3IsolationDomainProperties() { - } + private RoutePrefixLimitProperties v4routePrefixLimit; - /** - * Get the networkFabricId property: ARM Resource ID of the Network Fabric. - * - * @return the networkFabricId value. + /* + * IPv6 VRF Limit configuration. */ - public String networkFabricId() { - return this.networkFabricId; - } + private RoutePrefixLimitProperties v6routePrefixLimit; - /** - * Set the networkFabricId property: ARM Resource ID of the Network Fabric. - * - * @param networkFabricId the networkFabricId value to set. - * @return the L3IsolationDomainProperties object itself. + /* + * Details of the last operation performed on the resource */ - public L3IsolationDomainProperties withNetworkFabricId(String networkFabricId) { - this.networkFabricId = networkFabricId; - return this; - } + private LastOperationProperties lastOperation; + + /* + * BMP Export Policy configuration. + */ + private BmpExportPolicyProperties exportPolicyConfiguration; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of L3IsolationDomainProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public L3IsolationDomainProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the L3IsolationDomainProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public L3IsolationDomainProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -201,35 +213,162 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { } /** - * {@inheritDoc} + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. */ - @Override - public L3IsolationDomainProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public String networkFabricId() { + return this.networkFabricId; + } + + /** + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @param networkFabricId the networkFabricId value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withNetworkFabricId(String networkFabricId) { + this.networkFabricId = networkFabricId; return this; } /** - * Validates the instance. + * Get the staticRouteRoutePolicy property: Static Route - route policy. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteRoutePolicy value. */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model L3IsolationDomainProperties")); - } - if (aggregateRouteConfiguration() != null) { - aggregateRouteConfiguration().validate(); - } - if (connectedSubnetRoutePolicy() != null) { - connectedSubnetRoutePolicy().validate(); - } + public StaticRouteRoutePolicy staticRouteRoutePolicy() { + return this.staticRouteRoutePolicy; + } + + /** + * Set the staticRouteRoutePolicy property: Static Route - route policy. + * + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withStaticRouteRoutePolicy(StaticRouteRoutePolicy staticRouteRoutePolicy) { + this.staticRouteRoutePolicy = staticRouteRoutePolicy; + return this; } - private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainProperties.class); + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public L3UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties + withUniqueRdConfiguration(L3UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * Get the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @return the v4routePrefixLimit value. + */ + public RoutePrefixLimitProperties v4routePrefixLimit() { + return this.v4routePrefixLimit; + } + + /** + * Set the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @param v4routePrefixLimit the v4routePrefixLimit value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withV4routePrefixLimit(RoutePrefixLimitProperties v4routePrefixLimit) { + this.v4routePrefixLimit = v4routePrefixLimit; + return this; + } + + /** + * Get the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @return the v6routePrefixLimit value. + */ + public RoutePrefixLimitProperties v6routePrefixLimit() { + return this.v6routePrefixLimit; + } + + /** + * Set the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @param v6routePrefixLimit the v6routePrefixLimit value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withV6routePrefixLimit(RoutePrefixLimitProperties v6routePrefixLimit) { + this.v6routePrefixLimit = v6routePrefixLimit; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyProperties exportPolicyConfiguration() { + return this.exportPolicyConfiguration; + } + + /** + * Set the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties + withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration) { + this.exportPolicyConfiguration = exportPolicyConfiguration; + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } /** * {@inheritDoc} @@ -237,14 +376,19 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("redistributeConnectedSubnets", this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); jsonWriter.writeStringField("redistributeStaticRoutes", this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); + jsonWriter.writeJsonField("staticRouteRoutePolicy", this.staticRouteRoutePolicy); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + jsonWriter.writeJsonField("v4routePrefixLimit", this.v4routePrefixLimit); + jsonWriter.writeJsonField("v6routePrefixLimit", this.v6routePrefixLimit); + jsonWriter.writeJsonField("exportPolicyConfiguration", this.exportPolicyConfiguration); return jsonWriter.writeEndObject(); } @@ -264,19 +408,10 @@ public static L3IsolationDomainProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedL3IsolationDomainProperties.withAnnotation(reader.getString()); - } else if ("networkFabricId".equals(fieldName)) { + if ("networkFabricId".equals(fieldName)) { deserializedL3IsolationDomainProperties.networkFabricId = reader.getString(); - } else if ("configurationState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedL3IsolationDomainProperties.annotation = reader.getString(); } else if ("redistributeConnectedSubnets".equals(fieldName)) { deserializedL3IsolationDomainProperties.redistributeConnectedSubnets = RedistributeConnectedSubnets.fromString(reader.getString()); @@ -289,6 +424,32 @@ public static L3IsolationDomainProperties fromJson(JsonReader jsonReader) throws } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { deserializedL3IsolationDomainProperties.connectedSubnetRoutePolicy = ConnectedSubnetRoutePolicy.fromJson(reader); + } else if ("staticRouteRoutePolicy".equals(fieldName)) { + deserializedL3IsolationDomainProperties.staticRouteRoutePolicy + = StaticRouteRoutePolicy.fromJson(reader); + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedL3IsolationDomainProperties.uniqueRdConfiguration + = L3UniqueRouteDistinguisherProperties.fromJson(reader); + } else if ("v4routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainProperties.v4routePrefixLimit + = RoutePrefixLimitProperties.fromJson(reader); + } else if ("v6routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainProperties.v6routePrefixLimit + = RoutePrefixLimitProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedL3IsolationDomainProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("exportPolicyConfiguration".equals(fieldName)) { + deserializedL3IsolationDomainProperties.exportPolicyConfiguration + = BmpExportPolicyProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java index 29344f891b94..c53168761738 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -23,10 +25,15 @@ @Fluent public final class NeighborGroupInner extends Resource { /* - * Resource properties. + * The NeighborGroup Properties */ private NeighborGroupProperties innerProperties = new NeighborGroupProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -54,7 +61,7 @@ public NeighborGroupInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NeighborGroup Properties. * * @return the innerProperties value. */ @@ -62,6 +69,26 @@ private NeighborGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NeighborGroupInner object itself. + */ + public NeighborGroupInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -120,30 +147,26 @@ public NeighborGroupInner withTags(Map tags) { } /** - * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. - * - * @return the networkTapIds value. - */ - public List networkTapIds() { - return this.innerProperties() == null ? null : this.innerProperties().networkTapIds(); - } - - /** - * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. + * Get the annotation property: Switch configuration description. * - * @return the networkTapRuleIds value. + * @return the annotation value. */ - public List networkTapRuleIds() { - return this.innerProperties() == null ? null : this.innerProperties().networkTapRuleIds(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Get the provisioningState property: The provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the NeighborGroupInner object itself. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public NeighborGroupInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** @@ -170,44 +193,58 @@ public NeighborGroupInner withDestination(NeighborGroupDestination destination) } /** - * Get the annotation property: Switch configuration description. + * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. * - * @return the annotation value. + * @return the networkTapIds value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public List networkTapIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapIds(); } /** - * Set the annotation property: Switch configuration description. + * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. * - * @param annotation the annotation value to set. - * @return the NeighborGroupInner object itself. + * @return the networkTapRuleIds value. */ - public NeighborGroupInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NeighborGroupProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public List networkTapRuleIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapRuleIds(); } /** - * Validates the instance. + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the networkFabricIds value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NeighborGroupInner")); - } else { - innerProperties().validate(); - } + public List networkFabricIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricIds(); } - private static final ClientLogger LOGGER = new ClientLogger(NeighborGroupInner.class); + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } /** * {@inheritDoc} @@ -218,6 +255,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -250,6 +288,8 @@ public static NeighborGroupInner fromJson(JsonReader jsonReader) throws IOExcept deserializedNeighborGroupInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNeighborGroupInner.innerProperties = NeighborGroupProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNeighborGroupInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNeighborGroupInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java index 07d96fb93505..77bee6f90000 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java @@ -1,26 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; import java.io.IOException; /** * Neighbor Group Patch properties. */ @Fluent -public final class NeighborGroupPatchProperties extends AnnotationResource { +public final class NeighborGroupPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * An array of destination IPv4 Addresses or IPv6 Addresses. */ - private NeighborGroupDestination destination; + private NeighborGroupDestinationPatch destination; /** * Creates an instance of NeighborGroupPatchProperties class. @@ -29,44 +34,43 @@ public NeighborGroupPatchProperties() { } /** - * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Get the annotation property: Switch configuration description. * - * @return the destination value. + * @return the annotation value. */ - public NeighborGroupDestination destination() { - return this.destination; + public String annotation() { + return this.annotation; } /** - * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Set the annotation property: Switch configuration description. * - * @param destination the destination value to set. + * @param annotation the annotation value to set. * @return the NeighborGroupPatchProperties object itself. */ - public NeighborGroupPatchProperties withDestination(NeighborGroupDestination destination) { - this.destination = destination; + public NeighborGroupPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * {@inheritDoc} + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. */ - @Override - public NeighborGroupPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public NeighborGroupDestinationPatch destination() { + return this.destination; } /** - * Validates the instance. + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param destination the destination value to set. + * @return the NeighborGroupPatchProperties object itself. */ - @Override - public void validate() { - if (destination() != null) { - destination().validate(); - } + public NeighborGroupPatchProperties withDestination(NeighborGroupDestinationPatch destination) { + this.destination = destination; + return this; } /** @@ -75,7 +79,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeJsonField("destination", this.destination); return jsonWriter.writeEndObject(); } @@ -96,9 +100,10 @@ public static NeighborGroupPatchProperties fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNeighborGroupPatchProperties.withAnnotation(reader.getString()); + deserializedNeighborGroupPatchProperties.annotation = reader.getString(); } else if ("destination".equals(fieldName)) { - deserializedNeighborGroupPatchProperties.destination = NeighborGroupDestination.fromJson(reader); + deserializedNeighborGroupPatchProperties.destination + = NeighborGroupDestinationPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java index 6d0174abc2ac..c093a4a6e4aa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java @@ -1,14 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -18,7 +20,17 @@ * Neighbor Group Properties defines the properties of the resource. */ @Fluent -public final class NeighborGroupProperties extends AnnotationResource { +public final class NeighborGroupProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ + private NeighborGroupDestination destination; + /* * List of NetworkTap IDs where neighbor group is associated. */ @@ -29,15 +41,25 @@ public final class NeighborGroupProperties extends AnnotationResource { */ private List networkTapRuleIds; + /* + * Associated Network Fabric Resource IDs + */ + private List networkFabricIds; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * The provisioning state of the resource. */ private ProvisioningState provisioningState; /* - * An array of destination IPv4 Addresses or IPv6 Addresses. + * Configuration state of the resource. */ - private NeighborGroupDestination destination; + private ConfigurationState configurationState; /** * Creates an instance of NeighborGroupProperties class. @@ -46,30 +68,23 @@ public NeighborGroupProperties() { } /** - * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. - * - * @return the networkTapIds value. - */ - public List networkTapIds() { - return this.networkTapIds; - } - - /** - * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. + * Get the annotation property: Switch configuration description. * - * @return the networkTapRuleIds value. + * @return the annotation value. */ - public List networkTapRuleIds() { - return this.networkTapRuleIds; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: The provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the NeighborGroupProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public NeighborGroupProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -93,24 +108,57 @@ public NeighborGroupProperties withDestination(NeighborGroupDestination destinat } /** - * {@inheritDoc} + * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. + * + * @return the networkTapIds value. */ - @Override - public NeighborGroupProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public List networkTapIds() { + return this.networkTapIds; } /** - * Validates the instance. + * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the networkTapRuleIds value. */ - @Override - public void validate() { - if (destination() != null) { - destination().validate(); - } + public List networkTapRuleIds() { + return this.networkTapRuleIds; + } + + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.networkFabricIds; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } /** @@ -119,8 +167,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -130,6 +178,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NeighborGroupProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NeighborGroupProperties. */ public static NeighborGroupProperties fromJson(JsonReader jsonReader) throws IOException { @@ -139,19 +188,27 @@ public static NeighborGroupProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNeighborGroupProperties.withAnnotation(reader.getString()); + if ("destination".equals(fieldName)) { + deserializedNeighborGroupProperties.destination = NeighborGroupDestination.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedNeighborGroupProperties.annotation = reader.getString(); } else if ("networkTapIds".equals(fieldName)) { List networkTapIds = reader.readArray(reader1 -> reader1.getString()); deserializedNeighborGroupProperties.networkTapIds = networkTapIds; } else if ("networkTapRuleIds".equals(fieldName)) { List networkTapRuleIds = reader.readArray(reader1 -> reader1.getString()); deserializedNeighborGroupProperties.networkTapRuleIds = networkTapRuleIds; + } else if ("networkFabricIds".equals(fieldName)) { + List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNeighborGroupProperties.networkFabricIds = networkFabricIds; + } else if ("lastOperation".equals(fieldName)) { + deserializedNeighborGroupProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNeighborGroupProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("destination".equals(fieldName)) { - deserializedNeighborGroupProperties.destination = NeighborGroupDestination.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedNeighborGroupProperties.configurationState + = ConfigurationState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupResyncResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupResyncResponseInner.java new file mode 100644 index 000000000000..04edf1185dfd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupResyncResponseInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response for Neighbor Group Resync operation. + */ +@Immutable +public final class NeighborGroupResyncResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NeighborGroupResyncResponseInner class. + */ + private NeighborGroupResyncResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborGroupResyncResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborGroupResyncResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NeighborGroupResyncResponseInner. + */ + public static NeighborGroupResyncResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborGroupResyncResponseInner deserializedNeighborGroupResyncResponseInner + = new NeighborGroupResyncResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNeighborGroupResyncResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNeighborGroupResyncResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborGroupResyncResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceInner.java new file mode 100644 index 000000000000..c6bfbc92052e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceInner.java @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.io.IOException; +import java.util.Map; + +/** + * The Network Bootstrap Device resource definition. + */ +@Fluent +public final class NetworkBootstrapDeviceInner extends Resource { + /* + * The NetworkBootstrapDevice properties + */ + private NetworkBootstrapDeviceProperties innerProperties = new NetworkBootstrapDeviceProperties(); + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NetworkBootstrapDeviceInner class. + */ + public NetworkBootstrapDeviceInner() { + } + + /** + * Get the innerProperties property: The NetworkBootstrapDevice properties. + * + * @return the innerProperties value. + */ + private NetworkBootstrapDeviceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkBootstrapDeviceInner object itself. + */ + public NetworkBootstrapDeviceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkBootstrapDeviceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkBootstrapDeviceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapDeviceInner object itself. + */ + public NetworkBootstrapDeviceInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDeviceProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.innerProperties() == null ? null : this.innerProperties().hostName(); + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkBootstrapDeviceInner object itself. + */ + public NetworkBootstrapDeviceInner withHostName(String hostName) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDeviceProperties(); + } + this.innerProperties().withHostName(hostName); + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapDeviceInner object itself. + */ + public NetworkBootstrapDeviceInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDeviceProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the version property: Current version of the device as defined in SKU. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the networkDeviceSku property: Network Bootstrap Device SKU name. + * + * @return the networkDeviceSku value. + */ + public String networkDeviceSku() { + return this.innerProperties() == null ? null : this.innerProperties().networkDeviceSku(); + } + + /** + * Set the networkDeviceSku property: Network Bootstrap Device SKU name. + * + * @param networkDeviceSku the networkDeviceSku value to set. + * @return the NetworkBootstrapDeviceInner object itself. + */ + public NetworkBootstrapDeviceInner withNetworkDeviceSku(String networkDeviceSku) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDeviceProperties(); + } + this.innerProperties().withNetworkDeviceSku(networkDeviceSku); + return this; + } + + /** + * Get the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); + } + + /** + * Get the secondaryManagementIpv4Address property: Secondary Management IPv4 Address. + * + * @return the secondaryManagementIpv4Address value. + */ + public String secondaryManagementIpv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().secondaryManagementIpv4Address(); + } + + /** + * Get the dhcpV4ServerIpAddress property: Dhcp server IPv4 Address. + * + * @return the dhcpV4ServerIpAddress value. + */ + public String dhcpV4ServerIpAddress() { + return this.innerProperties() == null ? null : this.innerProperties().dhcpV4ServerIpAddress(); + } + + /** + * Get the primaryManagementIpv6Address property: Primary Management IPv6 Address. + * + * @return the primaryManagementIpv6Address value. + */ + public String primaryManagementIpv6Address() { + return this.innerProperties() == null ? null : this.innerProperties().primaryManagementIpv6Address(); + } + + /** + * Get the secondaryManagementIpv6Address property: Secondary Management IPv6 Address. + * + * @return the secondaryManagementIpv6Address value. + */ + public String secondaryManagementIpv6Address() { + return this.innerProperties() == null ? null : this.innerProperties().secondaryManagementIpv6Address(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the primaryManagementIpv4Address property: Primary Management IPv4 Address. + * + * @return the primaryManagementIpv4Address value. + */ + public String primaryManagementIpv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().primaryManagementIpv4Address(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceInner. + */ + public static NetworkBootstrapDeviceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceInner deserializedNetworkBootstrapDeviceInner = new NetworkBootstrapDeviceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkBootstrapDeviceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.innerProperties + = NetworkBootstrapDeviceProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkBootstrapDeviceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDevicePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDevicePatchProperties.java new file mode 100644 index 000000000000..3876a144f36f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDevicePatchProperties.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Bootstrap Device Patch properties. + */ +@Fluent +public final class NetworkBootstrapDevicePatchProperties + implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * The host name of the device. + */ + private String hostName; + + /* + * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + + /** + * Creates an instance of NetworkBootstrapDevicePatchProperties class. + */ + public NetworkBootstrapDevicePatchProperties() { + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapDevicePatchProperties object itself. + */ + public NetworkBootstrapDevicePatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkBootstrapDevicePatchProperties object itself. + */ + public NetworkBootstrapDevicePatchProperties withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapDevicePatchProperties object itself. + */ + public NetworkBootstrapDevicePatchProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDevicePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDevicePatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapDevicePatchProperties. + */ + public static NetworkBootstrapDevicePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDevicePatchProperties deserializedNetworkBootstrapDevicePatchProperties + = new NetworkBootstrapDevicePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkBootstrapDevicePatchProperties.annotation = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedNetworkBootstrapDevicePatchProperties.hostName = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedNetworkBootstrapDevicePatchProperties.serialNumber = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDevicePatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceProperties.java new file mode 100644 index 000000000000..3991acea4403 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceProperties.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.io.IOException; + +/** + * Network Bootstrap Device Properties defines the properties of the resource. + */ +@Fluent +public final class NetworkBootstrapDeviceProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * The host name of the device. + */ + private String hostName; + + /* + * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + + /* + * Current version of the device as defined in SKU. + */ + private String version; + + /* + * Network Bootstrap Device SKU name. + */ + private String networkDeviceSku; + + /* + * Associated Network Fabric Resource ID + */ + private String networkFabricId; + + /* + * Secondary Management IPv4 Address. + */ + private String secondaryManagementIpv4Address; + + /* + * Dhcp server IPv4 Address. + */ + private String dhcpV4ServerIpAddress; + + /* + * Primary Management IPv6 Address. + */ + private String primaryManagementIpv6Address; + + /* + * Secondary Management IPv6 Address. + */ + private String secondaryManagementIpv6Address; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Primary Management IPv4 Address. + */ + private String primaryManagementIpv4Address; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /** + * Creates an instance of NetworkBootstrapDeviceProperties class. + */ + public NetworkBootstrapDeviceProperties() { + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapDeviceProperties object itself. + */ + public NetworkBootstrapDeviceProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkBootstrapDeviceProperties object itself. + */ + public NetworkBootstrapDeviceProperties withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapDeviceProperties object itself. + */ + public NetworkBootstrapDeviceProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the version property: Current version of the device as defined in SKU. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the networkDeviceSku property: Network Bootstrap Device SKU name. + * + * @return the networkDeviceSku value. + */ + public String networkDeviceSku() { + return this.networkDeviceSku; + } + + /** + * Set the networkDeviceSku property: Network Bootstrap Device SKU name. + * + * @param networkDeviceSku the networkDeviceSku value to set. + * @return the NetworkBootstrapDeviceProperties object itself. + */ + public NetworkBootstrapDeviceProperties withNetworkDeviceSku(String networkDeviceSku) { + this.networkDeviceSku = networkDeviceSku; + return this; + } + + /** + * Get the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.networkFabricId; + } + + /** + * Get the secondaryManagementIpv4Address property: Secondary Management IPv4 Address. + * + * @return the secondaryManagementIpv4Address value. + */ + public String secondaryManagementIpv4Address() { + return this.secondaryManagementIpv4Address; + } + + /** + * Get the dhcpV4ServerIpAddress property: Dhcp server IPv4 Address. + * + * @return the dhcpV4ServerIpAddress value. + */ + public String dhcpV4ServerIpAddress() { + return this.dhcpV4ServerIpAddress; + } + + /** + * Get the primaryManagementIpv6Address property: Primary Management IPv6 Address. + * + * @return the primaryManagementIpv6Address value. + */ + public String primaryManagementIpv6Address() { + return this.primaryManagementIpv6Address; + } + + /** + * Get the secondaryManagementIpv6Address property: Secondary Management IPv6 Address. + * + * @return the secondaryManagementIpv6Address value. + */ + public String secondaryManagementIpv6Address() { + return this.secondaryManagementIpv6Address; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the primaryManagementIpv4Address property: Primary Management IPv4 Address. + * + * @return the primaryManagementIpv4Address value. + */ + public String primaryManagementIpv4Address() { + return this.primaryManagementIpv4Address; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("networkDeviceSku", this.networkDeviceSku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceProperties. + */ + public static NetworkBootstrapDeviceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceProperties deserializedNetworkBootstrapDeviceProperties + = new NetworkBootstrapDeviceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.annotation = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.hostName = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.serialNumber = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.version = reader.getString(); + } else if ("networkDeviceSku".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.networkDeviceSku = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.networkFabricId = reader.getString(); + } else if ("secondaryManagementIpv4Address".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.secondaryManagementIpv4Address = reader.getString(); + } else if ("dhcpV4ServerIpAddress".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.dhcpV4ServerIpAddress = reader.getString(); + } else if ("primaryManagementIpv6Address".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.primaryManagementIpv6Address = reader.getString(); + } else if ("secondaryManagementIpv6Address".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.secondaryManagementIpv6Address = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("primaryManagementIpv4Address".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.primaryManagementIpv4Address = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkBootstrapDeviceProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRebootResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRebootResponseInner.java new file mode 100644 index 000000000000..c175ddbfa5c4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRebootResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Network Bootstrap Device reboot Response. + */ +@Immutable +public final class NetworkBootstrapDeviceRebootResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkBootstrapDeviceRebootResponseInner class. + */ + private NetworkBootstrapDeviceRebootResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceRebootResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceRebootResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceRebootResponseInner. + */ + public static NetworkBootstrapDeviceRebootResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceRebootResponseInner deserializedNetworkBootstrapDeviceRebootResponseInner + = new NetworkBootstrapDeviceRebootResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceRebootResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRebootResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceRebootResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRefreshConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRefreshConfigurationResponseInner.java new file mode 100644 index 000000000000..b9e8d19051b9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRefreshConfigurationResponseInner.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an refresh configuration async operation. + */ +@Immutable +public final class NetworkBootstrapDeviceRefreshConfigurationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkBootstrapDeviceRefreshConfigurationResponseInner class. + */ + private NetworkBootstrapDeviceRefreshConfigurationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceRefreshConfigurationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceRefreshConfigurationResponseInner if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceRefreshConfigurationResponseInner. + */ + public static NetworkBootstrapDeviceRefreshConfigurationResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceRefreshConfigurationResponseInner deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner + = new NetworkBootstrapDeviceRefreshConfigurationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceRefreshConfigurationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceResyncPasswordsResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceResyncPasswordsResponseInner.java new file mode 100644 index 000000000000..7eae7096ab07 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceResyncPasswordsResponseInner.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a ResyncPasswords request on a Network Bootstrap Device. + */ +@Immutable +public final class NetworkBootstrapDeviceResyncPasswordsResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkBootstrapDeviceResyncPasswordsResponseInner class. + */ + private NetworkBootstrapDeviceResyncPasswordsResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceResyncPasswordsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceResyncPasswordsResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceResyncPasswordsResponseInner. + */ + public static NetworkBootstrapDeviceResyncPasswordsResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceResyncPasswordsResponseInner deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner + = new NetworkBootstrapDeviceResyncPasswordsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceResyncPasswordsResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..45c1b6a4868e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Network Bootstrap Device Administrative State Update Response. + */ +@Immutable +public final class NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner class. + */ + private NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner. + */ + public static NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner + = new NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.status + = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.resourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpgradeResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpgradeResponseInner.java new file mode 100644 index 000000000000..435bf97addb5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpgradeResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Network Bootstrap Device upgrade Response. + */ +@Immutable +public final class NetworkBootstrapDeviceUpgradeResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkBootstrapDeviceUpgradeResponseInner class. + */ + private NetworkBootstrapDeviceUpgradeResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceUpgradeResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceUpgradeResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceUpgradeResponseInner. + */ + public static NetworkBootstrapDeviceUpgradeResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceUpgradeResponseInner deserializedNetworkBootstrapDeviceUpgradeResponseInner + = new NetworkBootstrapDeviceUpgradeResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceUpgradeResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkBootstrapDeviceUpgradeResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceUpgradeResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceInner.java new file mode 100644 index 000000000000..5ac848745767 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceInner.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.io.IOException; + +/** + * Defines the NetworkBootstrapInterface resource. + */ +@Fluent +public final class NetworkBootstrapInterfaceInner extends ProxyResource { + /* + * The NetworkBootstrapInterface properties + */ + private NetworkBootstrapInterfaceProperties innerProperties = new NetworkBootstrapInterfaceProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NetworkBootstrapInterfaceInner class. + */ + public NetworkBootstrapInterfaceInner() { + } + + /** + * Get the innerProperties property: The NetworkBootstrapInterface properties. + * + * @return the innerProperties value. + */ + private NetworkBootstrapInterfaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the physicalIdentifier property: Physical identifier of the device. + * + * @return the physicalIdentifier value. + */ + public String physicalIdentifier() { + return this.innerProperties() == null ? null : this.innerProperties().physicalIdentifier(); + } + + /** + * Get the connectedTo property: Connected to information of the device. + * + * @return the connectedTo value. + */ + public String connectedTo() { + return this.innerProperties() == null ? null : this.innerProperties().connectedTo(); + } + + /** + * Get the interfaceType property: Type of the interface. + * + * @return the interfaceType value. + */ + public InterfaceType interfaceType() { + return this.innerProperties() == null ? null : this.innerProperties().interfaceType(); + } + + /** + * Get the description property: Description of the interface. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + public String additionalDescription() { + return this.innerProperties() == null ? null : this.innerProperties().additionalDescription(); + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkBootstrapInterfaceInner object itself. + */ + public NetworkBootstrapInterfaceInner withAdditionalDescription(String additionalDescription) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfaceProperties(); + } + this.innerProperties().withAdditionalDescription(additionalDescription); + return this; + } + + /** + * Get the ipv4Address property: IPv4Address of the interface. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().ipv4Address(); + } + + /** + * Get the ipv6Address property: IPv6Address of the interface. + * + * @return the ipv6Address value. + */ + public String ipv6Address() { + return this.innerProperties() == null ? null : this.innerProperties().ipv6Address(); + } + + /** + * Get the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapInterfaceInner object itself. + */ + public NetworkBootstrapInterfaceInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfaceProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapInterfaceInner object itself. + */ + public NetworkBootstrapInterfaceInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfaceProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapInterfaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapInterfaceInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapInterfaceInner. + */ + public static NetworkBootstrapInterfaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapInterfaceInner deserializedNetworkBootstrapInterfaceInner + = new NetworkBootstrapInterfaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceInner.innerProperties + = NetworkBootstrapInterfaceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapInterfaceInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfacePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfacePatchProperties.java new file mode 100644 index 000000000000..42b045bfa043 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfacePatchProperties.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import java.io.IOException; + +/** + * Network Bootstrap Interface Patch properties. + */ +@Fluent +public final class NetworkBootstrapInterfacePatchProperties extends AnnotationResource { + /* + * Serial number of the interface. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + + /* + * Additional description of the interface. + */ + private String additionalDescription; + + /** + * Creates an instance of NetworkBootstrapInterfacePatchProperties class. + */ + public NetworkBootstrapInterfacePatchProperties() { + } + + /** + * Get the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapInterfacePatchProperties object itself. + */ + public NetworkBootstrapInterfacePatchProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + public String additionalDescription() { + return this.additionalDescription; + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkBootstrapInterfacePatchProperties object itself. + */ + public NetworkBootstrapInterfacePatchProperties withAdditionalDescription(String additionalDescription) { + this.additionalDescription = additionalDescription; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkBootstrapInterfacePatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("additionalDescription", this.additionalDescription); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapInterfacePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapInterfacePatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapInterfacePatchProperties. + */ + public static NetworkBootstrapInterfacePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapInterfacePatchProperties deserializedNetworkBootstrapInterfacePatchProperties + = new NetworkBootstrapInterfacePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkBootstrapInterfacePatchProperties.withAnnotation(reader.getString()); + } else if ("serialNumber".equals(fieldName)) { + deserializedNetworkBootstrapInterfacePatchProperties.serialNumber = reader.getString(); + } else if ("additionalDescription".equals(fieldName)) { + deserializedNetworkBootstrapInterfacePatchProperties.additionalDescription = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapInterfacePatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceProperties.java new file mode 100644 index 000000000000..c8010e02eea2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceProperties.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.io.IOException; + +/** + * Network Bootstrap Interface Properties defines the properties of the resource. + */ +@Fluent +public final class NetworkBootstrapInterfaceProperties extends AnnotationResource { + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Physical identifier of the device. + */ + private String physicalIdentifier; + + /* + * Connected to information of the device. + */ + private String connectedTo; + + /* + * Type of the interface. + */ + private InterfaceType interfaceType; + + /* + * Description of the interface. + */ + private String description; + + /* + * Additional description of the interface. + */ + private String additionalDescription; + + /* + * IPv4Address of the interface. + */ + private String ipv4Address; + + /* + * IPv6Address of the interface. + */ + private String ipv6Address; + + /* + * Serial number of the interface. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + + /** + * Creates an instance of NetworkBootstrapInterfaceProperties class. + */ + public NetworkBootstrapInterfaceProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the physicalIdentifier property: Physical identifier of the device. + * + * @return the physicalIdentifier value. + */ + public String physicalIdentifier() { + return this.physicalIdentifier; + } + + /** + * Get the connectedTo property: Connected to information of the device. + * + * @return the connectedTo value. + */ + public String connectedTo() { + return this.connectedTo; + } + + /** + * Get the interfaceType property: Type of the interface. + * + * @return the interfaceType value. + */ + public InterfaceType interfaceType() { + return this.interfaceType; + } + + /** + * Get the description property: Description of the interface. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + public String additionalDescription() { + return this.additionalDescription; + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkBootstrapInterfaceProperties object itself. + */ + public NetworkBootstrapInterfaceProperties withAdditionalDescription(String additionalDescription) { + this.additionalDescription = additionalDescription; + return this; + } + + /** + * Get the ipv4Address property: IPv4Address of the interface. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Get the ipv6Address property: IPv6Address of the interface. + * + * @return the ipv6Address value. + */ + public String ipv6Address() { + return this.ipv6Address; + } + + /** + * Get the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapInterfaceProperties object itself. + */ + public NetworkBootstrapInterfaceProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkBootstrapInterfaceProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("additionalDescription", this.additionalDescription); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapInterfaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapInterfaceProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapInterfaceProperties. + */ + public static NetworkBootstrapInterfaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapInterfaceProperties deserializedNetworkBootstrapInterfaceProperties + = new NetworkBootstrapInterfaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.withAnnotation(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("physicalIdentifier".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.physicalIdentifier = reader.getString(); + } else if ("connectedTo".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.connectedTo = reader.getString(); + } else if ("interfaceType".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.interfaceType + = InterfaceType.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.description = reader.getString(); + } else if ("additionalDescription".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.additionalDescription = reader.getString(); + } else if ("ipv4Address".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.ipv4Address = reader.getString(); + } else if ("ipv6Address".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.ipv6Address = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceProperties.serialNumber = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapInterfaceProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java index 41e9aab3d42d..e7bac7a89d54 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java @@ -1,21 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CertificateRotationStatus; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationStatus; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -24,10 +29,15 @@ @Fluent public final class NetworkDeviceInner extends Resource { /* - * Resource properties. + * The NetworkDevice properties */ private NetworkDeviceProperties innerProperties = new NetworkDeviceProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -55,7 +65,7 @@ public NetworkDeviceInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkDevice properties. * * @return the innerProperties value. */ @@ -63,6 +73,26 @@ private NetworkDeviceProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -120,6 +150,102 @@ public NetworkDeviceInner withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkDeviceProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.innerProperties() == null ? null : this.innerProperties().hostName(); + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withHostName(String hostName) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkDeviceProperties(); + } + this.innerProperties().withHostName(hostName); + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkDeviceProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. + */ + public IdentitySelector identitySelector() { + return this.innerProperties() == null ? null : this.innerProperties().identitySelector(); + } + + /** + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @param identitySelector the identitySelector value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withIdentitySelector(IdentitySelector identitySelector) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkDeviceProperties(); + } + this.innerProperties().withIdentitySelector(identitySelector); + return this; + } + /** * Get the version property: Current version of the device as defined in SKU. * @@ -188,6 +314,24 @@ public String managementIpv6Address() { return this.innerProperties() == null ? null : this.innerProperties().managementIpv6Address(); } + /** + * Get the rwDeviceConfig property: User configured read-write configuration applied on the network devices. + * + * @return the rwDeviceConfig value. + */ + public String rwDeviceConfig() { + return this.innerProperties() == null ? null : this.innerProperties().rwDeviceConfig(); + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -216,93 +360,32 @@ public AdministrativeState administrativeState() { } /** - * Get the hostname property: The host name of the device. - * - * @return the hostname value. - */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); - } - - /** - * Set the hostname property: The host name of the device. - * - * @param hostname the hostname value to set. - * @return the NetworkDeviceInner object itself. - */ - public NetworkDeviceInner withHostname(String hostname) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withHostname(hostname); - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. + * Get the secretRotationStatus property: Secret rotation status for the device's secrets. * - * @return the serialNumber value. + * @return the secretRotationStatus value. */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + public List secretRotationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().secretRotationStatus(); } /** - * Set the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. + * Get the certificateRotationStatus property: Certificate rotation status for the device's certificates. * - * @param serialNumber the serialNumber value to set. - * @return the NetworkDeviceInner object itself. + * @return the certificateRotationStatus value. */ - public NetworkDeviceInner withSerialNumber(String serialNumber) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withSerialNumber(serialNumber); - return this; + public List certificateRotationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().certificateRotationStatus(); } /** - * Get the annotation property: Switch configuration description. + * Get the networkFabricId property: Associated Network Fabric Resource ID. * - * @return the annotation value. + * @return the networkFabricId value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } - /** - * Set the annotation property: Switch configuration description. - * - * @param annotation the annotation value to set. - * @return the NetworkDeviceInner object itself. - */ - public NetworkDeviceInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkDeviceInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceInner.class); - /** * {@inheritDoc} */ @@ -312,6 +395,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -344,6 +428,8 @@ public static NetworkDeviceInner fromJson(JsonReader jsonReader) throws IOExcept deserializedNetworkDeviceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkDeviceInner.innerProperties = NetworkDeviceProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkDeviceInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkDeviceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java index 945722302afd..ee5292ce245f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java @@ -1,31 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; import java.io.IOException; /** * Network Device Patch properties. */ @Fluent -public final class NetworkDevicePatchParametersProperties extends AnnotationResource { +public final class NetworkDevicePatchParametersProperties + implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * The host name of the device. */ - private String hostname; + private String hostName; /* * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. */ private String serialNumber; + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelectorPatch identitySelector; + /** * Creates an instance of NetworkDevicePatchParametersProperties class. */ @@ -33,22 +46,42 @@ public NetworkDevicePatchParametersProperties() { } /** - * Get the hostname property: The host name of the device. + * Get the annotation property: Switch configuration description. * - * @return the hostname value. + * @return the annotation value. */ - public String hostname() { - return this.hostname; + public String annotation() { + return this.annotation; } /** - * Set the hostname property: The host name of the device. + * Set the annotation property: Switch configuration description. * - * @param hostname the hostname value to set. + * @param annotation the annotation value to set. * @return the NetworkDevicePatchParametersProperties object itself. */ - public NetworkDevicePatchParametersProperties withHostname(String hostname) { - this.hostname = hostname; + public NetworkDevicePatchParametersProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkDevicePatchParametersProperties object itself. + */ + public NetworkDevicePatchParametersProperties withHostName(String hostName) { + this.hostName = hostName; return this; } @@ -75,21 +108,25 @@ public NetworkDevicePatchParametersProperties withSerialNumber(String serialNumb } /** - * {@inheritDoc} + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. */ - @Override - public NetworkDevicePatchParametersProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public IdentitySelectorPatch identitySelector() { + return this.identitySelector; } /** - * Validates the instance. + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param identitySelector the identitySelector value to set. + * @return the NetworkDevicePatchParametersProperties object itself. */ - @Override - public void validate() { + public NetworkDevicePatchParametersProperties withIdentitySelector(IdentitySelectorPatch identitySelector) { + this.identitySelector = identitySelector; + return this; } /** @@ -98,9 +135,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("hostName", this.hostname); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeJsonField("identitySelector", this.identitySelector); return jsonWriter.writeEndObject(); } @@ -121,11 +159,14 @@ public static NetworkDevicePatchParametersProperties fromJson(JsonReader jsonRea reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkDevicePatchParametersProperties.withAnnotation(reader.getString()); + deserializedNetworkDevicePatchParametersProperties.annotation = reader.getString(); } else if ("hostName".equals(fieldName)) { - deserializedNetworkDevicePatchParametersProperties.hostname = reader.getString(); + deserializedNetworkDevicePatchParametersProperties.hostName = reader.getString(); } else if ("serialNumber".equals(fieldName)) { deserializedNetworkDevicePatchParametersProperties.serialNumber = reader.getString(); + } else if ("identitySelector".equals(fieldName)) { + deserializedNetworkDevicePatchParametersProperties.identitySelector + = IdentitySelectorPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java index e9376fdf9d99..e26fece2a1cf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java @@ -1,25 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.CertificateRotationStatus; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationStatus; import java.io.IOException; +import java.util.List; /** * Network Device Properties defines the properties of the resource. */ @Fluent -public final class NetworkDeviceProperties extends AnnotationResource { +public final class NetworkDeviceProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * The host name of the device. + */ + private String hostName; + + /* + * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelector identitySelector; + /* * Current version of the device as defined in SKU. */ @@ -50,6 +76,16 @@ public final class NetworkDeviceProperties extends AnnotationResource { */ private String managementIpv6Address; + /* + * User configured read-write configuration applied on the network devices. + */ + private String rwDeviceConfig; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -66,14 +102,19 @@ public final class NetworkDeviceProperties extends AnnotationResource { private AdministrativeState administrativeState; /* - * The host name of the device. + * Secret rotation status for the device's secrets. */ - private String hostname; + private List secretRotationStatus; /* - * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + * Certificate rotation status for the device's certificates. */ - private String serialNumber; + private List certificateRotationStatus; + + /* + * Associated Network Fabric Resource ID + */ + private String networkFabricId; /** * Creates an instance of NetworkDeviceProperties class. @@ -81,6 +122,90 @@ public final class NetworkDeviceProperties extends AnnotationResource { public NetworkDeviceProperties() { } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkDeviceProperties object itself. + */ + public NetworkDeviceProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkDeviceProperties object itself. + */ + public NetworkDeviceProperties withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkDeviceProperties object itself. + */ + public NetworkDeviceProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. + */ + public IdentitySelector identitySelector() { + return this.identitySelector; + } + + /** + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @param identitySelector the identitySelector value to set. + * @return the NetworkDeviceProperties object itself. + */ + public NetworkDeviceProperties withIdentitySelector(IdentitySelector identitySelector) { + this.identitySelector = identitySelector; + return this; + } + /** * Get the version property: Current version of the device as defined in SKU. * @@ -146,6 +271,24 @@ public String managementIpv6Address() { return this.managementIpv6Address; } + /** + * Get the rwDeviceConfig property: User configured read-write configuration applied on the network devices. + * + * @return the rwDeviceConfig value. + */ + public String rwDeviceConfig() { + return this.rwDeviceConfig; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -174,63 +317,30 @@ public AdministrativeState administrativeState() { } /** - * Get the hostname property: The host name of the device. + * Get the secretRotationStatus property: Secret rotation status for the device's secrets. * - * @return the hostname value. + * @return the secretRotationStatus value. */ - public String hostname() { - return this.hostname; + public List secretRotationStatus() { + return this.secretRotationStatus; } /** - * Set the hostname property: The host name of the device. + * Get the certificateRotationStatus property: Certificate rotation status for the device's certificates. * - * @param hostname the hostname value to set. - * @return the NetworkDeviceProperties object itself. + * @return the certificateRotationStatus value. */ - public NetworkDeviceProperties withHostname(String hostname) { - this.hostname = hostname; - return this; + public List certificateRotationStatus() { + return this.certificateRotationStatus; } /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. + * Get the networkFabricId property: Associated Network Fabric Resource ID. * - * @return the serialNumber value. + * @return the networkFabricId value. */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @param serialNumber the serialNumber value to set. - * @return the NetworkDeviceProperties object itself. - */ - public NetworkDeviceProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkDeviceProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { + public String networkFabricId() { + return this.networkFabricId; } /** @@ -239,10 +349,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("networkDeviceSku", this.networkDeviceSku); - jsonWriter.writeStringField("hostName", this.hostname); jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); + jsonWriter.writeJsonField("identitySelector", this.identitySelector); + jsonWriter.writeStringField("networkDeviceSku", this.networkDeviceSku); return jsonWriter.writeEndObject(); } @@ -252,6 +363,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkDeviceProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkDeviceProperties. */ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOException { @@ -261,8 +373,14 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkDeviceProperties.withAnnotation(reader.getString()); + if ("serialNumber".equals(fieldName)) { + deserializedNetworkDeviceProperties.serialNumber = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkDeviceProperties.annotation = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedNetworkDeviceProperties.hostName = reader.getString(); + } else if ("identitySelector".equals(fieldName)) { + deserializedNetworkDeviceProperties.identitySelector = IdentitySelector.fromJson(reader); } else if ("version".equals(fieldName)) { deserializedNetworkDeviceProperties.version = reader.getString(); } else if ("networkDeviceSku".equals(fieldName)) { @@ -276,6 +394,10 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE deserializedNetworkDeviceProperties.managementIpv4Address = reader.getString(); } else if ("managementIpv6Address".equals(fieldName)) { deserializedNetworkDeviceProperties.managementIpv6Address = reader.getString(); + } else if ("rwDeviceConfig".equals(fieldName)) { + deserializedNetworkDeviceProperties.rwDeviceConfig = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkDeviceProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkDeviceProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -285,10 +407,16 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE } else if ("administrativeState".equals(fieldName)) { deserializedNetworkDeviceProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("hostName".equals(fieldName)) { - deserializedNetworkDeviceProperties.hostname = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkDeviceProperties.serialNumber = reader.getString(); + } else if ("secretRotationStatus".equals(fieldName)) { + List secretRotationStatus + = reader.readArray(reader1 -> SecretRotationStatus.fromJson(reader1)); + deserializedNetworkDeviceProperties.secretRotationStatus = secretRotationStatus; + } else if ("certificateRotationStatus".equals(fieldName)) { + List certificateRotationStatus + = reader.readArray(reader1 -> CertificateRotationStatus.fromJson(reader1)); + deserializedNetworkDeviceProperties.certificateRotationStatus = certificateRotationStatus; + } else if ("networkFabricId".equals(fieldName)) { + deserializedNetworkDeviceProperties.networkFabricId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRefreshConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRefreshConfigurationResponseInner.java new file mode 100644 index 000000000000..074810c02be4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRefreshConfigurationResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an refresh configuration async operation. + */ +@Immutable +public final class NetworkDeviceRefreshConfigurationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkDeviceRefreshConfigurationResponseInner class. + */ + private NetworkDeviceRefreshConfigurationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceRefreshConfigurationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceRefreshConfigurationResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceRefreshConfigurationResponseInner. + */ + public static NetworkDeviceRefreshConfigurationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceRefreshConfigurationResponseInner deserializedNetworkDeviceRefreshConfigurationResponseInner + = new NetworkDeviceRefreshConfigurationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkDeviceRefreshConfigurationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkDeviceRefreshConfigurationResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceRefreshConfigurationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceResyncPasswordsResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceResyncPasswordsResponseInner.java new file mode 100644 index 000000000000..464e3ad746d2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceResyncPasswordsResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a ResyncPasswords request on a Network Device. + */ +@Immutable +public final class NetworkDeviceResyncPasswordsResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkDeviceResyncPasswordsResponseInner class. + */ + private NetworkDeviceResyncPasswordsResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceResyncPasswordsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceResyncPasswordsResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceResyncPasswordsResponseInner. + */ + public static NetworkDeviceResyncPasswordsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceResyncPasswordsResponseInner deserializedNetworkDeviceResyncPasswordsResponseInner + = new NetworkDeviceResyncPasswordsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkDeviceResyncPasswordsResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkDeviceResyncPasswordsResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceResyncPasswordsResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRunRwCommandResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRunRwCommandResponseInner.java new file mode 100644 index 000000000000..351a606fab78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRunRwCommandResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a RunRwCommand request on a Network Device. + */ +@Immutable +public final class NetworkDeviceRunRwCommandResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Network Device Run Rw Command Response properties. + */ + private NetworkDeviceRwCommandResponseProperties properties; + + /** + * Creates an instance of NetworkDeviceRunRwCommandResponseInner class. + */ + private NetworkDeviceRunRwCommandResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Network Device Run Rw Command Response properties. + * + * @return the properties value. + */ + public NetworkDeviceRwCommandResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceRunRwCommandResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceRunRwCommandResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceRunRwCommandResponseInner. + */ + public static NetworkDeviceRunRwCommandResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceRunRwCommandResponseInner deserializedNetworkDeviceRunRwCommandResponseInner + = new NetworkDeviceRunRwCommandResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkDeviceRunRwCommandResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNetworkDeviceRunRwCommandResponseInner.properties + = NetworkDeviceRwCommandResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceRunRwCommandResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java index a826de6b1ced..61aaec04d185 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -21,12 +20,12 @@ /** * The NetworkDeviceSku resource definition. */ -@Fluent +@Immutable public final class NetworkDeviceSkuInner extends ProxyResource { /* - * Resource properties. + * The Network Device SKU properties. */ - private NetworkDeviceSkuProperties innerProperties = new NetworkDeviceSkuProperties(); + private NetworkDeviceSkuProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -51,11 +50,11 @@ public final class NetworkDeviceSkuInner extends ProxyResource { /** * Creates an instance of NetworkDeviceSkuInner class. */ - public NetworkDeviceSkuInner() { + private NetworkDeviceSkuInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Network Device SKU properties. * * @return the innerProperties value. */ @@ -111,20 +110,6 @@ public String model() { return this.innerProperties() == null ? null : this.innerProperties().model(); } - /** - * Set the model property: Model of the network device. - * - * @param model the model value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withModel(String model) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withModel(model); - return this; - } - /** * Get the manufacturer property: Manufacturer of the network device. * @@ -134,20 +119,6 @@ public String manufacturer() { return this.innerProperties() == null ? null : this.innerProperties().manufacturer(); } - /** - * Set the manufacturer property: Manufacturer of the network device. - * - * @param manufacturer the manufacturer value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withManufacturer(String manufacturer) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withManufacturer(manufacturer); - return this; - } - /** * Get the supportedVersions property: List of supported version details of network device. * @@ -157,20 +128,6 @@ public List supportedVersions() { return this.innerProperties() == null ? null : this.innerProperties().supportedVersions(); } - /** - * Set the supportedVersions property: List of supported version details of network device. - * - * @param supportedVersions the supportedVersions value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withSupportedVersions(List supportedVersions) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withSupportedVersions(supportedVersions); - return this; - } - /** * Get the supportedRoleTypes property: Available roles for the network device. * @@ -180,20 +137,6 @@ public List supportedRoleTypes() { return this.innerProperties() == null ? null : this.innerProperties().supportedRoleTypes(); } - /** - * Set the supportedRoleTypes property: Available roles for the network device. - * - * @param supportedRoleTypes the supportedRoleTypes value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withSupportedRoleTypes(List supportedRoleTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withSupportedRoleTypes(supportedRoleTypes); - return this; - } - /** * Get the interfaces property: List of network device interfaces. * @@ -203,20 +146,6 @@ public List interfaces() { return this.innerProperties() == null ? null : this.innerProperties().interfaces(); } - /** - * Set the interfaces property: List of network device interfaces. - * - * @param interfaces the interfaces value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withInterfaces(List interfaces) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withInterfaces(interfaces); - return this; - } - /** * Get the provisioningState property: Provisioning state of the resource. * @@ -226,23 +155,6 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkDeviceSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceSkuInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java index 01ea8b1bacbe..6db76d08890e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +19,7 @@ /** * Network Device SKU Properties defines the properties of the resource. */ -@Fluent +@Immutable public final class NetworkDeviceSkuProperties implements JsonSerializable { /* * Model of the network device. @@ -55,7 +54,7 @@ public final class NetworkDeviceSkuProperties implements JsonSerializable supportedVersions() { return this.supportedVersions; } - /** - * Set the supportedVersions property: List of supported version details of network device. - * - * @param supportedVersions the supportedVersions value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withSupportedVersions(List supportedVersions) { - this.supportedVersions = supportedVersions; - return this; - } - /** * Get the supportedRoleTypes property: Available roles for the network device. * @@ -127,17 +93,6 @@ public List supportedRoleTypes() { return this.supportedRoleTypes; } - /** - * Set the supportedRoleTypes property: Available roles for the network device. - * - * @param supportedRoleTypes the supportedRoleTypes value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withSupportedRoleTypes(List supportedRoleTypes) { - this.supportedRoleTypes = supportedRoleTypes; - return this; - } - /** * Get the interfaces property: List of network device interfaces. * @@ -147,17 +102,6 @@ public List interfaces() { return this.interfaces; } - /** - * Set the interfaces property: List of network device interfaces. - * - * @param interfaces the interfaces value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withInterfaces(List interfaces) { - this.interfaces = interfaces; - return this; - } - /** * Get the provisioningState property: Provisioning state of the resource. * @@ -167,27 +111,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (model() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property model in model NetworkDeviceSkuProperties")); - } - if (supportedVersions() != null) { - supportedVersions().forEach(e -> e.validate()); - } - if (interfaces() != null) { - interfaces().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceSkuProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpdateAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpdateAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..7eee3ff315b1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpdateAdministrativeStateResponseInner.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Network Device Administrative State Update Response. + */ +@Immutable +public final class NetworkDeviceUpdateAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkDeviceUpdateAdministrativeStateResponseInner class. + */ + private NetworkDeviceUpdateAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceUpdateAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceUpdateAdministrativeStateResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceUpdateAdministrativeStateResponseInner. + */ + public static NetworkDeviceUpdateAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceUpdateAdministrativeStateResponseInner deserializedNetworkDeviceUpdateAdministrativeStateResponseInner + = new NetworkDeviceUpdateAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkDeviceUpdateAdministrativeStateResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceUpdateAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpgradeResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpgradeResponseInner.java new file mode 100644 index 000000000000..825d269511a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpgradeResponseInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Network Device Upgrade Response. + */ +@Immutable +public final class NetworkDeviceUpgradeResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkDeviceUpgradeResponseInner class. + */ + private NetworkDeviceUpgradeResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceUpgradeResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceUpgradeResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceUpgradeResponseInner. + */ + public static NetworkDeviceUpgradeResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceUpgradeResponseInner deserializedNetworkDeviceUpgradeResponseInner + = new NetworkDeviceUpgradeResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkDeviceUpgradeResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkDeviceUpgradeResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceUpgradeResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java index 4c639cf0b900..59b869c35dc3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java @@ -1,20 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -27,10 +28,15 @@ @Fluent public final class NetworkFabricControllerInner extends Resource { /* - * Resource properties. + * The NetworkFabricController Properties */ private NetworkFabricControllerProperties innerProperties = new NetworkFabricControllerProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -58,7 +64,7 @@ public NetworkFabricControllerInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkFabricController Properties. * * @return the innerProperties value. */ @@ -66,6 +72,26 @@ private NetworkFabricControllerProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -123,6 +149,85 @@ public NetworkFabricControllerInner withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricControllerProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @return the infrastructureExpressRouteConnections value. + */ + public List infrastructureExpressRouteConnections() { + return this.innerProperties() == null ? null : this.innerProperties().infrastructureExpressRouteConnections(); + } + + /** + * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner withInfrastructureExpressRouteConnections( + List infrastructureExpressRouteConnections) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricControllerProperties(); + } + this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); + return this; + } + + /** + * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @return the workloadExpressRouteConnections value. + */ + public List workloadExpressRouteConnections() { + return this.innerProperties() == null ? null : this.innerProperties().workloadExpressRouteConnections(); + } + + /** + * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner + withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricControllerProperties(); + } + this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); + return this; + } + /** * Get the infrastructureServices property: InfrastructureServices IP ranges. * @@ -175,17 +280,6 @@ public List networkFabricIds() { return this.innerProperties() == null ? null : this.innerProperties().networkFabricIds(); } - /** - * Get the workloadManagementNetwork property: A workload management network is required for all the tenant - * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or - * any other MSFT/Public endpoints. This is used for the backward compatibility. - * - * @return the workloadManagementNetwork value. - */ - public Boolean workloadManagementNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().workloadManagementNetwork(); - } - /** * Get the isWorkloadManagementNetworkEnabled property: A workload management network is required for all the tenant * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or @@ -292,6 +386,15 @@ public NetworkFabricControllerInner withNfcSku(NfcSku nfcSku) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the provisioningState property: Provides you the latest status of the NFC service, whether it is Accepted, * updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC @@ -303,102 +406,6 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - public List infrastructureExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().infrastructureExpressRouteConnections(); - } - - /** - * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); - return this; - } - - /** - * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - public List workloadExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().workloadExpressRouteConnections(); - } - - /** - * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); - return this; - } - - /** - * Get the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); - } - - /** - * Set the annotation property: Switch configuration description. - * - * @param annotation the annotation value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricControllerInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricControllerInner.class); - /** * {@inheritDoc} */ @@ -408,6 +415,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -441,6 +449,8 @@ public static NetworkFabricControllerInner fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedNetworkFabricControllerInner.innerProperties = NetworkFabricControllerProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricControllerInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkFabricControllerInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchProperties.java index fb530dae14bd..493e93c2cd05 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -14,11 +14,11 @@ import java.util.List; /** - * Network Fabric Controller updatable properties. + * Network Fabric Controller patch properties. */ @Fluent -public class NetworkFabricControllerPatchableProperties - implements JsonSerializable { +public final class NetworkFabricControllerPatchProperties + implements JsonSerializable { /* * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) @@ -32,9 +32,9 @@ public class NetworkFabricControllerPatchableProperties private List workloadExpressRouteConnections; /** - * Creates an instance of NetworkFabricControllerPatchableProperties class. + * Creates an instance of NetworkFabricControllerPatchProperties class. */ - public NetworkFabricControllerPatchableProperties() { + public NetworkFabricControllerPatchProperties() { } /** @@ -54,9 +54,9 @@ public List infrastructureExpressRouteConnect * services. (This is a Mandatory attribute). * * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerPatchableProperties object itself. + * @return the NetworkFabricControllerPatchProperties object itself. */ - public NetworkFabricControllerPatchableProperties withInfrastructureExpressRouteConnections( + public NetworkFabricControllerPatchProperties withInfrastructureExpressRouteConnections( List infrastructureExpressRouteConnections) { this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; return this; @@ -79,28 +79,14 @@ public List workloadExpressRouteConnections() * a Mandatory attribute). * * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerPatchableProperties object itself. + * @return the NetworkFabricControllerPatchProperties object itself. */ - public NetworkFabricControllerPatchableProperties + public NetworkFabricControllerPatchProperties withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { this.workloadExpressRouteConnections = workloadExpressRouteConnections; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (infrastructureExpressRouteConnections() != null) { - infrastructureExpressRouteConnections().forEach(e -> e.validate()); - } - if (workloadExpressRouteConnections() != null) { - workloadExpressRouteConnections().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -115,17 +101,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of NetworkFabricControllerPatchableProperties from the JsonReader. + * Reads an instance of NetworkFabricControllerPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricControllerPatchableProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricControllerPatchableProperties. + * @return An instance of NetworkFabricControllerPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkFabricControllerPatchProperties. */ - public static NetworkFabricControllerPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static NetworkFabricControllerPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NetworkFabricControllerPatchableProperties deserializedNetworkFabricControllerPatchableProperties - = new NetworkFabricControllerPatchableProperties(); + NetworkFabricControllerPatchProperties deserializedNetworkFabricControllerPatchProperties + = new NetworkFabricControllerPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -133,19 +119,19 @@ public static NetworkFabricControllerPatchableProperties fromJson(JsonReader jso if ("infrastructureExpressRouteConnections".equals(fieldName)) { List infrastructureExpressRouteConnections = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerPatchableProperties.infrastructureExpressRouteConnections + deserializedNetworkFabricControllerPatchProperties.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; } else if ("workloadExpressRouteConnections".equals(fieldName)) { List workloadExpressRouteConnections = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerPatchableProperties.workloadExpressRouteConnections + deserializedNetworkFabricControllerPatchProperties.workloadExpressRouteConnections = workloadExpressRouteConnections; } else { reader.skipChildren(); } } - return deserializedNetworkFabricControllerPatchableProperties; + return deserializedNetworkFabricControllerPatchProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java index 2d47a5ee69d7..7ce12358f4c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; @@ -22,7 +23,24 @@ * NetworkFabricControllerProperties defines the resource properties. */ @Fluent -public final class NetworkFabricControllerProperties extends AnnotationResource { +public final class NetworkFabricControllerProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. + * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) + */ + private List infrastructureExpressRouteConnections; + + /* + * As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This + * Express route is dedicated for Workload services. (This is a Mandatory attribute). + */ + private List workloadExpressRouteConnections; + /* * InfrastructureServices IP ranges. */ @@ -43,13 +61,6 @@ public final class NetworkFabricControllerProperties extends AnnotationResource */ private List networkFabricIds; - /* - * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated - * for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for - * the backward compatibility. - */ - private Boolean workloadManagementNetwork; - /* * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated * for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. @@ -76,28 +87,91 @@ public final class NetworkFabricControllerProperties extends AnnotationResource */ private NfcSku nfcSku; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During * this process, the states keep changing based on the status of NFC provisioning. */ private ProvisioningState provisioningState; - /* - * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. - * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) + /** + * Creates an instance of NetworkFabricControllerProperties class. */ - private List infrastructureExpressRouteConnections; + public NetworkFabricControllerProperties() { + } - /* - * As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This - * Express route is dedicated for Workload services. (This is a Mandatory attribute). + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. */ - private List workloadExpressRouteConnections; + public String annotation() { + return this.annotation; + } /** - * Creates an instance of NetworkFabricControllerProperties class. + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricControllerProperties object itself. */ - public NetworkFabricControllerProperties() { + public NetworkFabricControllerProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @return the infrastructureExpressRouteConnections value. + */ + public List infrastructureExpressRouteConnections() { + return this.infrastructureExpressRouteConnections; + } + + /** + * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties withInfrastructureExpressRouteConnections( + List infrastructureExpressRouteConnections) { + this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; + return this; + } + + /** + * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @return the workloadExpressRouteConnections value. + */ + public List workloadExpressRouteConnections() { + return this.workloadExpressRouteConnections; + } + + /** + * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties + withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { + this.workloadExpressRouteConnections = workloadExpressRouteConnections; + return this; } /** @@ -149,17 +223,6 @@ public List networkFabricIds() { return this.networkFabricIds; } - /** - * Get the workloadManagementNetwork property: A workload management network is required for all the tenant - * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or - * any other MSFT/Public endpoints. This is used for the backward compatibility. - * - * @return the workloadManagementNetwork value. - */ - public Boolean workloadManagementNetwork() { - return this.workloadManagementNetwork; - } - /** * Get the isWorkloadManagementNetworkEnabled property: A workload management network is required for all the tenant * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or @@ -254,6 +317,15 @@ public NetworkFabricControllerProperties withNfcSku(NfcSku nfcSku) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the provisioningState property: Provides you the latest status of the NFC service, whether it is Accepted, * updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC @@ -265,96 +337,17 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - public List infrastructureExpressRouteConnections() { - return this.infrastructureExpressRouteConnections; - } - - /** - * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerProperties object itself. - */ - public NetworkFabricControllerProperties withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; - return this; - } - - /** - * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - public List workloadExpressRouteConnections() { - return this.workloadExpressRouteConnections; - } - - /** - * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerProperties object itself. - */ - public NetworkFabricControllerProperties - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { - this.workloadExpressRouteConnections = workloadExpressRouteConnections; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricControllerProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (infrastructureServices() != null) { - infrastructureServices().validate(); - } - if (workloadServices() != null) { - workloadServices().validate(); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (infrastructureExpressRouteConnections() != null) { - infrastructureExpressRouteConnections().forEach(e -> e.validate()); - } - if (workloadExpressRouteConnections() != null) { - workloadExpressRouteConnections().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeArrayField("infrastructureExpressRouteConnections", this.infrastructureExpressRouteConnections, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("workloadExpressRouteConnections", this.workloadExpressRouteConnections, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("managedResourceGroupConfiguration", this.managedResourceGroupConfiguration); jsonWriter.writeStringField("isWorkloadManagementNetworkEnabled", this.isWorkloadManagementNetworkEnabled == null @@ -363,10 +356,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("ipv4AddressSpace", this.ipv4AddressSpace); jsonWriter.writeStringField("ipv6AddressSpace", this.ipv6AddressSpace); jsonWriter.writeStringField("nfcSku", this.nfcSku == null ? null : this.nfcSku.toString()); - jsonWriter.writeArrayField("infrastructureExpressRouteConnections", this.infrastructureExpressRouteConnections, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("workloadExpressRouteConnections", this.workloadExpressRouteConnections, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -387,7 +376,17 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkFabricControllerProperties.withAnnotation(reader.getString()); + deserializedNetworkFabricControllerProperties.annotation = reader.getString(); + } else if ("infrastructureExpressRouteConnections".equals(fieldName)) { + List infrastructureExpressRouteConnections + = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); + deserializedNetworkFabricControllerProperties.infrastructureExpressRouteConnections + = infrastructureExpressRouteConnections; + } else if ("workloadExpressRouteConnections".equals(fieldName)) { + List workloadExpressRouteConnections + = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); + deserializedNetworkFabricControllerProperties.workloadExpressRouteConnections + = workloadExpressRouteConnections; } else if ("infrastructureServices".equals(fieldName)) { deserializedNetworkFabricControllerProperties.infrastructureServices = ControllerServices.fromJson(reader); @@ -400,9 +399,6 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) } else if ("networkFabricIds".equals(fieldName)) { List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricControllerProperties.networkFabricIds = networkFabricIds; - } else if ("workloadManagementNetwork".equals(fieldName)) { - deserializedNetworkFabricControllerProperties.workloadManagementNetwork - = reader.getNullable(JsonReader::getBoolean); } else if ("isWorkloadManagementNetworkEnabled".equals(fieldName)) { deserializedNetworkFabricControllerProperties.isWorkloadManagementNetworkEnabled = IsWorkloadManagementNetworkEnabled.fromString(reader.getString()); @@ -415,19 +411,12 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) deserializedNetworkFabricControllerProperties.ipv6AddressSpace = reader.getString(); } else if ("nfcSku".equals(fieldName)) { deserializedNetworkFabricControllerProperties.nfcSku = NfcSku.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkFabricControllerProperties.lastOperation + = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkFabricControllerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("infrastructureExpressRouteConnections".equals(fieldName)) { - List infrastructureExpressRouteConnections - = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerProperties.infrastructureExpressRouteConnections - = infrastructureExpressRouteConnections; - } else if ("workloadExpressRouteConnections".equals(fieldName)) { - List workloadExpressRouteConnections - = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerProperties.workloadExpressRouteConnections - = workloadExpressRouteConnections; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java index f2d92ddb7617..74b38f461981 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java @@ -1,21 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.QosProperties; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationSummary; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; import java.io.IOException; import java.util.List; import java.util.Map; @@ -26,10 +34,15 @@ @Fluent public final class NetworkFabricInner extends Resource { /* - * Resource properties. + * The NetworkFabric Properties */ private NetworkFabricProperties innerProperties = new NetworkFabricProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -57,7 +70,7 @@ public NetworkFabricInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkFabric Properties. * * @return the innerProperties value. */ @@ -65,6 +78,26 @@ private NetworkFabricProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -181,6 +214,38 @@ public List routerIds() { return this.innerProperties() == null ? null : this.innerProperties().routerIds(); } + /** + * Get the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. + */ + public StorageAccountConfiguration storageAccountConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountConfiguration(); + } + + /** + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @param storageAccountConfiguration the storageAccountConfiguration value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withStorageAccountConfiguration(StorageAccountConfiguration storageAccountConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withStorageAccountConfiguration(storageAccountConfiguration); + return this; + } + + /** + * Get the fabricLocks property: Network Fabric Lock details. + * + * @return the fabricLocks value. + */ + public List fabricLocks() { + return this.innerProperties() == null ? null : this.innerProperties().fabricLocks(); + } + /** * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric * belongs. @@ -398,6 +463,194 @@ public List l3IsolationDomains() { return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomains(); } + /** + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @return the hardwareAlertThreshold value. + */ + public Integer hardwareAlertThreshold() { + return this.innerProperties() == null ? null : this.innerProperties().hardwareAlertThreshold(); + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withHardwareAlertThreshold(hardwareAlertThreshold); + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAcls(); + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withControlPlaneAcls(List controlPlaneAcls) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withControlPlaneAcls(controlPlaneAcls); + return this; + } + + /** + * Get the featureFlags property: NetworkFabric feature flag configuration information. + * + * @return the featureFlags value. + */ + public List featureFlags() { + return this.innerProperties() == null ? null : this.innerProperties().featureFlags(); + } + + /** + * Set the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags the featureFlags value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withFeatureFlags(List featureFlags) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withFeatureFlags(featureFlags); + return this; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.innerProperties() == null ? null : this.innerProperties().trustedIpPrefixes(); + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withTrustedIpPrefixes(List trustedIpPrefixes) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withTrustedIpPrefixes(trustedIpPrefixes); + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().uniqueRdConfiguration(); + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withUniqueRdConfiguration(UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + /** + * Get the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @return the storageArrayCount value. + */ + public Integer storageArrayCount() { + return this.innerProperties() == null ? null : this.innerProperties().storageArrayCount(); + } + + /** + * Set the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @param storageArrayCount the storageArrayCount value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withStorageArrayCount(Integer storageArrayCount) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withStorageArrayCount(storageArrayCount); + return this; + } + + /** + * Get the activeCommitBatches property: Active commit batch identifiers. + * + * @return the activeCommitBatches value. + */ + public List activeCommitBatches() { + return this.innerProperties() == null ? null : this.innerProperties().activeCommitBatches(); + } + + /** + * Get the secretRotationSummary property: Overview of secret rotation for the Network Fabric. + * + * @return the secretRotationSummary value. + */ + public SecretRotationSummary secretRotationSummary() { + return this.innerProperties() == null ? null : this.innerProperties().secretRotationSummary(); + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @return the authorizedTransceiver value. + */ + public AuthorizedTransceiverProperties authorizedTransceiver() { + return this.innerProperties() == null ? null : this.innerProperties().authorizedTransceiver(); + } + + /** + * Set the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @param authorizedTransceiver the authorizedTransceiver value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withAuthorizedTransceiver(AuthorizedTransceiverProperties authorizedTransceiver) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withAuthorizedTransceiver(authorizedTransceiver); + return this; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -427,6 +680,29 @@ public AdministrativeState administrativeState() { return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } + /** + * Get the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @return the qosConfiguration value. + */ + public QosProperties qosConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().qosConfiguration(); + } + + /** + * Set the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @param qosConfiguration the qosConfiguration value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withQosConfiguration(QosProperties qosConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withQosConfiguration(qosConfiguration); + return this; + } + /** * Get the annotation property: Switch configuration description. * @@ -450,23 +726,6 @@ public NetworkFabricInner withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricInner.class); - /** * {@inheritDoc} */ @@ -476,6 +735,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -508,6 +768,8 @@ public static NetworkFabricInner fromJson(JsonReader jsonReader) throws IOExcept deserializedNetworkFabricInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkFabricInner.innerProperties = NetworkFabricProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkFabricInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java index 160f29ca40e4..c1f5eb90c1e2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java @@ -1,23 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; import java.io.IOException; +import java.util.List; /** * Network Fabric Patch properties. */ @Fluent -public final class NetworkFabricPatchProperties extends AnnotationResource { +public final class NetworkFabricPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Number of compute racks associated to Network Fabric. */ @@ -46,12 +57,52 @@ public final class NetworkFabricPatchProperties extends AnnotationResource { /* * Network and credentials configuration already applied to terminal server. */ - private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; + private TerminalServerPatchConfiguration terminalServerConfiguration; /* * Configuration to be used to setup the management network. */ - private ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration; + private ManagementNetworkPatchConfiguration managementNetworkConfiguration; + + /* + * Bring your own storage account configurations for Network Fabric. + */ + private StorageAccountPatchConfiguration storageAccountConfiguration; + + /* + * Hardware alert threshold percentage. Possible values are from 20 to 100. + */ + private Integer hardwareAlertThreshold; + + /* + * Control Plane Access Control List ARM resource IDs. + */ + private List controlPlaneAcls; + + /* + * Trusted IP Prefix ARM resource IDs. + */ + private List trustedIpPrefixes; + + /* + * Unique Route Distinguisher configuration + */ + private UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration; + + /* + * NetworkFabric QoS Configuration + */ + private QosPatchProperties qosConfiguration; + + /* + * NetworkFabric feature flag configuration information + */ + private List featureFlags; + + /* + * Authorized transciever configuration for NetworkFabric. + */ + private AuthorizedTransceiverPatchProperties authorizedTransceiver; /** * Creates an instance of NetworkFabricPatchProperties class. @@ -59,6 +110,26 @@ public final class NetworkFabricPatchProperties extends AnnotationResource { public NetworkFabricPatchProperties() { } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the rackCount property: Number of compute racks associated to Network Fabric. * @@ -165,7 +236,7 @@ public NetworkFabricPatchProperties withFabricAsn(Long fabricAsn) { * * @return the terminalServerConfiguration value. */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { + public TerminalServerPatchConfiguration terminalServerConfiguration() { return this.terminalServerConfiguration; } @@ -176,8 +247,8 @@ public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServe * @param terminalServerConfiguration the terminalServerConfiguration value to set. * @return the NetworkFabricPatchProperties object itself. */ - public NetworkFabricPatchProperties withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + public NetworkFabricPatchProperties + withTerminalServerConfiguration(TerminalServerPatchConfiguration terminalServerConfiguration) { this.terminalServerConfiguration = terminalServerConfiguration; return this; } @@ -187,7 +258,7 @@ public NetworkFabricPatchProperties withTerminalServerConfiguration( * * @return the managementNetworkConfiguration value. */ - public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { + public ManagementNetworkPatchConfiguration managementNetworkConfiguration() { return this.managementNetworkConfiguration; } @@ -197,34 +268,173 @@ public ManagementNetworkConfigurationPatchableProperties managementNetworkConfig * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. * @return the NetworkFabricPatchProperties object itself. */ - public NetworkFabricPatchProperties withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + public NetworkFabricPatchProperties + withManagementNetworkConfiguration(ManagementNetworkPatchConfiguration managementNetworkConfiguration) { this.managementNetworkConfiguration = managementNetworkConfiguration; return this; } /** - * {@inheritDoc} + * Get the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. */ - @Override - public NetworkFabricPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public StorageAccountPatchConfiguration storageAccountConfiguration() { + return this.storageAccountConfiguration; + } + + /** + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @param storageAccountConfiguration the storageAccountConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties + withStorageAccountConfiguration(StorageAccountPatchConfiguration storageAccountConfiguration) { + this.storageAccountConfiguration = storageAccountConfiguration; return this; } /** - * Validates the instance. + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the hardwareAlertThreshold value. */ - @Override - public void validate() { - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() != null) { - managementNetworkConfiguration().validate(); - } + public Integer hardwareAlertThreshold() { + return this.hardwareAlertThreshold; + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + this.hardwareAlertThreshold = hardwareAlertThreshold; + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.controlPlaneAcls; + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withControlPlaneAcls(List controlPlaneAcls) { + this.controlPlaneAcls = controlPlaneAcls; + return this; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.trustedIpPrefixes; + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withTrustedIpPrefixes(List trustedIpPrefixes) { + this.trustedIpPrefixes = trustedIpPrefixes; + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties + withUniqueRdConfiguration(UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * Get the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @return the qosConfiguration value. + */ + public QosPatchProperties qosConfiguration() { + return this.qosConfiguration; + } + + /** + * Set the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @param qosConfiguration the qosConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withQosConfiguration(QosPatchProperties qosConfiguration) { + this.qosConfiguration = qosConfiguration; + return this; + } + + /** + * Get the featureFlags property: NetworkFabric feature flag configuration information. + * + * @return the featureFlags value. + */ + public List featureFlags() { + return this.featureFlags; + } + + /** + * Set the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags the featureFlags value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withFeatureFlags(List featureFlags) { + this.featureFlags = featureFlags; + return this; + } + + /** + * Get the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @return the authorizedTransceiver value. + */ + public AuthorizedTransceiverPatchProperties authorizedTransceiver() { + return this.authorizedTransceiver; + } + + /** + * Set the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @param authorizedTransceiver the authorizedTransceiver value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties + withAuthorizedTransceiver(AuthorizedTransceiverPatchProperties authorizedTransceiver) { + this.authorizedTransceiver = authorizedTransceiver; + return this; } /** @@ -233,7 +443,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeNumberField("rackCount", this.rackCount); jsonWriter.writeNumberField("serverCountPerRack", this.serverCountPerRack); jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); @@ -241,6 +451,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("fabricASN", this.fabricAsn); jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); + jsonWriter.writeJsonField("storageAccountConfiguration", this.storageAccountConfiguration); + jsonWriter.writeNumberField("hardwareAlertThreshold", this.hardwareAlertThreshold); + jsonWriter.writeArrayField("controlPlaneAcls", this.controlPlaneAcls, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("trustedIpPrefixes", this.trustedIpPrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + jsonWriter.writeJsonField("qosConfiguration", this.qosConfiguration); + jsonWriter.writeArrayField("featureFlags", this.featureFlags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("authorizedTransceiver", this.authorizedTransceiver); return jsonWriter.writeEndObject(); } @@ -260,7 +480,7 @@ public static NetworkFabricPatchProperties fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.withAnnotation(reader.getString()); + deserializedNetworkFabricPatchProperties.annotation = reader.getString(); } else if ("rackCount".equals(fieldName)) { deserializedNetworkFabricPatchProperties.rackCount = reader.getNullable(JsonReader::getInt); } else if ("serverCountPerRack".equals(fieldName)) { @@ -274,10 +494,34 @@ public static NetworkFabricPatchProperties fromJson(JsonReader jsonReader) throw deserializedNetworkFabricPatchProperties.fabricAsn = reader.getNullable(JsonReader::getLong); } else if ("terminalServerConfiguration".equals(fieldName)) { deserializedNetworkFabricPatchProperties.terminalServerConfiguration - = NetworkFabricPatchablePropertiesTerminalServerConfiguration.fromJson(reader); + = TerminalServerPatchConfiguration.fromJson(reader); } else if ("managementNetworkConfiguration".equals(fieldName)) { deserializedNetworkFabricPatchProperties.managementNetworkConfiguration - = ManagementNetworkConfigurationPatchableProperties.fromJson(reader); + = ManagementNetworkPatchConfiguration.fromJson(reader); + } else if ("storageAccountConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.storageAccountConfiguration + = StorageAccountPatchConfiguration.fromJson(reader); + } else if ("hardwareAlertThreshold".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.hardwareAlertThreshold + = reader.getNullable(JsonReader::getInt); + } else if ("controlPlaneAcls".equals(fieldName)) { + List controlPlaneAcls = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricPatchProperties.controlPlaneAcls = controlPlaneAcls; + } else if ("trustedIpPrefixes".equals(fieldName)) { + List trustedIpPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricPatchProperties.trustedIpPrefixes = trustedIpPrefixes; + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.uniqueRdConfiguration + = UniqueRouteDistinguisherPatchProperties.fromJson(reader); + } else if ("qosConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.qosConfiguration = QosPatchProperties.fromJson(reader); + } else if ("featureFlags".equals(fieldName)) { + List featureFlags + = reader.readArray(reader1 -> FeatureFlagProperties.fromJson(reader1)); + deserializedNetworkFabricPatchProperties.featureFlags = featureFlags; + } else if ("authorizedTransceiver".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.authorizedTransceiver + = AuthorizedTransceiverPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java index 414b33c3fce9..2cdccbb1f205 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java @@ -1,20 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.QosProperties; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationSummary; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; import java.io.IOException; import java.util.List; @@ -40,6 +47,16 @@ public final class NetworkFabricProperties extends AnnotationResource { */ private List routerIds; + /* + * Bring your own storage account configurations for Network Fabric. + */ + private StorageAccountConfiguration storageAccountConfiguration; + + /* + * Network Fabric Lock details + */ + private List fabricLocks; + /* * Azure resource ID for the NetworkFabricController the NetworkFabric belongs. */ @@ -96,6 +113,56 @@ public final class NetworkFabricProperties extends AnnotationResource { */ private List l3IsolationDomains; + /* + * Hardware alert threshold percentage. Possible values are from 20 to 100. + */ + private Integer hardwareAlertThreshold; + + /* + * Control Plane Access Control List ARM resource IDs. + */ + private List controlPlaneAcls; + + /* + * NetworkFabric feature flag configuration information + */ + private List featureFlags; + + /* + * Trusted IP Prefixes ARM resource IDs. + */ + private List trustedIpPrefixes; + + /* + * Unique Route Distinguisher configuration + */ + private UniqueRouteDistinguisherProperties uniqueRdConfiguration; + + /* + * Number of Storage arrays associated with the Network Fabric. + */ + private Integer storageArrayCount; + + /* + * Active commit batch identifiers + */ + private List activeCommitBatches; + + /* + * Overview of secret rotation for the Network Fabric. + */ + private SecretRotationSummary secretRotationSummary; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + + /* + * Authorized transciever configuration for NetworkFabric. + */ + private AuthorizedTransceiverProperties authorizedTransceiver; + /* * Configuration state of the resource. */ @@ -112,6 +179,11 @@ public final class NetworkFabricProperties extends AnnotationResource { */ private AdministrativeState administrativeState; + /* + * NetworkFabric QoS Configuration + */ + private QosProperties qosConfiguration; + /** * Creates an instance of NetworkFabricProperties class. */ @@ -171,6 +243,36 @@ public List routerIds() { return this.routerIds; } + /** + * Get the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. + */ + public StorageAccountConfiguration storageAccountConfiguration() { + return this.storageAccountConfiguration; + } + + /** + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @param storageAccountConfiguration the storageAccountConfiguration value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties + withStorageAccountConfiguration(StorageAccountConfiguration storageAccountConfiguration) { + this.storageAccountConfiguration = storageAccountConfiguration; + return this; + } + + /** + * Get the fabricLocks property: Network Fabric Lock details. + * + * @return the fabricLocks value. + */ + public List fabricLocks() { + return this.fabricLocks; + } + /** * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric * belongs. @@ -365,6 +467,173 @@ public List l3IsolationDomains() { return this.l3IsolationDomains; } + /** + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @return the hardwareAlertThreshold value. + */ + public Integer hardwareAlertThreshold() { + return this.hardwareAlertThreshold; + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + this.hardwareAlertThreshold = hardwareAlertThreshold; + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.controlPlaneAcls; + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withControlPlaneAcls(List controlPlaneAcls) { + this.controlPlaneAcls = controlPlaneAcls; + return this; + } + + /** + * Get the featureFlags property: NetworkFabric feature flag configuration information. + * + * @return the featureFlags value. + */ + public List featureFlags() { + return this.featureFlags; + } + + /** + * Set the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags the featureFlags value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withFeatureFlags(List featureFlags) { + this.featureFlags = featureFlags; + return this; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.trustedIpPrefixes; + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withTrustedIpPrefixes(List trustedIpPrefixes) { + this.trustedIpPrefixes = trustedIpPrefixes; + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withUniqueRdConfiguration(UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * Get the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @return the storageArrayCount value. + */ + public Integer storageArrayCount() { + return this.storageArrayCount; + } + + /** + * Set the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @param storageArrayCount the storageArrayCount value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withStorageArrayCount(Integer storageArrayCount) { + this.storageArrayCount = storageArrayCount; + return this; + } + + /** + * Get the activeCommitBatches property: Active commit batch identifiers. + * + * @return the activeCommitBatches value. + */ + public List activeCommitBatches() { + return this.activeCommitBatches; + } + + /** + * Get the secretRotationSummary property: Overview of secret rotation for the Network Fabric. + * + * @return the secretRotationSummary value. + */ + public SecretRotationSummary secretRotationSummary() { + return this.secretRotationSummary; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @return the authorizedTransceiver value. + */ + public AuthorizedTransceiverProperties authorizedTransceiver() { + return this.authorizedTransceiver; + } + + /** + * Set the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @param authorizedTransceiver the authorizedTransceiver value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withAuthorizedTransceiver(AuthorizedTransceiverProperties authorizedTransceiver) { + this.authorizedTransceiver = authorizedTransceiver; + return this; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -395,53 +664,33 @@ public AdministrativeState administrativeState() { } /** - * {@inheritDoc} + * Get the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @return the qosConfiguration value. */ - @Override - public NetworkFabricProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public QosProperties qosConfiguration() { + return this.qosConfiguration; } /** - * Validates the instance. + * Set the qosConfiguration property: NetworkFabric QoS Configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param qosConfiguration the qosConfiguration value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withQosConfiguration(QosProperties qosConfiguration) { + this.qosConfiguration = qosConfiguration; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - if (networkFabricSku() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricSku in model NetworkFabricProperties")); - } - if (networkFabricControllerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricControllerId in model NetworkFabricProperties")); - } - if (ipv4Prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipv4Prefix in model NetworkFabricProperties")); - } - if (terminalServerConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property terminalServerConfiguration in model NetworkFabricProperties")); - } else { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property managementNetworkConfiguration in model NetworkFabricProperties")); - } else { - managementNetworkConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricProperties.class); + public NetworkFabricProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } /** * {@inheritDoc} @@ -458,8 +707,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); jsonWriter.writeStringField("fabricVersion", this.fabricVersion); + jsonWriter.writeJsonField("storageAccountConfiguration", this.storageAccountConfiguration); jsonWriter.writeNumberField("rackCount", this.rackCount); jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); + jsonWriter.writeNumberField("hardwareAlertThreshold", this.hardwareAlertThreshold); + jsonWriter.writeArrayField("controlPlaneAcls", this.controlPlaneAcls, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("featureFlags", this.featureFlags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("trustedIpPrefixes", this.trustedIpPrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + jsonWriter.writeNumberField("storageArrayCount", this.storageArrayCount); + jsonWriter.writeJsonField("authorizedTransceiver", this.authorizedTransceiver); + jsonWriter.writeJsonField("qosConfiguration", this.qosConfiguration); return jsonWriter.writeEndObject(); } @@ -502,6 +762,13 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE } else if ("routerIds".equals(fieldName)) { List routerIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricProperties.routerIds = routerIds; + } else if ("storageAccountConfiguration".equals(fieldName)) { + deserializedNetworkFabricProperties.storageAccountConfiguration + = StorageAccountConfiguration.fromJson(reader); + } else if ("fabricLocks".equals(fieldName)) { + List fabricLocks + = reader.readArray(reader1 -> FabricLockProperties.fromJson(reader1)); + deserializedNetworkFabricProperties.fabricLocks = fabricLocks; } else if ("rackCount".equals(fieldName)) { deserializedNetworkFabricProperties.rackCount = reader.getNullable(JsonReader::getInt); } else if ("ipv6Prefix".equals(fieldName)) { @@ -515,6 +782,33 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE } else if ("l3IsolationDomains".equals(fieldName)) { List l3IsolationDomains = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricProperties.l3IsolationDomains = l3IsolationDomains; + } else if ("hardwareAlertThreshold".equals(fieldName)) { + deserializedNetworkFabricProperties.hardwareAlertThreshold = reader.getNullable(JsonReader::getInt); + } else if ("controlPlaneAcls".equals(fieldName)) { + List controlPlaneAcls = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.controlPlaneAcls = controlPlaneAcls; + } else if ("featureFlags".equals(fieldName)) { + List featureFlags + = reader.readArray(reader1 -> FeatureFlagProperties.fromJson(reader1)); + deserializedNetworkFabricProperties.featureFlags = featureFlags; + } else if ("trustedIpPrefixes".equals(fieldName)) { + List trustedIpPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.trustedIpPrefixes = trustedIpPrefixes; + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedNetworkFabricProperties.uniqueRdConfiguration + = UniqueRouteDistinguisherProperties.fromJson(reader); + } else if ("storageArrayCount".equals(fieldName)) { + deserializedNetworkFabricProperties.storageArrayCount = reader.getNullable(JsonReader::getInt); + } else if ("activeCommitBatches".equals(fieldName)) { + List activeCommitBatches = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.activeCommitBatches = activeCommitBatches; + } else if ("secretRotationSummary".equals(fieldName)) { + deserializedNetworkFabricProperties.secretRotationSummary = SecretRotationSummary.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkFabricProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("authorizedTransceiver".equals(fieldName)) { + deserializedNetworkFabricProperties.authorizedTransceiver + = AuthorizedTransceiverProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkFabricProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -524,6 +818,8 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE } else if ("administrativeState".equals(fieldName)) { deserializedNetworkFabricProperties.administrativeState = AdministrativeState.fromString(reader.getString()); + } else if ("qosConfiguration".equals(fieldName)) { + deserializedNetworkFabricProperties.qosConfiguration = QosProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncCertificatesResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncCertificatesResponseInner.java new file mode 100644 index 000000000000..2cba6ac4d0c1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncCertificatesResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a ResyncCertificates request on a Network Fabric. + */ +@Immutable +public final class NetworkFabricResyncCertificatesResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkFabricResyncCertificatesResponseInner class. + */ + private NetworkFabricResyncCertificatesResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricResyncCertificatesResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricResyncCertificatesResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricResyncCertificatesResponseInner. + */ + public static NetworkFabricResyncCertificatesResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricResyncCertificatesResponseInner deserializedNetworkFabricResyncCertificatesResponseInner + = new NetworkFabricResyncCertificatesResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkFabricResyncCertificatesResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkFabricResyncCertificatesResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricResyncCertificatesResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncPasswordsResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncPasswordsResponseInner.java new file mode 100644 index 000000000000..7762c46b27a7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncPasswordsResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a ResyncPasswords request on a Network Fabric. + */ +@Immutable +public final class NetworkFabricResyncPasswordsResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkFabricResyncPasswordsResponseInner class. + */ + private NetworkFabricResyncPasswordsResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricResyncPasswordsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricResyncPasswordsResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricResyncPasswordsResponseInner. + */ + public static NetworkFabricResyncPasswordsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricResyncPasswordsResponseInner deserializedNetworkFabricResyncPasswordsResponseInner + = new NetworkFabricResyncPasswordsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkFabricResyncPasswordsResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkFabricResyncPasswordsResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricResyncPasswordsResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotateCertificatesResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotateCertificatesResponseInner.java new file mode 100644 index 000000000000..bad9e239d3cb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotateCertificatesResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a RotateCertificates request on a Network Fabric. + */ +@Immutable +public final class NetworkFabricRotateCertificatesResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkFabricRotateCertificatesResponseInner class. + */ + private NetworkFabricRotateCertificatesResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricRotateCertificatesResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricRotateCertificatesResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricRotateCertificatesResponseInner. + */ + public static NetworkFabricRotateCertificatesResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricRotateCertificatesResponseInner deserializedNetworkFabricRotateCertificatesResponseInner + = new NetworkFabricRotateCertificatesResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkFabricRotateCertificatesResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkFabricRotateCertificatesResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricRotateCertificatesResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotatePasswordsResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotatePasswordsResponseInner.java new file mode 100644 index 000000000000..1d5d8872bb81 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotatePasswordsResponseInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response body for a RotatePasswords request on a Network Fabric. + */ +@Immutable +public final class NetworkFabricRotatePasswordsResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkFabricRotatePasswordsResponseInner class. + */ + private NetworkFabricRotatePasswordsResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricRotatePasswordsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricRotatePasswordsResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricRotatePasswordsResponseInner. + */ + public static NetworkFabricRotatePasswordsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricRotatePasswordsResponseInner deserializedNetworkFabricRotatePasswordsResponseInner + = new NetworkFabricRotatePasswordsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkFabricRotatePasswordsResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkFabricRotatePasswordsResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricRotatePasswordsResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java index 81a9f1c955e2..bbb9958a4e1c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,12 +18,12 @@ /** * The Network Fabric SKU resource definition. */ -@Fluent +@Immutable public final class NetworkFabricSkuInner extends ProxyResource { /* - * Resource properties. + * The Network Fabric SKU properties. */ - private NetworkFabricSkuProperties innerProperties = new NetworkFabricSkuProperties(); + private NetworkFabricSkuProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -49,11 +48,11 @@ public final class NetworkFabricSkuInner extends ProxyResource { /** * Creates an instance of NetworkFabricSkuInner class. */ - public NetworkFabricSkuInner() { + private NetworkFabricSkuInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The Network Fabric SKU properties. * * @return the innerProperties value. */ @@ -119,21 +118,6 @@ public Integer maxComputeRacks() { return this.innerProperties() == null ? null : this.innerProperties().maxComputeRacks(); } - /** - * Set the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. The - * value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. - * - * @param maxComputeRacks the maxComputeRacks value to set. - * @return the NetworkFabricSkuInner object itself. - */ - public NetworkFabricSkuInner withMaxComputeRacks(Integer maxComputeRacks) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricSkuProperties(); - } - this.innerProperties().withMaxComputeRacks(maxComputeRacks); - return this; - } - /** * Get the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * @@ -143,20 +127,6 @@ public Integer maximumServerCount() { return this.innerProperties() == null ? null : this.innerProperties().maximumServerCount(); } - /** - * Set the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. - * - * @param maximumServerCount the maximumServerCount value to set. - * @return the NetworkFabricSkuInner object itself. - */ - public NetworkFabricSkuInner withMaximumServerCount(Integer maximumServerCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricSkuProperties(); - } - this.innerProperties().withMaximumServerCount(maximumServerCount); - return this; - } - /** * Get the supportedVersions property: List of supported Network Fabric SKU versions. * @@ -184,23 +154,6 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricSkuInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java index f49bcc9ec4aa..d81d976767bf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ /** * Network Fabric SKU Properties define properties of the resource. */ -@Fluent +@Immutable public final class NetworkFabricSkuProperties implements JsonSerializable { /* * Type of Network Fabric SKU. @@ -53,7 +53,7 @@ public final class NetworkFabricSkuProperties implements JsonSerializable tags) { + super.withTags(tags); + return this; + } + + /** + * Get the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationProperties bmpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bmpConfiguration(); + } + + /** + * Set the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorInner object itself. + */ + public NetworkMonitorInner withBmpConfiguration(BmpConfigurationProperties bmpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkMonitorProperties(); + } + this.innerProperties().withBmpConfiguration(bmpConfiguration); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provides you the latest status of the NetworkMonitor resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkMonitorInner object itself. + */ + public NetworkMonitorInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkMonitorProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkMonitorInner. + */ + public static NetworkMonitorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorInner deserializedNetworkMonitorInner = new NetworkMonitorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkMonitorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkMonitorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetworkMonitorInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetworkMonitorInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkMonitorInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetworkMonitorInner.innerProperties = NetworkMonitorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkMonitorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorPatchProperties.java new file mode 100644 index 000000000000..1671476c9490 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import java.io.IOException; + +/** + * The Network Monitor Patch Properties. + */ +@Fluent +public final class NetworkMonitorPatchProperties implements JsonSerializable { + /* + * BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + */ + private BmpConfigurationPatchProperties bmpConfiguration; + + /** + * Creates an instance of NetworkMonitorPatchProperties class. + */ + public NetworkMonitorPatchProperties() { + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorPatchProperties object itself. + */ + public NetworkMonitorPatchProperties withBmpConfiguration(BmpConfigurationPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorPatchProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorPatchProperties. + */ + public static NetworkMonitorPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorPatchProperties deserializedNetworkMonitorPatchProperties + = new NetworkMonitorPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bmpConfiguration".equals(fieldName)) { + deserializedNetworkMonitorPatchProperties.bmpConfiguration + = BmpConfigurationPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorProperties.java new file mode 100644 index 000000000000..9a607d376df2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorProperties.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.io.IOException; + +/** + * Network Monitor Properties defines the properties of the resource. + */ +@Fluent +public final class NetworkMonitorProperties extends AnnotationResource { + /* + * BMP Configurations for the Network Fabric. + */ + private BmpConfigurationProperties bmpConfiguration; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provides you the latest status of the NetworkMonitor resource + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; + + /** + * Creates an instance of NetworkMonitorProperties class. + */ + public NetworkMonitorProperties() { + } + + /** + * Get the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorProperties object itself. + */ + public NetworkMonitorProperties withBmpConfiguration(BmpConfigurationProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provides you the latest status of the NetworkMonitor resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkMonitorProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorProperties. + */ + public static NetworkMonitorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorProperties deserializedNetworkMonitorProperties = new NetworkMonitorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkMonitorProperties.withAnnotation(reader.getString()); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedNetworkMonitorProperties.bmpConfiguration = BmpConfigurationProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkMonitorProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkMonitorProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedNetworkMonitorProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNetworkMonitorProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java index 8cf5d7aa4718..0e6fcfa3feb7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -22,10 +24,15 @@ @Fluent public final class NetworkPacketBrokerInner extends Resource { /* - * Resource properties. + * The NetworkPacketBroker properties */ private NetworkPacketBrokerProperties innerProperties = new NetworkPacketBrokerProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -53,7 +60,7 @@ public NetworkPacketBrokerInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkPacketBroker properties. * * @return the innerProperties value. */ @@ -61,6 +68,26 @@ private NetworkPacketBrokerProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkPacketBrokerInner object itself. + */ + public NetworkPacketBrokerInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -178,6 +205,15 @@ public List neighborGroupIds() { return this.innerProperties() == null ? null : this.innerProperties().neighborGroupIds(); } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -188,22 +224,14 @@ public ProvisioningState provisioningState() { } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkPacketBrokerInner")); - } else { - innerProperties().validate(); - } + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } - private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerInner.class); - /** * {@inheritDoc} */ @@ -213,6 +241,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -246,6 +275,8 @@ public static NetworkPacketBrokerInner fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { deserializedNetworkPacketBrokerInner.innerProperties = NetworkPacketBrokerProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkPacketBrokerInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkPacketBrokerInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java index 6a8d9522f6d2..d07e04af8f22 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -44,11 +45,21 @@ public final class NetworkPacketBrokerProperties implements JsonSerializable neighborGroupIds; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ private ProvisioningState provisioningState; + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + /** * Creates an instance of NetworkPacketBrokerProperties class. */ @@ -112,6 +123,15 @@ public List neighborGroupIds() { return this.neighborGroupIds; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -122,20 +142,14 @@ public ProvisioningState provisioningState() { } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model NetworkPacketBrokerProperties")); - } + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } - private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerProperties.class); - /** * {@inheritDoc} */ @@ -177,9 +191,14 @@ public static NetworkPacketBrokerProperties fromJson(JsonReader jsonReader) thro } else if ("neighborGroupIds".equals(fieldName)) { List neighborGroupIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkPacketBrokerProperties.neighborGroupIds = neighborGroupIds; + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkPacketBrokerProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkPacketBrokerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkPacketBrokerProperties.configurationState + = ConfigurationState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java index c90a251ef846..92310d05c52c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -23,7 +24,7 @@ @Fluent public final class NetworkRackInner extends Resource { /* - * Resource properties. + * Network Rack Properties */ private NetworkRackProperties innerProperties = new NetworkRackProperties(); @@ -54,7 +55,7 @@ public NetworkRackInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: Network Rack Properties. * * @return the innerProperties value. */ @@ -174,6 +175,15 @@ public List networkDevices() { return this.innerProperties() == null ? null : this.innerProperties().networkDevices(); } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -183,6 +193,15 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + /** * Get the annotation property: Switch configuration description. * @@ -206,23 +225,6 @@ public NetworkRackInner withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkRackInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java index 08ebb39a563b..f7c2e6ae7604 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -35,11 +36,21 @@ public final class NetworkRackProperties extends AnnotationResource { */ private List networkDevices; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ private ProvisioningState provisioningState; + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + /** * Creates an instance of NetworkRackProperties class. */ @@ -95,6 +106,15 @@ public List networkDevices() { return this.networkDevices; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -105,30 +125,23 @@ public ProvisioningState provisioningState() { } /** - * {@inheritDoc} + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. */ - @Override - public NetworkRackProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model NetworkRackProperties")); - } + public NetworkRackProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackProperties.class); - /** * {@inheritDoc} */ @@ -167,9 +180,14 @@ public static NetworkRackProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("networkDevices".equals(fieldName)) { List networkDevices = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkRackProperties.networkDevices = networkDevices; + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkRackProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkRackProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkRackProperties.configurationState + = ConfigurationState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java index 07aae6f08890..c25e831a91b2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java @@ -1,19 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -26,10 +27,15 @@ @Fluent public final class NetworkTapInner extends Resource { /* - * Resource properties. + * The NetworkTap Properties */ private NetworkTapProperties innerProperties = new NetworkTapProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -57,7 +63,7 @@ public NetworkTapInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkTap Properties. * * @return the innerProperties value. */ @@ -65,6 +71,26 @@ private NetworkTapProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -154,12 +180,21 @@ public String sourceTapRuleId() { return this.innerProperties() == null ? null : this.innerProperties().sourceTapRuleId(); } + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricIds(); + } + /** * Get the destinations property: List of destinations to send the filter traffic. * * @return the destinations value. */ - public List destinations() { + public List destinations() { return this.innerProperties() == null ? null : this.innerProperties().destinations(); } @@ -169,7 +204,7 @@ public List destinations() { * @param destinations the destinations value to set. * @return the NetworkTapInner object itself. */ - public NetworkTapInner withDestinations(List destinations) { + public NetworkTapInner withDestinations(List destinations) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapProperties(); } @@ -200,6 +235,15 @@ public NetworkTapInner withPollingType(PollingType pollingType) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the configurationState property: Gets the configurations state of the resource. * @@ -252,23 +296,6 @@ public NetworkTapInner withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property innerProperties in model NetworkTapInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapInner.class); - /** * {@inheritDoc} */ @@ -278,6 +305,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -310,6 +338,8 @@ public static NetworkTapInner fromJson(JsonReader jsonReader) throws IOException deserializedNetworkTapInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkTapInner.innerProperties = NetworkTapProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkTapInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkTapInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchProperties.java similarity index 55% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchProperties.java index d65a2897ca55..4654299d6edd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -9,7 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.io.IOException; import java.util.List; @@ -18,7 +18,7 @@ * The Network Tap resource patch definition. */ @Fluent -public final class NetworkTapPatchableParameters extends AnnotationResource { +public final class NetworkTapPatchProperties extends AnnotationResource { /* * Polling type. */ @@ -27,12 +27,12 @@ public final class NetworkTapPatchableParameters extends AnnotationResource { /* * List of destination properties to send the filter traffic. */ - private List destinations; + private List destinations; /** - * Creates an instance of NetworkTapPatchableParameters class. + * Creates an instance of NetworkTapPatchProperties class. */ - public NetworkTapPatchableParameters() { + public NetworkTapPatchProperties() { } /** @@ -48,9 +48,9 @@ public PollingType pollingType() { * Set the pollingType property: Polling type. * * @param pollingType the pollingType value to set. - * @return the NetworkTapPatchableParameters object itself. + * @return the NetworkTapPatchProperties object itself. */ - public NetworkTapPatchableParameters withPollingType(PollingType pollingType) { + public NetworkTapPatchProperties withPollingType(PollingType pollingType) { this.pollingType = pollingType; return this; } @@ -60,7 +60,7 @@ public NetworkTapPatchableParameters withPollingType(PollingType pollingType) { * * @return the destinations value. */ - public List destinations() { + public List destinations() { return this.destinations; } @@ -68,10 +68,9 @@ public List destinations() { * Set the destinations property: List of destination properties to send the filter traffic. * * @param destinations the destinations value to set. - * @return the NetworkTapPatchableParameters object itself. + * @return the NetworkTapPatchProperties object itself. */ - public NetworkTapPatchableParameters - withDestinations(List destinations) { + public NetworkTapPatchProperties withDestinations(List destinations) { this.destinations = destinations; return this; } @@ -80,23 +79,11 @@ public List destinations() { * {@inheritDoc} */ @Override - public NetworkTapPatchableParameters withAnnotation(String annotation) { + public NetworkTapPatchProperties withAnnotation(String annotation) { super.withAnnotation(annotation); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (destinations() != null) { - destinations().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -110,35 +97,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of NetworkTapPatchableParameters from the JsonReader. + * Reads an instance of NetworkTapPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPatchableParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPatchableParameters. + * @return An instance of NetworkTapPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapPatchProperties. */ - public static NetworkTapPatchableParameters fromJson(JsonReader jsonReader) throws IOException { + public static NetworkTapPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NetworkTapPatchableParameters deserializedNetworkTapPatchableParameters - = new NetworkTapPatchableParameters(); + NetworkTapPatchProperties deserializedNetworkTapPatchProperties = new NetworkTapPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkTapPatchableParameters.withAnnotation(reader.getString()); + deserializedNetworkTapPatchProperties.withAnnotation(reader.getString()); } else if ("pollingType".equals(fieldName)) { - deserializedNetworkTapPatchableParameters.pollingType = PollingType.fromString(reader.getString()); + deserializedNetworkTapPatchProperties.pollingType = PollingType.fromString(reader.getString()); } else if ("destinations".equals(fieldName)) { - List destinations - = reader.readArray(reader1 -> NetworkTapPatchableParametersDestinationsItem.fromJson(reader1)); - deserializedNetworkTapPatchableParameters.destinations = destinations; + List destinations + = reader.readArray(reader1 -> DestinationPatchProperties.fromJson(reader1)); + deserializedNetworkTapPatchProperties.destinations = destinations; } else { reader.skipChildren(); } } - return deserializedNetworkTapPatchableParameters; + return deserializedNetworkTapPatchProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java index 673b06d632d7..693eb55fbbf4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -33,16 +33,26 @@ public final class NetworkTapProperties extends AnnotationResource { */ private String sourceTapRuleId; + /* + * Associated Network Fabric Resource IDs + */ + private List networkFabricIds; + /* * List of destinations to send the filter traffic. */ - private List destinations; + private List destinations; /* * Polling type. */ private PollingType pollingType; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Gets the configurations state of the resource. */ @@ -94,12 +104,21 @@ public String sourceTapRuleId() { return this.sourceTapRuleId; } + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.networkFabricIds; + } + /** * Get the destinations property: List of destinations to send the filter traffic. * * @return the destinations value. */ - public List destinations() { + public List destinations() { return this.destinations; } @@ -109,7 +128,7 @@ public List destinations() { * @param destinations the destinations value to set. * @return the NetworkTapProperties object itself. */ - public NetworkTapProperties withDestinations(List destinations) { + public NetworkTapProperties withDestinations(List destinations) { this.destinations = destinations; return this; } @@ -134,6 +153,15 @@ public NetworkTapProperties withPollingType(PollingType pollingType) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Gets the configurations state of the resource. * @@ -172,29 +200,6 @@ public NetworkTapProperties withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkPacketBrokerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkPacketBrokerId in model NetworkTapProperties")); - } - if (destinations() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property destinations in model NetworkTapProperties")); - } else { - destinations().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapProperties.class); - /** * {@inheritDoc} */ @@ -229,13 +234,18 @@ public static NetworkTapProperties fromJson(JsonReader jsonReader) throws IOExce } else if ("networkPacketBrokerId".equals(fieldName)) { deserializedNetworkTapProperties.networkPacketBrokerId = reader.getString(); } else if ("destinations".equals(fieldName)) { - List destinations - = reader.readArray(reader1 -> NetworkTapPropertiesDestinationsItem.fromJson(reader1)); + List destinations + = reader.readArray(reader1 -> DestinationProperties.fromJson(reader1)); deserializedNetworkTapProperties.destinations = destinations; } else if ("sourceTapRuleId".equals(fieldName)) { deserializedNetworkTapProperties.sourceTapRuleId = reader.getString(); + } else if ("networkFabricIds".equals(fieldName)) { + List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkTapProperties.networkFabricIds = networkFabricIds; } else if ("pollingType".equals(fieldName)) { deserializedNetworkTapProperties.pollingType = PollingType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkTapProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkTapProperties.configurationState = ConfigurationState.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapResyncResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapResyncResponseInner.java new file mode 100644 index 000000000000..c607cb73d7d8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapResyncResponseInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response for NetworkTap Resync operation. + */ +@Immutable +public final class NetworkTapResyncResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkTapResyncResponseInner class. + */ + private NetworkTapResyncResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapResyncResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapResyncResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkTapResyncResponseInner. + */ + public static NetworkTapResyncResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapResyncResponseInner deserializedNetworkTapResyncResponseInner + = new NetworkTapResyncResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkTapResyncResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkTapResyncResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapResyncResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java index e2d6803c5480..8bbd4eca2d46 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,8 +14,11 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -29,10 +31,15 @@ @Fluent public final class NetworkTapRuleInner extends Resource { /* - * Resource properties. + * The NetworkTapRule Properties */ private NetworkTapRuleProperties innerProperties = new NetworkTapRuleProperties(); + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -60,7 +67,7 @@ public NetworkTapRuleInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkTapRule Properties. * * @return the innerProperties value. */ @@ -68,6 +75,26 @@ private NetworkTapRuleProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -126,73 +153,28 @@ public NetworkTapRuleInner withTags(Map tags) { } /** - * Get the networkTapId property: The ARM resource Id of the NetworkTap. - * - * @return the networkTapId value. - */ - public String networkTapId() { - return this.innerProperties() == null ? null : this.innerProperties().networkTapId(); - } - - /** - * Get the pollingIntervalInSeconds property: Polling interval in seconds. + * Get the annotation property: Switch configuration description. * - * @return the pollingIntervalInSeconds value. + * @return the annotation value. */ - public PollingIntervalInSeconds pollingIntervalInSeconds() { - return this.innerProperties() == null ? null : this.innerProperties().pollingIntervalInSeconds(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the pollingIntervalInSeconds property: Polling interval in seconds. + * Set the annotation property: Switch configuration description. * - * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. + * @param annotation the annotation value to set. * @return the NetworkTapRuleInner object itself. */ - public NetworkTapRuleInner withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { + public NetworkTapRuleInner withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapRuleProperties(); } - this.innerProperties().withPollingIntervalInSeconds(pollingIntervalInSeconds); + this.innerProperties().withAnnotation(annotation); return this; } - /** - * Get the lastSyncedTime property: The last sync timestamp. - * - * @return the lastSyncedTime value. - */ - public OffsetDateTime lastSyncedTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); - } - - /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - /** * Get the configurationType property: Input method to configure Network Tap Rule. * @@ -239,6 +221,31 @@ public NetworkTapRuleInner withTapRulesUrl(String tapRulesUrl) { return this; } + /** + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. + */ + public IdentitySelector identitySelector() { + return this.innerProperties() == null ? null : this.innerProperties().identitySelector(); + } + + /** + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @param identitySelector the identitySelector value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withIdentitySelector(IdentitySelector identitySelector) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withIdentitySelector(identitySelector); + return this; + } + /** * Get the matchConfigurations property: List of match configurations. * @@ -287,44 +294,123 @@ public List dynamicMatchConfigurations() { } /** - * Get the annotation property: Switch configuration description. + * Get the networkTapId property: The ARM resource Id of the NetworkTap. * - * @return the annotation value. + * @return the networkTapId value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public String networkTapId() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapId(); } /** - * Set the annotation property: Switch configuration description. + * Get the networkTapIds property: The ARM resource Id of the NetworkTap Rules. * - * @param annotation the annotation value to set. + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapIds(); + } + + /** + * Get the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @return the pollingIntervalInSeconds value. + */ + public Integer pollingIntervalInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().pollingIntervalInSeconds(); + } + + /** + * Set the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. * @return the NetworkTapRuleInner object itself. */ - public NetworkTapRuleInner withAnnotation(String annotation) { + public NetworkTapRuleInner withPollingIntervalInSeconds(Integer pollingIntervalInSeconds) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapRuleProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withPollingIntervalInSeconds(pollingIntervalInSeconds); return this; } /** - * Validates the instance. + * Get the lastSyncedTime property: The last sync timestamp. + * + * @return the lastSyncedTime value. + */ + public OffsetDateTime lastSyncedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); + } + + /** + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @return the globalNetworkTapRuleActions value. + */ + public GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions() { + return this.innerProperties() == null ? null : this.innerProperties().globalNetworkTapRuleActions(); + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRuleInner object itself. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkTapRuleInner")); - } else { - innerProperties().validate(); + public NetworkTapRuleInner + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); } + this.innerProperties().withGlobalNetworkTapRuleActions(globalNetworkTapRuleActions); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricIds(); } - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapRuleInner.class); + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} @@ -335,6 +421,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -367,6 +454,8 @@ public static NetworkTapRuleInner fromJson(JsonReader jsonReader) throws IOExcep deserializedNetworkTapRuleInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkTapRuleInner.innerProperties = NetworkTapRuleProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkTapRuleInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkTapRuleInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java index 7bd91d78ea4c..104146e4fd94 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; import java.io.IOException; import java.util.List; @@ -19,7 +21,12 @@ * Network Tap Rule Patch properties. */ @Fluent -public final class NetworkTapRulePatchProperties extends AnnotationResource { +public final class NetworkTapRulePatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Input method to configure Network Tap Rule. */ @@ -33,12 +40,23 @@ public final class NetworkTapRulePatchProperties extends AnnotationResource { /* * List of match configurations. */ - private List matchConfigurations; + private List matchConfigurations; /* * List of dynamic match configurations. */ - private List dynamicMatchConfigurations; + private List dynamicMatchConfigurations; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelectorPatch identitySelector; + + /* + * Global network tap rule actions + */ + private GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions; /** * Creates an instance of NetworkTapRulePatchProperties class. @@ -46,6 +64,26 @@ public final class NetworkTapRulePatchProperties extends AnnotationResource { public NetworkTapRulePatchProperties() { } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the configurationType property: Input method to configure Network Tap Rule. * @@ -91,7 +129,7 @@ public NetworkTapRulePatchProperties withTapRulesUrl(String tapRulesUrl) { * * @return the matchConfigurations value. */ - public List matchConfigurations() { + public List matchConfigurations() { return this.matchConfigurations; } @@ -102,7 +140,7 @@ public List matchConfigurations() { * @return the NetworkTapRulePatchProperties object itself. */ public NetworkTapRulePatchProperties - withMatchConfigurations(List matchConfigurations) { + withMatchConfigurations(List matchConfigurations) { this.matchConfigurations = matchConfigurations; return this; } @@ -112,7 +150,7 @@ public List matchConfigurations() { * * @return the dynamicMatchConfigurations value. */ - public List dynamicMatchConfigurations() { + public List dynamicMatchConfigurations() { return this.dynamicMatchConfigurations; } @@ -123,33 +161,52 @@ public List dynamicMatchConfigurations() { * @return the NetworkTapRulePatchProperties object itself. */ public NetworkTapRulePatchProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + withDynamicMatchConfigurations(List dynamicMatchConfigurations) { this.dynamicMatchConfigurations = dynamicMatchConfigurations; return this; } /** - * {@inheritDoc} + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. */ - @Override - public NetworkTapRulePatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public IdentitySelectorPatch identitySelector() { + return this.identitySelector; + } + + /** + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @param identitySelector the identitySelector value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withIdentitySelector(IdentitySelectorPatch identitySelector) { + this.identitySelector = identitySelector; return this; } /** - * Validates the instance. + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the globalNetworkTapRuleActions value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions() { + return this.globalNetworkTapRuleActions; + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions) { + this.globalNetworkTapRuleActions = globalNetworkTapRuleActions; + return this; } /** @@ -158,7 +215,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); @@ -166,6 +223,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("identitySelector", this.identitySelector); + jsonWriter.writeJsonField("globalNetworkTapRuleActions", this.globalNetworkTapRuleActions); return jsonWriter.writeEndObject(); } @@ -186,20 +245,25 @@ public static NetworkTapRulePatchProperties fromJson(JsonReader jsonReader) thro reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkTapRulePatchProperties.withAnnotation(reader.getString()); + deserializedNetworkTapRulePatchProperties.annotation = reader.getString(); } else if ("configurationType".equals(fieldName)) { deserializedNetworkTapRulePatchProperties.configurationType = ConfigurationType.fromString(reader.getString()); } else if ("tapRulesUrl".equals(fieldName)) { deserializedNetworkTapRulePatchProperties.tapRulesUrl = reader.getString(); } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); + List matchConfigurations + = reader.readArray(reader1 -> NetworkTapRuleMatchConfigurationPatch.fromJson(reader1)); deserializedNetworkTapRulePatchProperties.matchConfigurations = matchConfigurations; } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfigurationPatch.fromJson(reader1)); deserializedNetworkTapRulePatchProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; + } else if ("identitySelector".equals(fieldName)) { + deserializedNetworkTapRulePatchProperties.identitySelector = IdentitySelectorPatch.fromJson(reader); + } else if ("globalNetworkTapRuleActions".equals(fieldName)) { + deserializedNetworkTapRulePatchProperties.globalNetworkTapRuleActions + = GlobalNetworkTapRuleActionPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java index f67ce21ebe5a..42667b806c7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java @@ -1,21 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -25,126 +27,112 @@ * Network Tap Rule Properties defines the resource properties. */ @Fluent -public final class NetworkTapRuleProperties extends AnnotationResource { +public final class NetworkTapRuleProperties implements JsonSerializable { /* - * The ARM resource Id of the NetworkTap. + * Switch configuration description. */ - private String networkTapId; + private String annotation; /* - * Polling interval in seconds. + * Input method to configure Network Tap Rule. */ - private PollingIntervalInSeconds pollingIntervalInSeconds; + private ConfigurationType configurationType; /* - * The last sync timestamp. + * Network Tap Rules file URL. */ - private OffsetDateTime lastSyncedTime; + private String tapRulesUrl; /* - * Configuration state of the resource. + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. */ - private ConfigurationState configurationState; + private IdentitySelector identitySelector; /* - * Provisioning state of the resource. + * List of match configurations. */ - private ProvisioningState provisioningState; + private List matchConfigurations; /* - * Administrative state of the resource. + * List of dynamic match configurations. */ - private AdministrativeState administrativeState; + private List dynamicMatchConfigurations; /* - * Input method to configure Network Tap Rule. + * The ARM resource Id of the NetworkTap. */ - private ConfigurationType configurationType; + private String networkTapId; /* - * Network Tap Rules file URL. + * The ARM resource Id of the NetworkTap Rules. */ - private String tapRulesUrl; + private List networkTapIds; /* - * List of match configurations. + * Polling interval in seconds. */ - private List matchConfigurations; + private Integer pollingIntervalInSeconds; /* - * List of dynamic match configurations. + * The last sync timestamp. */ - private List dynamicMatchConfigurations; + private OffsetDateTime lastSyncedTime; - /** - * Creates an instance of NetworkTapRuleProperties class. + /* + * Global network tap rule actions */ - public NetworkTapRuleProperties() { - } + private GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions; - /** - * Get the networkTapId property: The ARM resource Id of the NetworkTap. - * - * @return the networkTapId value. + /* + * Details of the last operation performed on the resource */ - public String networkTapId() { - return this.networkTapId; - } + private LastOperationProperties lastOperation; - /** - * Get the pollingIntervalInSeconds property: Polling interval in seconds. - * - * @return the pollingIntervalInSeconds value. + /* + * Associated Network Fabric Resource IDs */ - public PollingIntervalInSeconds pollingIntervalInSeconds() { - return this.pollingIntervalInSeconds; - } + private List networkFabricIds; - /** - * Set the pollingIntervalInSeconds property: Polling interval in seconds. - * - * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. - * @return the NetworkTapRuleProperties object itself. + /* + * Configuration state of the resource. */ - public NetworkTapRuleProperties withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { - this.pollingIntervalInSeconds = pollingIntervalInSeconds; - return this; - } + private ConfigurationState configurationState; - /** - * Get the lastSyncedTime property: The last sync timestamp. - * - * @return the lastSyncedTime value. + /* + * Provisioning state of the resource. */ - public OffsetDateTime lastSyncedTime() { - return this.lastSyncedTime; - } + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of NetworkTapRuleProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public NetworkTapRuleProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the NetworkTapRuleProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public NetworkTapRuleProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -187,6 +175,28 @@ public NetworkTapRuleProperties withTapRulesUrl(String tapRulesUrl) { return this; } + /** + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. + */ + public IdentitySelector identitySelector() { + return this.identitySelector; + } + + /** + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @param identitySelector the identitySelector value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withIdentitySelector(IdentitySelector identitySelector) { + this.identitySelector = identitySelector; + return this; + } + /** * Get the matchConfigurations property: List of match configurations. * @@ -230,27 +240,116 @@ public List dynamicMatchConfigurations() { } /** - * {@inheritDoc} + * Get the networkTapId property: The ARM resource Id of the NetworkTap. + * + * @return the networkTapId value. */ - @Override - public NetworkTapRuleProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public String networkTapId() { + return this.networkTapId; + } + + /** + * Get the networkTapIds property: The ARM resource Id of the NetworkTap Rules. + * + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.networkTapIds; + } + + /** + * Get the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @return the pollingIntervalInSeconds value. + */ + public Integer pollingIntervalInSeconds() { + return this.pollingIntervalInSeconds; + } + + /** + * Set the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withPollingIntervalInSeconds(Integer pollingIntervalInSeconds) { + this.pollingIntervalInSeconds = pollingIntervalInSeconds; return this; } /** - * Validates the instance. + * Get the lastSyncedTime property: The last sync timestamp. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the lastSyncedTime value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; + } + + /** + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @return the globalNetworkTapRuleActions value. + */ + public GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions() { + return this.globalNetworkTapRuleActions; + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions) { + this.globalNetworkTapRuleActions = globalNetworkTapRuleActions; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + public List networkFabricIds() { + return this.networkFabricIds; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -259,16 +358,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeNumberField("pollingIntervalInSeconds", - this.pollingIntervalInSeconds == null ? null : this.pollingIntervalInSeconds.getValue()); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); + jsonWriter.writeJsonField("identitySelector", this.identitySelector); jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("pollingIntervalInSeconds", this.pollingIntervalInSeconds); + jsonWriter.writeJsonField("globalNetworkTapRuleActions", this.globalNetworkTapRuleActions); return jsonWriter.writeEndObject(); } @@ -278,6 +378,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkTapRuleProperties if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkTapRuleProperties. */ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IOException { @@ -287,16 +388,42 @@ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkTapRuleProperties.withAnnotation(reader.getString()); + if ("configurationType".equals(fieldName)) { + deserializedNetworkTapRuleProperties.configurationType + = ConfigurationType.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkTapRuleProperties.annotation = reader.getString(); + } else if ("tapRulesUrl".equals(fieldName)) { + deserializedNetworkTapRuleProperties.tapRulesUrl = reader.getString(); + } else if ("identitySelector".equals(fieldName)) { + deserializedNetworkTapRuleProperties.identitySelector = IdentitySelector.fromJson(reader); + } else if ("matchConfigurations".equals(fieldName)) { + List matchConfigurations + = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); + deserializedNetworkTapRuleProperties.matchConfigurations = matchConfigurations; + } else if ("dynamicMatchConfigurations".equals(fieldName)) { + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); + deserializedNetworkTapRuleProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; } else if ("networkTapId".equals(fieldName)) { deserializedNetworkTapRuleProperties.networkTapId = reader.getString(); + } else if ("networkTapIds".equals(fieldName)) { + List networkTapIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkTapRuleProperties.networkTapIds = networkTapIds; } else if ("pollingIntervalInSeconds".equals(fieldName)) { deserializedNetworkTapRuleProperties.pollingIntervalInSeconds - = PollingIntervalInSeconds.fromValue(reader.getInt()); + = reader.getNullable(JsonReader::getInt); } else if ("lastSyncedTime".equals(fieldName)) { deserializedNetworkTapRuleProperties.lastSyncedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("globalNetworkTapRuleActions".equals(fieldName)) { + deserializedNetworkTapRuleProperties.globalNetworkTapRuleActions + = GlobalNetworkTapRuleActionProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkTapRuleProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("networkFabricIds".equals(fieldName)) { + List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkTapRuleProperties.networkFabricIds = networkFabricIds; } else if ("configurationState".equals(fieldName)) { deserializedNetworkTapRuleProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -306,19 +433,6 @@ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IO } else if ("administrativeState".equals(fieldName)) { deserializedNetworkTapRuleProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("configurationType".equals(fieldName)) { - deserializedNetworkTapRuleProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("tapRulesUrl".equals(fieldName)) { - deserializedNetworkTapRuleProperties.tapRulesUrl = reader.getString(); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRuleProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRuleProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleResyncResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleResyncResponseInner.java new file mode 100644 index 000000000000..a19f1b64204f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleResyncResponseInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Response for Network Tap Rule resync operation. + */ +@Immutable +public final class NetworkTapRuleResyncResponseInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of NetworkTapRuleResyncResponseInner class. + */ + private NetworkTapRuleResyncResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleResyncResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleResyncResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkTapRuleResyncResponseInner. + */ + public static NetworkTapRuleResyncResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleResyncResponseInner deserializedNetworkTapRuleResyncResponseInner + = new NetworkTapRuleResyncResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNetworkTapRuleResyncResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNetworkTapRuleResyncResponseInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleResyncResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java index 631740c5d309..76a52418545a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java @@ -1,26 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -30,7 +33,7 @@ @Fluent public final class NetworkToNetworkInterconnectInner extends ProxyResource { /* - * Resource properties. + * The NetworkToNetworkInterconnect Properties */ private NetworkToNetworkInterconnectProperties innerProperties = new NetworkToNetworkInterconnectProperties(); @@ -61,7 +64,7 @@ public NetworkToNetworkInterconnectInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The NetworkToNetworkInterconnect Properties. * * @return the innerProperties value. */ @@ -205,7 +208,7 @@ public NetworkToNetworkInterconnectInner withLayer2Configuration(Layer2Configura * * @return the optionBLayer3Configuration value. */ - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3Configuration optionBLayer3Configuration() { return this.innerProperties() == null ? null : this.innerProperties().optionBLayer3Configuration(); } @@ -215,8 +218,8 @@ public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBL * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. * @return the NetworkToNetworkInterconnectInner object itself. */ - public NetworkToNetworkInterconnectInner withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectInner + withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { if (this.innerProperties() == null) { this.innerProperties = new NetworkToNetworkInterconnectProperties(); } @@ -249,7 +252,31 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { } /** - * Get the importRoutePolicy property: Import Route Policy configuration. + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRouteConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner + withStaticRouteConfiguration(NniStaticRouteConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ @@ -258,7 +285,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { } /** - * Set the importRoutePolicy property: Import Route Policy configuration. + * Set the importRoutePolicy property: Import Route Policy information. * * @param importRoutePolicy the importRoutePolicy value to set. * @return the NetworkToNetworkInterconnectInner object itself. @@ -272,7 +299,7 @@ public NetworkToNetworkInterconnectInner withImportRoutePolicy(ImportRoutePolicy } /** - * Get the exportRoutePolicy property: Export Route Policy configuration. + * Get the exportRoutePolicy property: Export Route Policy information. * * @return the exportRoutePolicy value. */ @@ -281,7 +308,7 @@ public ExportRoutePolicyInformation exportRoutePolicy() { } /** - * Set the exportRoutePolicy property: Export Route Policy configuration. + * Set the exportRoutePolicy property: Export Route Policy information. * * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the NetworkToNetworkInterconnectInner object itself. @@ -340,6 +367,62 @@ public NetworkToNetworkInterconnectInner withIngressAclId(String ingressAclId) { return this; } + /** + * Get the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @return the microBfdState value. + */ + public MicroBfdState microBfdState() { + return this.innerProperties() == null ? null : this.innerProperties().microBfdState(); + } + + /** + * Set the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withMicroBfdState(MicroBfdState microBfdState) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withMicroBfdState(microBfdState); + return this; + } + + /** + * Get the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @return the conditionalDefaultRouteConfiguration value. + */ + public ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().conditionalDefaultRouteConfiguration(); + } + + /** + * Set the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @param conditionalDefaultRouteConfiguration the conditionalDefaultRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withConditionalDefaultRouteConfiguration( + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withConditionalDefaultRouteConfiguration(conditionalDefaultRouteConfiguration); + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -367,23 +450,6 @@ public AdministrativeState administrativeState() { return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkToNetworkInterconnectInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchProperties.java similarity index 53% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchProperties.java index 3d9bd68c0328..ebdaa746d4e1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -9,43 +9,50 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; import java.io.IOException; /** - * Network to Network Interconnect patchable properties. + * Network Tap Rule Patch properties. */ @Fluent -public final class NetworkToNetworkInterconnectPatchableProperties - implements JsonSerializable { +public final class NetworkToNetworkInterconnectPatchProperties + implements JsonSerializable { /* * Common properties for Layer2Configuration. */ - private Layer2Configuration layer2Configuration; + private Layer2ConfigurationPatch layer2Configuration; /* * Common properties for Layer3Configuration. */ - private OptionBLayer3Configuration optionBLayer3Configuration; + private OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration; /* * NPB Static Route Configuration properties. */ - private NpbStaticRouteConfiguration npbStaticRouteConfiguration; + private NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration; + + /* + * Static Route Configuration. + */ + private NniStaticRoutePatchConfiguration staticRouteConfiguration; /* * Import Route Policy information. */ - private ImportRoutePolicyInformation importRoutePolicy; + private ImportRoutePolicyInformationPatch importRoutePolicy; /* * Export Route Policy information */ - private ExportRoutePolicyInformation exportRoutePolicy; + private ExportRoutePolicyInformationPatch exportRoutePolicy; /* * Egress Acl. ARM resource ID of Access Control Lists. @@ -57,10 +64,15 @@ public final class NetworkToNetworkInterconnectPatchableProperties */ private String ingressAclId; + /* + * Micro BFD enabled/disabled state. + */ + private MicroBfdState microBfdState; + /** - * Creates an instance of NetworkToNetworkInterconnectPatchableProperties class. + * Creates an instance of NetworkToNetworkInterconnectPatchProperties class. */ - public NetworkToNetworkInterconnectPatchableProperties() { + public NetworkToNetworkInterconnectPatchProperties() { } /** @@ -68,7 +80,7 @@ public NetworkToNetworkInterconnectPatchableProperties() { * * @return the layer2Configuration value. */ - public Layer2Configuration layer2Configuration() { + public Layer2ConfigurationPatch layer2Configuration() { return this.layer2Configuration; } @@ -76,10 +88,10 @@ public Layer2Configuration layer2Configuration() { * Set the layer2Configuration property: Common properties for Layer2Configuration. * * @param layer2Configuration the layer2Configuration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withLayer2Configuration(Layer2Configuration layer2Configuration) { + public NetworkToNetworkInterconnectPatchProperties + withLayer2Configuration(Layer2ConfigurationPatch layer2Configuration) { this.layer2Configuration = layer2Configuration; return this; } @@ -89,7 +101,7 @@ public Layer2Configuration layer2Configuration() { * * @return the optionBLayer3Configuration value. */ - public OptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration() { return this.optionBLayer3Configuration; } @@ -97,10 +109,10 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. * * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectPatchProperties + withOptionBLayer3Configuration(OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration) { this.optionBLayer3Configuration = optionBLayer3Configuration; return this; } @@ -110,7 +122,7 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * * @return the npbStaticRouteConfiguration value. */ - public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + public NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration() { return this.npbStaticRouteConfiguration; } @@ -118,20 +130,41 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. * * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + public NetworkToNetworkInterconnectPatchProperties + withNpbStaticRouteConfiguration(NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration) { this.npbStaticRouteConfiguration = npbStaticRouteConfiguration; return this; } + /** + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. + */ + public NetworkToNetworkInterconnectPatchProperties + withStaticRouteConfiguration(NniStaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + /** * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ - public ImportRoutePolicyInformation importRoutePolicy() { + public ImportRoutePolicyInformationPatch importRoutePolicy() { return this.importRoutePolicy; } @@ -139,10 +172,10 @@ public ImportRoutePolicyInformation importRoutePolicy() { * Set the importRoutePolicy property: Import Route Policy information. * * @param importRoutePolicy the importRoutePolicy value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { + public NetworkToNetworkInterconnectPatchProperties + withImportRoutePolicy(ImportRoutePolicyInformationPatch importRoutePolicy) { this.importRoutePolicy = importRoutePolicy; return this; } @@ -152,7 +185,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { * * @return the exportRoutePolicy value. */ - public ExportRoutePolicyInformation exportRoutePolicy() { + public ExportRoutePolicyInformationPatch exportRoutePolicy() { return this.exportRoutePolicy; } @@ -160,10 +193,10 @@ public ExportRoutePolicyInformation exportRoutePolicy() { * Set the exportRoutePolicy property: Export Route Policy information. * * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + public NetworkToNetworkInterconnectPatchProperties + withExportRoutePolicy(ExportRoutePolicyInformationPatch exportRoutePolicy) { this.exportRoutePolicy = exportRoutePolicy; return this; } @@ -181,9 +214,9 @@ public String egressAclId() { * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. * * @param egressAclId the egressAclId value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties withEgressAclId(String egressAclId) { + public NetworkToNetworkInterconnectPatchProperties withEgressAclId(String egressAclId) { this.egressAclId = egressAclId; return this; } @@ -201,34 +234,31 @@ public String ingressAclId() { * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. * * @param ingressAclId the ingressAclId value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties withIngressAclId(String ingressAclId) { + public NetworkToNetworkInterconnectPatchProperties withIngressAclId(String ingressAclId) { this.ingressAclId = ingressAclId; return this; } /** - * Validates the instance. + * Get the microBfdState property: Micro BFD enabled/disabled state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the microBfdState value. */ - public void validate() { - if (layer2Configuration() != null) { - layer2Configuration().validate(); - } - if (optionBLayer3Configuration() != null) { - optionBLayer3Configuration().validate(); - } - if (npbStaticRouteConfiguration() != null) { - npbStaticRouteConfiguration().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public MicroBfdState microBfdState() { + return this.microBfdState; + } + + /** + * Set the microBfdState property: Micro BFD enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. + */ + public NetworkToNetworkInterconnectPatchProperties withMicroBfdState(MicroBfdState microBfdState) { + this.microBfdState = microBfdState; + return this; } /** @@ -240,54 +270,62 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("layer2Configuration", this.layer2Configuration); jsonWriter.writeJsonField("optionBLayer3Configuration", this.optionBLayer3Configuration); jsonWriter.writeJsonField("npbStaticRouteConfiguration", this.npbStaticRouteConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeStringField("microBfdState", this.microBfdState == null ? null : this.microBfdState.toString()); return jsonWriter.writeEndObject(); } /** - * Reads an instance of NetworkToNetworkInterconnectPatchableProperties from the JsonReader. + * Reads an instance of NetworkToNetworkInterconnectPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NetworkToNetworkInterconnectPatchableProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatchableProperties. + * @return An instance of NetworkToNetworkInterconnectPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatchProperties. */ - public static NetworkToNetworkInterconnectPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static NetworkToNetworkInterconnectPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NetworkToNetworkInterconnectPatchableProperties deserializedNetworkToNetworkInterconnectPatchableProperties - = new NetworkToNetworkInterconnectPatchableProperties(); + NetworkToNetworkInterconnectPatchProperties deserializedNetworkToNetworkInterconnectPatchProperties + = new NetworkToNetworkInterconnectPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("layer2Configuration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.layer2Configuration - = Layer2Configuration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.layer2Configuration + = Layer2ConfigurationPatch.fromJson(reader); } else if ("optionBLayer3Configuration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.optionBLayer3Configuration - = OptionBLayer3Configuration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.optionBLayer3Configuration + = OptionBLayer3ConfigurationPatchProperties.fromJson(reader); } else if ("npbStaticRouteConfiguration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.npbStaticRouteConfiguration - = NpbStaticRouteConfiguration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.npbStaticRouteConfiguration + = NpbStaticRouteConfigurationPatch.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatchProperties.staticRouteConfiguration + = NniStaticRoutePatchConfiguration.fromJson(reader); } else if ("importRoutePolicy".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.importRoutePolicy - = ImportRoutePolicyInformation.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.importRoutePolicy + = ImportRoutePolicyInformationPatch.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.exportRoutePolicy - = ExportRoutePolicyInformation.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.exportRoutePolicy + = ExportRoutePolicyInformationPatch.fromJson(reader); } else if ("egressAclId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.egressAclId = reader.getString(); + deserializedNetworkToNetworkInterconnectPatchProperties.egressAclId = reader.getString(); } else if ("ingressAclId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.ingressAclId = reader.getString(); + deserializedNetworkToNetworkInterconnectPatchProperties.ingressAclId = reader.getString(); + } else if ("microBfdState".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatchProperties.microBfdState + = MicroBfdState.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedNetworkToNetworkInterconnectPatchableProperties; + return deserializedNetworkToNetworkInterconnectPatchProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java index d8815f869508..051738c0917f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java @@ -1,25 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; @@ -52,7 +55,7 @@ public final class NetworkToNetworkInterconnectProperties /* * Common properties for Layer3Configuration. */ - private NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration; + private OptionBLayer3Configuration optionBLayer3Configuration; /* * NPB Static Route Configuration properties. @@ -60,12 +63,17 @@ public final class NetworkToNetworkInterconnectProperties private NpbStaticRouteConfiguration npbStaticRouteConfiguration; /* - * Import Route Policy configuration. + * Static Route Configuration. + */ + private NniStaticRouteConfiguration staticRouteConfiguration; + + /* + * Import Route Policy information. */ private ImportRoutePolicyInformation importRoutePolicy; /* - * Export Route Policy configuration. + * Export Route Policy information */ private ExportRoutePolicyInformation exportRoutePolicy; @@ -79,6 +87,21 @@ public final class NetworkToNetworkInterconnectProperties */ private String ingressAclId; + /* + * Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + */ + private MicroBfdState microBfdState; + + /* + * Conditional Default Route Configuration properties. + */ + private ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -185,7 +208,7 @@ public NetworkToNetworkInterconnectProperties withLayer2Configuration(Layer2Conf * * @return the optionBLayer3Configuration value. */ - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3Configuration optionBLayer3Configuration() { return this.optionBLayer3Configuration; } @@ -195,8 +218,8 @@ public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBL * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. * @return the NetworkToNetworkInterconnectProperties object itself. */ - public NetworkToNetworkInterconnectProperties withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectProperties + withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { this.optionBLayer3Configuration = optionBLayer3Configuration; return this; } @@ -223,7 +246,28 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { } /** - * Get the importRoutePolicy property: Import Route Policy configuration. + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties + withStaticRouteConfiguration(NniStaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ @@ -232,7 +276,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { } /** - * Set the importRoutePolicy property: Import Route Policy configuration. + * Set the importRoutePolicy property: Import Route Policy information. * * @param importRoutePolicy the importRoutePolicy value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -244,7 +288,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { } /** - * Get the exportRoutePolicy property: Export Route Policy configuration. + * Get the exportRoutePolicy property: Export Route Policy information. * * @return the exportRoutePolicy value. */ @@ -253,7 +297,7 @@ public ExportRoutePolicyInformation exportRoutePolicy() { } /** - * Set the exportRoutePolicy property: Export Route Policy configuration. + * Set the exportRoutePolicy property: Export Route Policy information. * * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -304,6 +348,56 @@ public NetworkToNetworkInterconnectProperties withIngressAclId(String ingressAcl return this; } + /** + * Get the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @return the microBfdState value. + */ + public MicroBfdState microBfdState() { + return this.microBfdState; + } + + /** + * Set the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withMicroBfdState(MicroBfdState microBfdState) { + this.microBfdState = microBfdState; + return this; + } + + /** + * Get the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @return the conditionalDefaultRouteConfiguration value. + */ + public ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration() { + return this.conditionalDefaultRouteConfiguration; + } + + /** + * Set the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @param conditionalDefaultRouteConfiguration the conditionalDefaultRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withConditionalDefaultRouteConfiguration( + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration) { + this.conditionalDefaultRouteConfiguration = conditionalDefaultRouteConfiguration; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -331,36 +425,6 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (useOptionB() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property useOptionB in model NetworkToNetworkInterconnectProperties")); - } - if (layer2Configuration() != null) { - layer2Configuration().validate(); - } - if (optionBLayer3Configuration() != null) { - optionBLayer3Configuration().validate(); - } - if (npbStaticRouteConfiguration() != null) { - npbStaticRouteConfiguration().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectProperties.class); - /** * {@inheritDoc} */ @@ -374,10 +438,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("layer2Configuration", this.layer2Configuration); jsonWriter.writeJsonField("optionBLayer3Configuration", this.optionBLayer3Configuration); jsonWriter.writeJsonField("npbStaticRouteConfiguration", this.npbStaticRouteConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeStringField("microBfdState", this.microBfdState == null ? null : this.microBfdState.toString()); + jsonWriter.writeJsonField("conditionalDefaultRouteConfiguration", this.conditionalDefaultRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -411,10 +478,13 @@ public static NetworkToNetworkInterconnectProperties fromJson(JsonReader jsonRea = Layer2Configuration.fromJson(reader); } else if ("optionBLayer3Configuration".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.optionBLayer3Configuration - = NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.fromJson(reader); + = OptionBLayer3Configuration.fromJson(reader); } else if ("npbStaticRouteConfiguration".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.npbStaticRouteConfiguration = NpbStaticRouteConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.staticRouteConfiguration + = NniStaticRouteConfiguration.fromJson(reader); } else if ("importRoutePolicy".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.importRoutePolicy = ImportRoutePolicyInformation.fromJson(reader); @@ -425,6 +495,15 @@ public static NetworkToNetworkInterconnectProperties fromJson(JsonReader jsonRea deserializedNetworkToNetworkInterconnectProperties.egressAclId = reader.getString(); } else if ("ingressAclId".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.ingressAclId = reader.getString(); + } else if ("microBfdState".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.microBfdState + = MicroBfdState.fromString(reader.getString()); + } else if ("conditionalDefaultRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.conditionalDefaultRouteConfiguration + = ConditionalDefaultRouteProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.lastOperation + = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.configurationState = ConfigurationState.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniUpdateBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniUpdateBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..2e0ae000ed63 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniUpdateBfdAdministrativeStateResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * NNI Bidirectional Forwarding Detection (BFD) Administrative State response. + */ +@Immutable +public final class NniUpdateBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Properties of the NNI BFD Administrative State response. + */ + private NniUpdateBfdAdministrativeStateResponseProperties properties; + + /** + * Creates an instance of NniUpdateBfdAdministrativeStateResponseInner class. + */ + private NniUpdateBfdAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Properties of the NNI BFD Administrative State response. + * + * @return the properties value. + */ + public NniUpdateBfdAdministrativeStateResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniUpdateBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniUpdateBfdAdministrativeStateResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NniUpdateBfdAdministrativeStateResponseInner. + */ + public static NniUpdateBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniUpdateBfdAdministrativeStateResponseInner deserializedNniUpdateBfdAdministrativeStateResponseInner + = new NniUpdateBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedNniUpdateBfdAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseInner.properties + = NniUpdateBfdAdministrativeStateResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNniUpdateBfdAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java index 8cad07f50ef3..ed3939cb7e2b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -84,17 +84,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -106,8 +95,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ @@ -115,17 +104,6 @@ public ActionType actionType() { return this.actionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationStatusResultInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..44b654397843 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Immutable +public final class OperationStatusResultInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + private OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java index 19b949d8f5f5..64fd9d20e464 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,6 +14,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import java.io.IOException; @@ -27,7 +27,7 @@ @Fluent public final class RoutePolicyInner extends Resource { /* - * Resource properties. + * The RoutePolicy properties */ private RoutePolicyProperties innerProperties = new RoutePolicyProperties(); @@ -58,7 +58,7 @@ public RoutePolicyInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: The RoutePolicy properties. * * @return the innerProperties value. */ @@ -124,167 +124,159 @@ public RoutePolicyInner withTags(Map tags) { } /** - * Get the networkFabricId property: Arm Resource ID of Network Fabric. + * Get the annotation property: Switch configuration description. * - * @return the networkFabricId value. + * @return the annotation value. */ - public String networkFabricId() { - return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the networkFabricId property: Arm Resource ID of Network Fabric. + * Set the annotation property: Switch configuration description. * - * @param networkFabricId the networkFabricId value to set. + * @param annotation the annotation value to set. * @return the RoutePolicyInner object itself. */ - public RoutePolicyInner withNetworkFabricId(String networkFabricId) { + public RoutePolicyInner withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyProperties(); } - this.innerProperties().withNetworkFabricId(networkFabricId); + this.innerProperties().withAnnotation(annotation); return this; } /** - * Get the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 - * route policy. + * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. * - * @return the addressFamilyType value. + * @return the defaultAction value. */ - public AddressFamilyType addressFamilyType() { - return this.innerProperties() == null ? null : this.innerProperties().addressFamilyType(); + public CommunityActionTypes defaultAction() { + return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); } /** - * Set the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 - * route policy. + * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. * - * @param addressFamilyType the addressFamilyType value to set. + * @param defaultAction the defaultAction value to set. * @return the RoutePolicyInner object itself. */ - public RoutePolicyInner withAddressFamilyType(AddressFamilyType addressFamilyType) { + public RoutePolicyInner withDefaultAction(CommunityActionTypes defaultAction) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyProperties(); } - this.innerProperties().withAddressFamilyType(addressFamilyType); + this.innerProperties().withDefaultAction(defaultAction); return this; } /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.innerProperties() == null ? null : this.innerProperties().configurationState(); - } - - /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the statements property: Route Policy statements. * - * @return the provisioningState value. + * @return the statements value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public List statements() { + return this.innerProperties() == null ? null : this.innerProperties().statements(); } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the statements property: Route Policy statements. * - * @return the administrativeState value. + * @param statements the statements value to set. + * @return the RoutePolicyInner object itself. */ - public AdministrativeState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public RoutePolicyInner withStatements(List statements) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutePolicyProperties(); + } + this.innerProperties().withStatements(statements); + return this; } /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. + * Get the networkFabricId property: Arm Resource ID of Network Fabric. * - * @return the defaultAction value. + * @return the networkFabricId value. */ - public CommunityActionTypes defaultAction() { - return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. + * Set the networkFabricId property: Arm Resource ID of Network Fabric. * - * @param defaultAction the defaultAction value to set. + * @param networkFabricId the networkFabricId value to set. * @return the RoutePolicyInner object itself. */ - public RoutePolicyInner withDefaultAction(CommunityActionTypes defaultAction) { + public RoutePolicyInner withNetworkFabricId(String networkFabricId) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyProperties(); } - this.innerProperties().withDefaultAction(defaultAction); + this.innerProperties().withNetworkFabricId(networkFabricId); return this; } /** - * Get the statements property: Route Policy statements. + * Get the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. * - * @return the statements value. + * @return the addressFamilyType value. */ - public List statements() { - return this.innerProperties() == null ? null : this.innerProperties().statements(); + public AddressFamilyType addressFamilyType() { + return this.innerProperties() == null ? null : this.innerProperties().addressFamilyType(); } /** - * Set the statements property: Route Policy statements. + * Set the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. * - * @param statements the statements value to set. + * @param addressFamilyType the addressFamilyType value to set. * @return the RoutePolicyInner object itself. */ - public RoutePolicyInner withStatements(List statements) { + public RoutePolicyInner withAddressFamilyType(AddressFamilyType addressFamilyType) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyProperties(); } - this.innerProperties().withStatements(statements); + this.innerProperties().withAddressFamilyType(addressFamilyType); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the annotation value. + * @return the lastOperation value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public LastOperationProperties lastOperation() { + return this.innerProperties() == null ? null : this.innerProperties().lastOperation(); } /** - * Set the annotation property: Switch configuration description. + * Get the configurationState property: Configuration state of the resource. * - * @param annotation the annotation value to set. - * @return the RoutePolicyInner object itself. + * @return the configurationState value. */ - public RoutePolicyInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model RoutePolicyInner")); - } else { - innerProperties().validate(); - } + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyInner.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } /** * {@inheritDoc} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java index b7146d7cd523..1d10c9d0f026 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; @@ -10,7 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; import java.io.IOException; import java.util.List; @@ -18,7 +18,7 @@ * Route Policy patchable properties. */ @Fluent -public class RoutePolicyPatchableProperties implements JsonSerializable { +public final class RoutePolicyPatchableProperties implements JsonSerializable { /* * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. */ @@ -27,7 +27,7 @@ public class RoutePolicyPatchableProperties implements JsonSerializable statements; + private List statements; /** * Creates an instance of RoutePolicyPatchableProperties class. @@ -62,7 +62,7 @@ public RoutePolicyPatchableProperties withDefaultAction(CommunityActionTypes def * * @return the statements value. */ - public List statements() { + public List statements() { return this.statements; } @@ -72,22 +72,11 @@ public List statements() { * @param statements the statements value to set. * @return the RoutePolicyPatchableProperties object itself. */ - public RoutePolicyPatchableProperties withStatements(List statements) { + public RoutePolicyPatchableProperties withStatements(List statements) { this.statements = statements; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (statements() != null) { - statements().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -119,8 +108,8 @@ public static RoutePolicyPatchableProperties fromJson(JsonReader jsonReader) thr deserializedRoutePolicyPatchableProperties.defaultAction = CommunityActionTypes.fromString(reader.getString()); } else if ("statements".equals(fieldName)) { - List statements - = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); + List statements + = reader.readArray(reader1 -> RoutePolicyStatementPatchProperties.fromJson(reader1)); deserializedRoutePolicyPatchableProperties.statements = statements; } else { reader.skipChildren(); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java index b85e0b372b2d..e42d338cb67b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import java.io.IOException; @@ -23,7 +23,22 @@ * RoutePolicyProperties defines the resource properties. */ @Fluent -public final class RoutePolicyProperties extends AnnotationResource { +public final class RoutePolicyProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + */ + private CommunityActionTypes defaultAction; + + /* + * Route Policy statements. + */ + private List statements; + /* * Arm Resource ID of Network Fabric. */ @@ -34,6 +49,11 @@ public final class RoutePolicyProperties extends AnnotationResource { */ private AddressFamilyType addressFamilyType; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -49,20 +69,72 @@ public final class RoutePolicyProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + /** + * Creates an instance of RoutePolicyProperties class. */ - private CommunityActionTypes defaultAction; + public RoutePolicyProperties() { + } - /* - * Route Policy statements. + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. */ - private List statements; + public String annotation() { + return this.annotation; + } /** - * Creates an instance of RoutePolicyProperties class. + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the RoutePolicyProperties object itself. */ - public RoutePolicyProperties() { + public RoutePolicyProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @return the defaultAction value. + */ + public CommunityActionTypes defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @param defaultAction the defaultAction value to set. + * @return the RoutePolicyProperties object itself. + */ + public RoutePolicyProperties withDefaultAction(CommunityActionTypes defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the statements property: Route Policy statements. + * + * @return the statements value. + */ + public List statements() { + return this.statements; + } + + /** + * Set the statements property: Route Policy statements. + * + * @param statements the statements value to set. + * @return the RoutePolicyProperties object itself. + */ + public RoutePolicyProperties withStatements(List statements) { + this.statements = statements; + return this; } /** @@ -107,6 +179,15 @@ public RoutePolicyProperties withAddressFamilyType(AddressFamilyType addressFami return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -134,88 +215,18 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.defaultAction; - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the RoutePolicyProperties object itself. - */ - public RoutePolicyProperties withDefaultAction(CommunityActionTypes defaultAction) { - this.defaultAction = defaultAction; - return this; - } - - /** - * Get the statements property: Route Policy statements. - * - * @return the statements value. - */ - public List statements() { - return this.statements; - } - - /** - * Set the statements property: Route Policy statements. - * - * @param statements the statements value to set. - * @return the RoutePolicyProperties object itself. - */ - public RoutePolicyProperties withStatements(List statements) { - this.statements = statements; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RoutePolicyProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model RoutePolicyProperties")); - } - if (statements() != null) { - statements().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeArrayField("statements", this.statements, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); jsonWriter.writeStringField("addressFamilyType", this.addressFamilyType == null ? null : this.addressFamilyType.toString()); - jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); - jsonWriter.writeArrayField("statements", this.statements, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -235,13 +246,22 @@ public static RoutePolicyProperties fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedRoutePolicyProperties.withAnnotation(reader.getString()); + if ("statements".equals(fieldName)) { + List statements + = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); + deserializedRoutePolicyProperties.statements = statements; } else if ("networkFabricId".equals(fieldName)) { deserializedRoutePolicyProperties.networkFabricId = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedRoutePolicyProperties.annotation = reader.getString(); + } else if ("defaultAction".equals(fieldName)) { + deserializedRoutePolicyProperties.defaultAction + = CommunityActionTypes.fromString(reader.getString()); } else if ("addressFamilyType".equals(fieldName)) { deserializedRoutePolicyProperties.addressFamilyType = AddressFamilyType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedRoutePolicyProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedRoutePolicyProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -251,13 +271,6 @@ public static RoutePolicyProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("administrativeState".equals(fieldName)) { deserializedRoutePolicyProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("defaultAction".equals(fieldName)) { - deserializedRoutePolicyProperties.defaultAction - = CommunityActionTypes.fromString(reader.getString()); - } else if ("statements".equals(fieldName)) { - List statements - = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); - deserializedRoutePolicyProperties.statements = statements; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/UpdateAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/UpdateAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..68f90a2e981c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/UpdateAdministrativeStateResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Update Administrative State Response. + */ +@Immutable +public final class UpdateAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Response properties in case of successful administrative state update. + */ + private UpdateAdministrativeStateResponseProperties properties; + + /** + * Creates an instance of UpdateAdministrativeStateResponseInner class. + */ + private UpdateAdministrativeStateResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: Response properties in case of successful administrative state update. + * + * @return the properties value. + */ + public UpdateAdministrativeStateResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateAdministrativeStateResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UpdateAdministrativeStateResponseInner. + */ + public static UpdateAdministrativeStateResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateAdministrativeStateResponseInner deserializedUpdateAdministrativeStateResponseInner + = new UpdateAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedUpdateAdministrativeStateResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedUpdateAdministrativeStateResponseInner.properties + = UpdateAdministrativeStateResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java index e69c09c80de1..e6633b3f9808 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java @@ -1,23 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommonErrorResponse; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import java.io.IOException; /** * The response of the action validate configuration. */ -@Fluent -public final class ValidateConfigurationResponseInner implements JsonSerializable { +@Immutable +public final class ValidateConfigurationResponseInner extends CommonErrorResponse { /* * Gets the configuration state. */ @@ -36,7 +36,7 @@ public final class ValidateConfigurationResponseInner implements JsonSerializabl /** * Creates an instance of ValidateConfigurationResponseInner class. */ - public ValidateConfigurationResponseInner() { + private ValidateConfigurationResponseInner() { } /** @@ -57,53 +57,24 @@ public String url() { return this.url; } - /** - * Set the url property: URL for the details of the response. - * - * @param url the url value to set. - * @return the ValidateConfigurationResponseInner object itself. - */ - public ValidateConfigurationResponseInner withUrl(String url) { - this.url = url; - return this; - } - /** * Get the error property: The error object. * * @return the error value. */ + @Override public ManagementError error() { return this.error; } - /** - * Set the error property: The error object. - * - * @param error the error value to set. - * @return the ValidateConfigurationResponseInner object itself. - */ - public ValidateConfigurationResponseInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", error()); jsonWriter.writeStringField("url", this.url); - jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -123,13 +94,13 @@ public static ValidateConfigurationResponseInner fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedValidateConfigurationResponseInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedValidateConfigurationResponseInner.configurationState = ConfigurationState.fromString(reader.getString()); } else if ("url".equals(fieldName)) { deserializedValidateConfigurationResponseInner.url = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedValidateConfigurationResponseInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationOperationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationOperationResponseInner.java new file mode 100644 index 000000000000..f09440e12fbb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationOperationResponseInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * View Device Configuration Response V2. + */ +@Immutable +public final class ViewDeviceConfigurationOperationResponseInner + implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * View Device Configuration Response Properties. + */ + private ViewDeviceConfigurationResponseProperties properties; + + /** + * Creates an instance of ViewDeviceConfigurationOperationResponseInner class. + */ + private ViewDeviceConfigurationOperationResponseInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the properties property: View Device Configuration Response Properties. + * + * @return the properties value. + */ + public ViewDeviceConfigurationResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ViewDeviceConfigurationOperationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ViewDeviceConfigurationOperationResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ViewDeviceConfigurationOperationResponseInner. + */ + public static ViewDeviceConfigurationOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ViewDeviceConfigurationOperationResponseInner deserializedViewDeviceConfigurationOperationResponseInner + = new ViewDeviceConfigurationOperationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.percentComplete + = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedViewDeviceConfigurationOperationResponseInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.resourceId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedViewDeviceConfigurationOperationResponseInner.properties + = ViewDeviceConfigurationResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedViewDeviceConfigurationOperationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java index 4c1e0e23ad75..fba036719d3b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureNetworkFabricManagementServiceApi. + * Package containing the inner data models for ManagedNetworkFabric. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.fluent.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java index 928a465a0fd5..498b95b1976e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureNetworkFabricManagementServiceApi. + * Package containing the service clients for ManagedNetworkFabric. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.fluent; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java index efbae30b0836..acb2651b9e4a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,15 +10,25 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.time.OffsetDateTime; import java.util.Collections; @@ -60,20 +70,8 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public OffsetDateTime lastSyncedTime() { - return this.innerModel().lastSyncedTime(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String annotation() { + return this.innerModel().annotation(); } public ConfigurationType configurationType() { @@ -106,8 +104,54 @@ public List dynamicMatchConfigurations() { } } - public String annotation() { - return this.innerModel().annotation(); + public OffsetDateTime lastSyncedTime() { + return this.innerModel().lastSyncedTime(); + } + + public AclType aclType() { + return this.innerModel().aclType(); + } + + public DeviceRole deviceRole() { + return this.innerModel().deviceRole(); + } + + public GlobalAccessControlListActionProperties globalAccessControlListActions() { + return this.innerModel().globalAccessControlListActions(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public List networkFabricIds() { + List inner = this.innerModel().networkFabricIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List controlPlaneAclConfiguration() { + List inner = this.innerModel().controlPlaneAclConfiguration(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -205,12 +249,12 @@ public AccessControlList refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.accessControlLists() .updateAdministrativeState(resourceGroupName, accessControlListName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.accessControlLists() .updateAdministrativeState(resourceGroupName, accessControlListName, body, context); @@ -243,6 +287,16 @@ public AccessControlListImpl withRegion(String location) { return this; } + public AccessControlListImpl withConfigurationType(ConfigurationType configurationType) { + if (isInCreateMode()) { + this.innerModel().withConfigurationType(configurationType); + return this; + } else { + this.updateBody.withConfigurationType(configurationType); + return this; + } + } + public AccessControlListImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -253,12 +307,12 @@ public AccessControlListImpl withTags(Map tags) { } } - public AccessControlListImpl withConfigurationType(ConfigurationType configurationType) { + public AccessControlListImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withConfigurationType(configurationType); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withConfigurationType(configurationType); + this.updateBody.withAnnotation(annotation); return this; } } @@ -285,37 +339,73 @@ public AccessControlListImpl withDefaultAction(CommunityActionTypes defaultActio public AccessControlListImpl withMatchConfigurations(List matchConfigurations) { - if (isInCreateMode()) { - this.innerModel().withMatchConfigurations(matchConfigurations); - return this; - } else { - this.updateBody.withMatchConfigurations(matchConfigurations); - return this; - } + this.innerModel().withMatchConfigurations(matchConfigurations); + return this; } public AccessControlListImpl withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + + public AccessControlListImpl withAclType(AclType aclType) { if (isInCreateMode()) { - this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.innerModel().withAclType(aclType); return this; } else { - this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.updateBody.withAclType(aclType); return this; } } - public AccessControlListImpl withAnnotation(String annotation) { + public AccessControlListImpl withDeviceRole(DeviceRole deviceRole) { if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); + this.innerModel().withDeviceRole(deviceRole); return this; } else { - this.updateBody.withAnnotation(annotation); + this.updateBody.withDeviceRole(deviceRole); return this; } } + public AccessControlListImpl + withGlobalAccessControlListActions(GlobalAccessControlListActionProperties globalAccessControlListActions) { + this.innerModel().withGlobalAccessControlListActions(globalAccessControlListActions); + return this; + } + + public AccessControlListImpl + withControlPlaneAclConfiguration(List controlPlaneAclConfiguration) { + this.innerModel().withControlPlaneAclConfiguration(controlPlaneAclConfiguration); + return this; + } + + public AccessControlListImpl + withMatchConfigurationsForUpdate(List matchConfigurations) { + this.updateBody.withMatchConfigurations(matchConfigurations); + return this; + } + + public AccessControlListImpl + withDynamicMatchConfigurationsForUpdate(List dynamicMatchConfigurations) { + this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + + public AccessControlListImpl + withControlPlaneAclConfigurationForUpdate(List controlPlaneAclConfiguration) { + this.updateBody.withControlPlaneAclConfiguration(controlPlaneAclConfiguration); + return this; + } + + public AccessControlListImpl withGlobalAccessControlListActions( + GlobalAccessControlListActionPatchProperties globalAccessControlListActions) { + this.updateBody.withGlobalAccessControlListActions(globalAccessControlListActions); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java index 656cc0667f31..996d8d06996f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,9 +37,10 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListsListResult; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -56,103 +58,175 @@ public final class AccessControlListsClientImpl implements AccessControlListsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of AccessControlListsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AccessControlListsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + AccessControlListsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(AccessControlListsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiAccessControlLists to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientAccessControlLists to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientAccessControlLists") public interface AccessControlListsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") AccessControlListInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") AccessControlListPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @@ -160,9 +234,19 @@ Mono>> resync(@HostParam("$host") String endpoint, @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +255,15 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -179,18 +271,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -198,169 +295,91 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accessControlListName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, body, accept, context); - } - - /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Access Control List resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessControlListInner> - beginCreateAsync(String resourceGroupName, String accessControlListName, AccessControlListInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, accessControlListName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String accessControlListName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessControlListInner> beginCreateAsync( - String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, accessControlListName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String accessControlListName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body) { - return this.beginCreateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName) { + return getByResourceGroupWithResponse(resourceGroupName, accessControlListName, Context.NONE).getValue(); } /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, accessControlListName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String accessControlListName, AccessControlListInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -369,18 +388,19 @@ public SyncPoller, AccessControlListInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accessControlListName, + private Response createWithResponse(String resourceGroupName, String accessControlListName, AccessControlListInner body) { - return beginCreateAsync(resourceGroupName, accessControlListName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + Context.NONE); } /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -390,18 +410,19 @@ private Mono createAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accessControlListName, + private Response createWithResponse(String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { - return beginCreateAsync(resourceGroupName, accessControlListName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + context); } /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -410,171 +431,110 @@ private Mono createAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessControlListInner create(String resourceGroupName, String accessControlListName, - AccessControlListInner body) { - return createAsync(resourceGroupName, accessControlListName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> + beginCreateAsync(String resourceGroupName, String accessControlListName, AccessControlListInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, accessControlListName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, + this.client.getContext()); } /** - * Creates Access Control List. - * * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessControlListInner create(String resourceGroupName, String accessControlListName, - AccessControlListInner body, Context context) { - return createAsync(resourceGroupName, accessControlListName, body, context).block(); - } - - /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accessControlListName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner body) { + Response response = createWithResponse(resourceGroupName, accessControlListName, body); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, Context.NONE); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accessControlListName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner body, Context context) { + Response response = createWithResponse(resourceGroupName, accessControlListName, body, context); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, context); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String accessControlListName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String accessControlListName, + AccessControlListInner body) { + return beginCreateAsync(resourceGroupName, accessControlListName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response}. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String accessControlListName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName, context).block(); + public AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner body) { + return beginCreate(resourceGroupName, accessControlListName, body).getFinalResult(); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * Implements Access Control List PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName) { - return getByResourceGroupWithResponse(resourceGroupName, accessControlListName, Context.NONE).getValue(); + public AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner body, Context context) { + return beginCreate(resourceGroupName, accessControlListName, body, context).getFinalResult(); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -589,128 +549,79 @@ public AccessControlListInner getByResourceGroup(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Access Control List properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + Context.NONE); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Access Control List properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessControlListInner> - beginUpdateAsync(String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, accessControlListName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + context); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Access Control List properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessControlListInner> beginUpdateAsync( - String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accessControlListName, body, context); + private PollerFlux, AccessControlListInner> + beginUpdateAsync(String resourceGroupName, String accessControlListName, AccessControlListPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accessControlListName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, context); + this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, + this.client.getContext()); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -724,12 +635,12 @@ private PollerFlux, AccessControlListInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessControlListInner> beginUpdate(String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - return this.beginUpdateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, accessControlListName, body); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, Context.NONE); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -744,12 +655,12 @@ public SyncPoller, AccessControlListInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessControlListInner> beginUpdate(String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, accessControlListName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, accessControlListName, body, context); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, context); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -768,29 +679,6 @@ private Mono updateAsync(String resourceGroupName, Strin } /** - * Updates the Access Control List. - * - * API to update certain properties of the Access Control List resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param body Access Control List properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Access Control List resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accessControlListName, - AccessControlListPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accessControlListName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -804,12 +692,10 @@ private Mono updateAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - return updateAsync(resourceGroupName, accessControlListName, body).block(); + return beginUpdate(resourceGroupName, accessControlListName, body).getFinalResult(); } /** - * Updates the Access Control List. - * * API to update certain properties of the Access Control List resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -824,12 +710,10 @@ public AccessControlListInner update(String resourceGroupName, String accessCont @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { - return updateAsync(resourceGroupName, accessControlListName, body, context).block(); + return beginUpdate(resourceGroupName, accessControlListName, body, context).getFinalResult(); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -842,113 +726,65 @@ public AccessControlListInner update(String resourceGroupName, String accessCont @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String accessControlListName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String accessControlListName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String accessControlListName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, Context.NONE); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String accessControlListName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accessControlListName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accessControlListName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, context); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accessControlListName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accessControlListName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String accessControlListName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accessControlListName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -960,12 +796,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName) { - return this.beginDeleteAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accessControlListName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -979,12 +814,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accessControlListName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -996,32 +830,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accessControlListName) { - return beginDeleteAsync(resourceGroupName, accessControlListName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Access Control List. - * - * Implements Access Control List DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accessControlListName, Context context) { - return beginDeleteAsync(resourceGroupName, accessControlListName, context).last() + return beginDeleteAsync(resourceGroupName, accessControlListName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1032,12 +845,10 @@ private Mono deleteAsync(String resourceGroupName, String accessControlLis */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accessControlListName) { - deleteAsync(resourceGroupName, accessControlListName).block(); + beginDelete(resourceGroupName, accessControlListName).getFinalResult(); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1049,99 +860,64 @@ public void delete(String resourceGroupName, String accessControlListName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accessControlListName, Context context) { - deleteAsync(resourceGroupName, accessControlListName, context).block(); + beginDelete(resourceGroupName, accessControlListName, context).getFinalResult(); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedFlux}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1149,33 +925,34 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedFlux}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1183,136 +960,108 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedFlux}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedFlux}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1321,143 +1070,86 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accessControlListName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String accessControlListName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String accessControlListName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + Context.NONE); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String accessControlListName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String accessControlListName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + context); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String accessControlListName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1466,19 +1158,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, accessControlListName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1488,20 +1181,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, accessControlListName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1510,39 +1203,16 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates administrative state of Access Control Lists. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String accessControlListName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1551,17 +1221,15 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, accessControlListName, body).getFinalResult(); } /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1571,17 +1239,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, accessControlListName, body, context).getFinalResult(); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1589,126 +1255,76 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resyncWithResponseAsync(String resourceGroupName, String accessControlListName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncWithResponseAsync(String resourceGroupName, - String accessControlListName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } + private Response resyncWithResponse(String resourceGroupName, String accessControlListName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, accept, context); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, Context.NONE); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String accessControlListName) { - Mono>> mono = resyncWithResponseAsync(resourceGroupName, accessControlListName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String accessControlListName, + Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String accessControlListName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resyncWithResponseAsync(resourceGroupName, accessControlListName, context); + beginResyncAsync(String resourceGroupName, String accessControlListName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, accessControlListName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1716,18 +1332,20 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName) { - return this.beginResyncAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, accessControlListName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1736,18 +1354,20 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName, Context context) { - return this.beginResyncAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, accessControlListName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1755,7 +1375,7 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resyncAsync(String resourceGroupName, @@ -1765,28 +1385,6 @@ private Mono resyncAsync(String res } /** - * Resync operation on the Access Control Lists. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceGroupName, - String accessControlListName, Context context) { - return beginResyncAsync(resourceGroupName, accessControlListName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1794,16 +1392,14 @@ private Mono resyncAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName) { - return resyncAsync(resourceGroupName, accessControlListName).block(); + return beginResync(resourceGroupName, accessControlListName).getFinalResult(); } /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1812,17 +1408,15 @@ public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName, Context context) { - return resyncAsync(resourceGroupName, accessControlListName, context).block(); + return beginResync(resourceGroupName, accessControlListName, context).getFinalResult(); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1830,124 +1424,77 @@ public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String accessControlListName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String accessControlListName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accessControlListName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String accessControlListName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, Context.NONE); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String accessControlListName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1955,17 +1502,17 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName) { - return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, accessControlListName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1974,17 +1521,18 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, accessControlListName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1992,7 +1540,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -2002,28 +1550,6 @@ private Mono validateConfigurationAsync(Stri } /** - * Validates the configuration of the Access Control Lists. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String accessControlListName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, accessControlListName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2031,17 +1557,15 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName) { - return validateConfigurationAsync(resourceGroupName, accessControlListName).block(); + return beginValidateConfiguration(resourceGroupName, accessControlListName).getFinalResult(); } /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2050,12 +1574,12 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName, Context context) { - return validateConfigurationAsync(resourceGroupName, accessControlListName, context).block(); + return beginValidateConfiguration(resourceGroupName, accessControlListName, context).getFinalResult(); } /** @@ -2065,17 +1589,11 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2085,6 +1603,24 @@ private Mono> listByResourceGroupNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2093,23 +1629,15 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2119,17 +1647,11 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2139,6 +1661,24 @@ private Mono> listBySubscriptionNextSingle .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2147,22 +1687,14 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of AccessControlList items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java index 5829f76c18ae..dcc5ffc35851 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -12,11 +12,13 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlLists; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class AccessControlListsImpl implements AccessControlLists { @@ -36,12 +38,8 @@ public Response getByResourceGroupWithResponse(String resourc String accessControlListName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accessControlListName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AccessControlListImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccessControlListImpl(inner.getValue(), this.manager())); } public AccessControlList getByResourceGroup(String resourceGroupName, String accessControlListName) { @@ -83,23 +81,23 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new AccessControlListImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, accessControlListName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, accessControlListName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffOperationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffOperationResponseImpl.java new file mode 100644 index 000000000000..c5ad68bf4917 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffOperationResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ArmConfigurationDiffOperationResponseImpl implements ArmConfigurationDiffOperationResponse { + private ArmConfigurationDiffOperationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + ArmConfigurationDiffOperationResponseImpl(ArmConfigurationDiffOperationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public ArmConfigurationDiffResponseProperties properties() { + return this.innerModel().properties(); + } + + public ArmConfigurationDiffOperationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusOperationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusOperationResponseImpl.java new file mode 100644 index 000000000000..2244f2c43bbc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusOperationResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class CommitBatchStatusOperationResponseImpl implements CommitBatchStatusOperationResponse { + private CommitBatchStatusOperationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + CommitBatchStatusOperationResponseImpl(CommitBatchStatusOperationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public CommitBatchStatusResponseProperties properties() { + return this.innerModel().properties(); + } + + public CommitBatchStatusOperationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitConfigurationResponseImpl.java new file mode 100644 index 000000000000..628927e80286 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitConfigurationResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class CommitConfigurationResponseImpl implements CommitConfigurationResponse { + private CommitConfigurationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + CommitConfigurationResponseImpl(CommitConfigurationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public CommitConfigurationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java new file mode 100644 index 000000000000..4129aae3917a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; +import java.time.OffsetDateTime; + +public final class CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl + implements CommonPostActionResponseForDeviceROCommandsOperationStatusResult { + private CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl( + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public CommonPostActionResponseForDeviceROCommands properties() { + return this.innerModel().properties(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public String status() { + return this.innerModel().status(); + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java index 87f5cde14568..7959432440f6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -22,6 +22,10 @@ public final class CommonPostActionResponseForDeviceUpdateImpl implements Common this.serviceManager = serviceManager; } + public ManagementError error() { + return this.innerModel().error(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -44,10 +48,6 @@ public List failedDevices() { } } - public ManagementError error() { - return this.innerModel().error(); - } - public CommonPostActionResponseForDeviceUpdateInner innerModel() { return this.innerObject; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java index e533d6f2b218..8176ba37d2b0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -20,14 +20,14 @@ public final class CommonPostActionResponseForStateUpdateImpl implements CommonP this.serviceManager = serviceManager; } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - public ManagementError error() { return this.innerModel().error(); } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public CommonPostActionResponseForStateUpdateInner innerModel() { return this.innerObject; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchOperationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchOperationResponseImpl.java new file mode 100644 index 000000000000..a98d2c13e42d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchOperationResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class DiscardCommitBatchOperationResponseImpl implements DiscardCommitBatchOperationResponse { + private DiscardCommitBatchOperationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + DiscardCommitBatchOperationResponseImpl(DiscardCommitBatchOperationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public DiscardCommitBatchResponseProperties properties() { + return this.innerModel().properties(); + } + + public DiscardCommitBatchOperationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java index 42893192397b..6daed0850c2c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,18 +8,26 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class ExternalNetworkImpl implements ExternalNetwork, ExternalNetwork.Definition, ExternalNetwork.Update { private ExternalNetworkInner innerObject; @@ -42,52 +50,56 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public PeeringOption peeringOption() { - return this.innerModel().peeringOption(); + public String annotation() { + return this.innerModel().annotation(); } - public L3OptionBProperties optionBProperties() { - return this.innerModel().optionBProperties(); + public String networkToNetworkInterconnectId() { + return this.innerModel().networkToNetworkInterconnectId(); } - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.innerModel().optionAProperties(); + public ImportRoutePolicy importRoutePolicy() { + return this.innerModel().importRoutePolicy(); } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); + public ExportRoutePolicy exportRoutePolicy() { + return this.innerModel().exportRoutePolicy(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public PeeringOption peeringOption() { + return this.innerModel().peeringOption(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public L3OptionBProperties optionBProperties() { + return this.innerModel().optionBProperties(); } - public String networkToNetworkInterconnectId() { - return this.innerModel().networkToNetworkInterconnectId(); + public ExternalNetworkPropertiesOptionAProperties optionAProperties() { + return this.innerModel().optionAProperties(); } - public String importRoutePolicyId() { - return this.innerModel().importRoutePolicyId(); + public ExternalNetworkStaticRouteConfiguration staticRouteConfiguration() { + return this.innerModel().staticRouteConfiguration(); } - public String exportRoutePolicyId() { - return this.innerModel().exportRoutePolicyId(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); } - public ImportRoutePolicy importRoutePolicy() { - return this.innerModel().importRoutePolicy(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); } - public ExportRoutePolicy exportRoutePolicy() { - return this.innerModel().exportRoutePolicy(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public String annotation() { - return this.innerModel().annotation(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public String resourceGroupName() { @@ -181,31 +193,42 @@ public ExternalNetwork refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.externalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.externalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { return serviceManager.externalNetworks() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context) { + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + Context context) { return serviceManager.externalNetworks() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } + public ExternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + return serviceManager.externalNetworks() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + } + + public ExternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + return serviceManager.externalNetworks() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + } + public ExternalNetworkImpl withPeeringOption(PeeringOption peeringOption) { if (isInCreateMode()) { this.innerModel().withPeeringOption(peeringOption); @@ -216,21 +239,16 @@ public ExternalNetworkImpl withPeeringOption(PeeringOption peeringOption) { } } - public ExternalNetworkImpl withOptionBProperties(L3OptionBProperties optionBProperties) { + public ExternalNetworkImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withOptionBProperties(optionBProperties); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withOptionBProperties(optionBProperties); + this.updateBody.withAnnotation(annotation); return this; } } - public ExternalNetworkImpl withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { - this.innerModel().withOptionAProperties(optionAProperties); - return this; - } - public ExternalNetworkImpl withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { if (isInCreateMode()) { this.innerModel().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); @@ -241,54 +259,45 @@ public ExternalNetworkImpl withNetworkToNetworkInterconnectId(String networkToNe } } - public ExternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicyId(importRoutePolicyId); - return this; - } else { - this.updateBody.withImportRoutePolicyId(importRoutePolicyId); - return this; - } + public ExternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.innerModel().withImportRoutePolicy(importRoutePolicy); + return this; } - public ExternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } else { - this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); - return this; - } + public ExternalNetworkImpl withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.innerModel().withExportRoutePolicy(exportRoutePolicy); + return this; } - public ExternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicy(importRoutePolicy); - return this; - } else { - this.updateBody.withImportRoutePolicy(importRoutePolicy); - return this; - } + public ExternalNetworkImpl withOptionBProperties(L3OptionBProperties optionBProperties) { + this.innerModel().withOptionBProperties(optionBProperties); + return this; } - public ExternalNetworkImpl withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicy(exportRoutePolicy); - return this; - } else { - this.updateBody.withExportRoutePolicy(exportRoutePolicy); - return this; - } + public ExternalNetworkImpl withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { + this.innerModel().withOptionAProperties(optionAProperties); + return this; } - public ExternalNetworkImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public ExternalNetworkImpl + withStaticRouteConfiguration(ExternalNetworkStaticRouteConfiguration staticRouteConfiguration) { + this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + + public ExternalNetworkImpl withImportRoutePolicy(ImportRoutePolicyPatch importRoutePolicy) { + this.updateBody.withImportRoutePolicy(importRoutePolicy); + return this; + } + + public ExternalNetworkImpl withExportRoutePolicy(ExportRoutePolicyPatch exportRoutePolicy) { + this.updateBody.withExportRoutePolicy(exportRoutePolicy); + return this; + } + + public ExternalNetworkImpl withOptionBProperties(L3OptionBPatchProperties optionBProperties) { + this.updateBody.withOptionBProperties(optionBProperties); + return this; } public ExternalNetworkImpl @@ -297,7 +306,13 @@ public ExternalNetworkImpl withAnnotation(String annotation) { return this; } + public ExternalNetworkImpl + withStaticRouteConfiguration(ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration) { + this.updateBody.withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkUpdateBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkUpdateBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..5aa7fb6c5573 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkUpdateBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ExternalNetworkUpdateBfdAdministrativeStateResponseImpl + implements ExternalNetworkUpdateBfdAdministrativeStateResponse { + private ExternalNetworkUpdateBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + ExternalNetworkUpdateBfdAdministrativeStateResponseImpl( + ExternalNetworkUpdateBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public ExternalNetworkUpdateBfdAdministrativeStateResponseProperties properties() { + return this.innerModel().properties(); + } + + public ExternalNetworkUpdateBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java index 7e8f5157606f..757732c7dccd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,18 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,124 +58,221 @@ public final class ExternalNetworksClientImpl implements ExternalNetworksClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of ExternalNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - ExternalNetworksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + ExternalNetworksClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(ExternalNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiExternalNetworks to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientExternalNetworks to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientExternalNetworks") public interface ExternalNetworksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") ExternalNetworkInner body, @HeaderParam("Accept") String accept, + @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") ExternalNetworkPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("externalNetworkName") String externalNetworkName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByL3IsolationDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateStaticRouteBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByL3IsolationDomainNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -180,186 +280,97 @@ Mono> listByL3IsolationDomainNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context); - } - - /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the External Network resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, l3IsolationDomainName, externalNetworkName, accept, context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the External Network resource. + * @return defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return getWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, Context.NONE).getValue(); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the External Network resource. + * @return defines the External Network resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -369,18 +380,19 @@ public SyncPoller, ExternalNetworkInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -391,18 +403,19 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -412,186 +425,118 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalNetworkInner> beginCreateAsync( + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); - } - - /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, Context.NONE); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, context); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner body) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response}. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).block(); + public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner body) { + return beginCreate(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).getFinalResult(); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - return getWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, Context.NONE).getValue(); + public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner body, Context context) { + return beginCreate(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) + .getFinalResult(); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -607,122 +552,67 @@ public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDoma @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -730,18 +620,14 @@ private PollerFlux, ExternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, context); + ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -756,13 +642,13 @@ private PollerFlux, ExternalNetworkInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, Context.NONE); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -778,13 +664,13 @@ public SyncPoller, ExternalNetworkInner> beginU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, context); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -804,30 +690,6 @@ private Mono updateAsync(String resourceGroupName, String } /** - * Updates a External Networks. - * - * API to update certain properties of the ExternalNetworks resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the External Network resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -842,12 +704,10 @@ private Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).getFinalResult(); } /** - * Updates a External Networks. - * * API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -863,12 +723,11 @@ public ExternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) + .getFinalResult(); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -882,108 +741,55 @@ public ExternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + Context.NONE); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, context); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -991,17 +797,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context) { - context = this.client.mergeContext(context); + String externalNetworkName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); + = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1015,12 +818,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1035,13 +838,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1059,29 +861,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a ExternalNetworks. - * - * Implements ExternalNetworks DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1093,12 +872,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - deleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, externalNetworkName).getFinalResult(); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,12 +889,10 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).getFinalResult(); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1125,81 +900,40 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + String l3IsolationDomainName) { + return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1207,18 +941,20 @@ private Mono> listByL3IsolationDomainSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedFlux}. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName) { - return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1227,19 +963,20 @@ private PagedFlux listByL3IsolationDomainAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedFlux}. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedFlux<>( - () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1247,17 +984,16 @@ private PagedFlux listByL3IsolationDomainAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); + return new PagedIterable<>(() -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink)); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1266,17 +1002,17 @@ public PagedIterable listByL3IsolationDomain(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>( + () -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1286,155 +1022,89 @@ public PagedIterable listByL3IsolationDomain(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, - context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, externalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String externalNetworkName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, externalNetworkName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1444,21 +1114,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1469,22 +1138,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1494,10 +1161,10 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) .last() @@ -1505,30 +1172,6 @@ private Mono updateAdministrativeSt } /** - * Implements the operation to the underlying resources. - * - * Executes update operation to enable or disable administrative State for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1538,18 +1181,16 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1560,18 +1201,16 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, + context).getFinalResult(); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1581,157 +1220,90 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context); + return service.updateStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, Context.NONE); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String externalNetworkName, UpdateAdministrativeState body) { Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1741,22 +1313,20 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body) - .getSyncPoller(); + Response response = updateStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1767,22 +1337,20 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context) - .getSyncPoller(); + Response response = updateStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1792,10 +1360,10 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, @@ -1803,8 +1371,25 @@ private Mono updateStaticRouteBfdAd } /** - * Executes Static Route BFD state update operation to the underlying resources. + * Update Static Route BFD for external Network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { + return beginUpdateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body).getFinalResult(); + } + + /** * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1815,20 +1400,42 @@ private Mono updateStaticRouteBfdAd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + public UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { + return beginUpdateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body, context).getFinalResult(); } /** - * Executes Static Route BFD state update operation to the underlying resources. + * BFD administrative state for either static or bgp for internalNetwork. * - * Update Static Route BFD for external Network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1837,19 +1444,95 @@ private Mono updateStaticRouteBfdAd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body).block(); + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Executes Static Route BFD state update operation to the underlying resources. + * BFD administrative state for either static or bgp for internalNetwork. * - * Update Static Route BFD for external Network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, ExternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ExternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body); + return this.client + .getLroResult( + response, ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, Context.NONE); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1859,13 +1542,80 @@ public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ExternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body, context); + return this.client + .getLroResult( + response, ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + ExternalNetworkUpdateBfdAdministrativeStateResponseInner.class, context); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context).block(); + private Mono updateBfdAdministrativeStateAsync( + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, + body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .getFinalResult(); + } + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, + context).getFinalResult(); } /** @@ -1875,17 +1625,11 @@ public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1895,6 +1639,24 @@ private Mono> listByL3IsolationDomainNextSin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1903,22 +1665,15 @@ private Mono> listByL3IsolationDomainNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of ExternalNetwork items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink, + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java index 4b1db75edc81..61cfaf730980 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,12 +10,15 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class ExternalNetworksImpl implements ExternalNetworks { private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworksImpl.class); @@ -34,12 +37,8 @@ public Response getWithResponse(String resourceGroupName, Strin String externalNetworkName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExternalNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalNetworkImpl(inner.getValue(), this.manager())); } public ExternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { @@ -75,47 +74,71 @@ public PagedIterable listByL3IsolationDomain(String resourceGro return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalNetworkImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body) { + ExternalNetworkUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + if (inner != null) { + return new ExternalNetworkUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + ExternalNetworkUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + if (inner != null) { + return new ExternalNetworkUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetTopologyResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetTopologyResponseImpl.java new file mode 100644 index 000000000000..0d3e6b778555 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetTopologyResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponse; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class GetTopologyResponseImpl implements GetTopologyResponse { + private GetTopologyResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + GetTopologyResponseImpl(GetTopologyResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public GetTopologyResponseProperties properties() { + return this.innerModel().properties(); + } + + public GetTopologyResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java index 1f4c622fcb39..956c4f85d1e1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,20 +9,30 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import java.util.Collections; import java.util.List; @@ -47,28 +57,12 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public int vlanId() { - return this.innerModel().vlanId(); - } - - public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { - return this.innerModel().bgpConfiguration(); - } - - public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { - return this.innerModel().staticRouteConfiguration(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public String annotation() { + return this.innerModel().annotation(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public Extension extension() { + return this.innerModel().extension(); } public Integer mtu() { @@ -93,14 +87,6 @@ public List connectedIPv6Subnets() { } } - public String importRoutePolicyId() { - return this.innerModel().importRoutePolicyId(); - } - - public String exportRoutePolicyId() { - return this.innerModel().exportRoutePolicyId(); - } - public ImportRoutePolicy importRoutePolicy() { return this.innerModel().importRoutePolicy(); } @@ -121,12 +107,44 @@ public IsMonitoringEnabled isMonitoringEnabled() { return this.innerModel().isMonitoringEnabled(); } - public Extension extension() { - return this.innerModel().extension(); + public int vlanId() { + return this.innerModel().vlanId(); } - public String annotation() { - return this.innerModel().annotation(); + public BgpConfiguration bgpConfiguration() { + return this.innerModel().bgpConfiguration(); + } + + public StaticRouteConfiguration staticRouteConfiguration() { + return this.innerModel().staticRouteConfiguration(); + } + + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.innerModel().nativeIpv4PrefixLimit(); + } + + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.innerModel().nativeIpv6PrefixLimit(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public String resourceGroupName() { @@ -220,106 +238,92 @@ public InternalNetwork refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.internalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.internalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body) { + public InternalNetworkUpdateBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkUpdateBgpAdministrativeStateRequest body) { return serviceManager.internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body, - Context context) { + public InternalNetworkUpdateBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context) { return serviceManager.internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { return serviceManager.internalNetworks() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context) { + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + Context context) { return serviceManager.internalNetworks() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public InternalNetworkImpl withVlanId(int vlanId) { - this.innerModel().withVlanId(vlanId); - return this; + public InternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkUpdateBfdAdministrativeStateRequest body) { + return serviceManager.internalNetworks() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public InternalNetworkImpl withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { - this.innerModel().withBgpConfiguration(bgpConfiguration); - return this; + public InternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + return serviceManager.internalNetworks() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public InternalNetworkImpl - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { - this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); + public InternalNetworkImpl withVlanId(int vlanId) { + this.innerModel().withVlanId(vlanId); return this; } - public InternalNetworkImpl withMtu(Integer mtu) { + public InternalNetworkImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withMtu(mtu); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withMtu(mtu); + this.updateBody.withAnnotation(annotation); return this; } } - public InternalNetworkImpl withConnectedIPv4Subnets(List connectedIPv4Subnets) { - if (isInCreateMode()) { - this.innerModel().withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } else { - this.updateBody.withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } + public InternalNetworkImpl withExtension(Extension extension) { + this.innerModel().withExtension(extension); + return this; } - public InternalNetworkImpl withConnectedIPv6Subnets(List connectedIPv6Subnets) { + public InternalNetworkImpl withMtu(Integer mtu) { if (isInCreateMode()) { - this.innerModel().withConnectedIPv6Subnets(connectedIPv6Subnets); + this.innerModel().withMtu(mtu); return this; } else { - this.updateBody.withConnectedIPv6Subnets(connectedIPv6Subnets); + this.updateBody.withMtu(mtu); return this; } } - public InternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicyId(importRoutePolicyId); - return this; - } else { - this.updateBody.withImportRoutePolicyId(importRoutePolicyId); - return this; - } + public InternalNetworkImpl withConnectedIPv4Subnets(List connectedIPv4Subnets) { + this.innerModel().withConnectedIPv4Subnets(connectedIPv4Subnets); + return this; } - public InternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } else { - this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); - return this; - } + public InternalNetworkImpl withConnectedIPv6Subnets(List connectedIPv6Subnets) { + this.innerModel().withConnectedIPv6Subnets(connectedIPv6Subnets); + return this; } public InternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { @@ -372,32 +376,57 @@ public InternalNetworkImpl withIsMonitoringEnabled(IsMonitoringEnabled isMonitor } } - public InternalNetworkImpl withExtension(Extension extension) { - this.innerModel().withExtension(extension); + public InternalNetworkImpl withBgpConfiguration(BgpConfiguration bgpConfiguration) { + this.innerModel().withBgpConfiguration(bgpConfiguration); return this; } - public InternalNetworkImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public InternalNetworkImpl withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); + return this; } - public InternalNetworkImpl withBgpConfiguration(BgpConfiguration bgpConfiguration) { + public InternalNetworkImpl withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + this.innerModel().withNativeIpv4PrefixLimit(nativeIpv4PrefixLimit); + return this; + } + + public InternalNetworkImpl withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + this.innerModel().withNativeIpv6PrefixLimit(nativeIpv6PrefixLimit); + return this; + } + + public InternalNetworkImpl withConnectedIPv4SubnetsForUpdate(List connectedIPv4Subnets) { + this.updateBody.withConnectedIPv4Subnets(connectedIPv4Subnets); + return this; + } + + public InternalNetworkImpl withConnectedIPv6SubnetsForUpdate(List connectedIPv6Subnets) { + this.updateBody.withConnectedIPv6Subnets(connectedIPv6Subnets); + return this; + } + + public InternalNetworkImpl withBgpConfiguration(BgpPatchConfiguration bgpConfiguration) { this.updateBody.withBgpConfiguration(bgpConfiguration); return this; } - public InternalNetworkImpl withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkImpl withStaticRouteConfiguration(StaticRoutePatchConfiguration staticRouteConfiguration) { this.updateBody.withStaticRouteConfiguration(staticRouteConfiguration); return this; } + public InternalNetworkImpl withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + this.updateBody.withNativeIpv4PrefixLimit(nativeIpv4PrefixLimit); + return this; + } + + public InternalNetworkImpl withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + this.updateBody.withNativeIpv6PrefixLimit(nativeIpv6PrefixLimit); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..c674b4cefb84 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class InternalNetworkUpdateBfdAdministrativeStateResponseImpl + implements InternalNetworkUpdateBfdAdministrativeStateResponse { + private InternalNetworkUpdateBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + InternalNetworkUpdateBfdAdministrativeStateResponseImpl( + InternalNetworkUpdateBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public InternalNetworkUpdateBfdAdministrativeStateResponseProperties properties() { + return this.innerModel().properties(); + } + + public InternalNetworkUpdateBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBgpAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBgpAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..b5e05cebf945 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBgpAdministrativeStateResponseImpl.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class InternalNetworkUpdateBgpAdministrativeStateResponseImpl + implements InternalNetworkUpdateBgpAdministrativeStateResponse { + private InternalNetworkUpdateBgpAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + InternalNetworkUpdateBgpAdministrativeStateResponseImpl( + InternalNetworkUpdateBgpAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public InternalNetworkUpdateBgpAdministrativeStateResponseProperties properties() { + return this.innerModel().properties(); + } + + public InternalNetworkUpdateBgpAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java index 7d2d03cb5c69..999e29947f7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,20 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworksList; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,323 +60,340 @@ public final class InternalNetworksClientImpl implements InternalNetworksClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of InternalNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternalNetworksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternalNetworksClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(InternalNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternalNetworks to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientInternalNetworks to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientInternalNetworks") public interface InternalNetworksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") InternalNetworkInner body, @HeaderParam("Accept") String accept, + @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") InternalNetworkPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("internalNetworkName") String internalNetworkName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByL3IsolationDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBgpAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateBgpAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBgpAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateStaticRouteBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByL3IsolationDomainNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a InternalNetworks along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a InternalNetworks on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context); - } - - /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Internal Network resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Internal Network resource. + * @return a InternalNetworks along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, l3IsolationDomainName, internalNetworkName, accept, context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Internal Network resource. + * @return a InternalNetworks. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return getWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, Context.NONE).getValue(); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Internal Network resource. + * @return defines the Internal Network resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -381,18 +403,19 @@ public SyncPoller, InternalNetworkInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -403,18 +426,19 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -424,184 +448,118 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternalNetworkInner> beginCreateAsync( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); - } - - /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, Context.NONE); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, context); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner body) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks along with {@link Response}. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).block(); + public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner body) { + return beginCreate(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).getFinalResult(); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InternalNetworks. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - return getWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, Context.NONE).getValue(); + public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner body, Context context) { + return beginCreate(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) + .getFinalResult(); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -617,122 +575,67 @@ public InternalNetworkInner get(String resourceGroupName, String l3IsolationDoma @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Internal Network resource. + * @return defines the Internal Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -740,18 +643,14 @@ private PollerFlux, InternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, context); + InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -766,13 +665,13 @@ private PollerFlux, InternalNetworkInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, Context.NONE); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -788,13 +687,13 @@ public SyncPoller, InternalNetworkInner> beginU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, context); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -814,30 +713,6 @@ private Mono updateAsync(String resourceGroupName, String } /** - * API to update certain properties of the InternalNetworks resources. - * - * Updates a InternalNetworks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param body InternalNetwork properties to update. Only annotations are supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Internal Network resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -852,12 +727,10 @@ private Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).getFinalResult(); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -873,12 +746,11 @@ public InternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) + .getFinalResult(); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -892,108 +764,55 @@ public InternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + Context.NONE); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, context); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1001,17 +820,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context) { - context = this.client.mergeContext(context); + String internalNetworkName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); + = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1025,12 +841,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1045,13 +861,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1069,29 +884,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a InternalNetworks. - * - * Implements InternalNetworks DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1103,12 +895,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - deleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, internalNetworkName).getFinalResult(); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1122,12 +912,10 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).getFinalResult(); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1135,81 +923,40 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternalNetwork items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + String l3IsolationDomainName) { + return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1217,18 +964,20 @@ private Mono> listByL3IsolationDomainSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedFlux}. + * @return paged collection of InternalNetwork items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName) { - return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1237,19 +986,20 @@ private PagedFlux listByL3IsolationDomainAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedFlux}. + * @return paged collection of InternalNetwork items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedFlux<>( - () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1257,17 +1007,16 @@ private PagedFlux listByL3IsolationDomainAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); + return new PagedIterable<>(() -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink)); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1276,18 +1025,18 @@ public PagedIterable listByL3IsolationDomain(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>( + () -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink, context)); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1296,49 +1045,44 @@ public PagedIterable listByL3IsolationDomain(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes the operation to the underlying resources. + * Executes update operation to enable or disable administrative State for InternalNetwork. * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1348,48 +1092,174 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body) { + Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body) { + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body, Context context) { + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, context); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); + } + + /** + * Executes update operation to enable or disable administrative State for InternalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); + } + + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateBgpAdministrativeStateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateBgpAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1398,25 +1268,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBgpAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBgpAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1426,26 +1292,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBgpAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBgpAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1454,92 +1315,94 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + private + PollerFlux, InternalNetworkUpdateBgpAdministrativeStateResponseInner> + beginUpdateBgpAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBgpAdministrativeStateRequest body) { + Mono>> mono = updateBgpAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, + InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context) - .getSyncPoller(); + SyncPoller, InternalNetworkUpdateBgpAdministrativeStateResponseInner> + beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBgpAdministrativeStateRequest body) { + Response response = updateBgpAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client + .getLroResult( + response, InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, + InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, Context.NONE); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, InternalNetworkUpdateBgpAdministrativeStateResponseInner> + beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context) { + Response response = updateBgpAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body, context); + return this.client + .getLroResult( + response, InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, + InternalNetworkUpdateBgpAdministrativeStateResponseInner.class, context); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateBgpAdministrativeStateAsync( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body) { + return beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, + body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1548,19 +1411,18 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .block(); + public InternalNetworkUpdateBgpAdministrativeStateResponseInner updateBgpAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body) { + return beginUpdateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); } /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1570,19 +1432,18 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).block(); + public InternalNetworkUpdateBgpAdministrativeStateResponseInner updateBgpAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context) { + return beginUpdateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1591,156 +1452,91 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBgpAdministrativeStateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateBgpAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + .withContext(context -> service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBgpAdministrativeStateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateBgpAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, - context); + return service.updateStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, Context.NONE); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateBgpAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateBgpAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateBgpAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateBgpAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + private PollerFlux, UpdateAdministrativeStateResponseInner> + beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body) { + Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1749,22 +1545,21 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + Response response = updateStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1774,23 +1569,21 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context) - .getSyncPoller(); + Response response = updateStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1799,43 +1592,18 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body, context).last().flatMap(this.client::getLroFinalResultOrError); + return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1844,19 +1612,17 @@ private Mono updateBgpAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .block(); + return beginUpdateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body).getFinalResult(); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * Update BGP state for internalNetwork. Allowed only on edge devices. + * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1866,19 +1632,17 @@ public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).block(); + return beginUpdateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1887,158 +1651,95 @@ public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context); + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + PollerFlux, InternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2047,23 +1748,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body) - .getSyncPoller(); + SyncPoller, InternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client + .getLroResult( + response, InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2073,23 +1774,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context) - .getSyncPoller(); + SyncPoller, InternalNetworkUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body, context); + return this.client + .getLroResult( + response, InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, + InternalNetworkUpdateBfdAdministrativeStateResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2098,80 +1799,76 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( + private Mono updateBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body).last().flatMap(this.client::getLroFinalResultOrError); + InternalNetworkUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, + body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( + public InternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + InternalNetworkUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body).block(); + public InternalNetworkUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return paged collection of InternalNetwork items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context).block(); + private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -2181,24 +1878,15 @@ public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternalNetwork items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2209,22 +1897,15 @@ private Mono> listByL3IsolationDomainNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternalNetwork items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink, + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java index 5a666bd91c41..7ea7fe5f4f3b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,12 +10,18 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class InternalNetworksImpl implements InternalNetworks { private static final ClientLogger LOGGER = new ClientLogger(InternalNetworksImpl.class); @@ -34,12 +40,8 @@ public Response getWithResponse(String resourceGroupName, Strin String internalNetworkName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new InternalNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InternalNetworkImpl(inner.getValue(), this.manager())); } public InternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { @@ -75,69 +77,95 @@ public PagedIterable listByL3IsolationDomain(String resourceGro return ResourceManagerUtils.mapPage(inner, inner1 -> new InternalNetworkImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + public InternalNetworkUpdateBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body) { + InternalNetworkUpdateBgpAdministrativeStateResponseInner inner = this.serviceClient() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkUpdateBgpAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + public InternalNetworkUpdateBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context) { + InternalNetworkUpdateBgpAdministrativeStateResponseInner inner = this.serviceClient() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkUpdateBgpAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public InternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body) { + InternalNetworkUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + if (inner != null) { + return new InternalNetworkUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public InternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context) { + InternalNetworkUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + if (inner != null) { + return new InternalNetworkUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java index 013f3503ec07..1d2b80d439e5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -11,6 +11,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.Map; @@ -49,6 +50,14 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String annotation() { + return this.innerModel().annotation(); + } + + public String internetGatewayRuleId() { + return this.innerModel().internetGatewayRuleId(); + } + public String ipv4Address() { return this.innerModel().ipv4Address(); } @@ -61,20 +70,20 @@ public GatewayType typePropertiesType() { return this.innerModel().typePropertiesType(); } - public String networkFabricControllerId() { - return this.innerModel().networkFabricControllerId(); + public GatewayType internetGatewayType() { + return this.innerModel().internetGatewayType(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public String networkFabricControllerId() { + return this.innerModel().networkFabricControllerId(); } - public String internetGatewayRuleId() { - return this.innerModel().internetGatewayRuleId(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); } - public String annotation() { - return this.innerModel().annotation(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } public Region region() { @@ -182,11 +191,6 @@ public InternetGatewayImpl withRegion(String location) { return this; } - public InternetGatewayImpl withTypePropertiesType(GatewayType typePropertiesType) { - this.innerModel().withTypePropertiesType(typePropertiesType); - return this; - } - public InternetGatewayImpl withNetworkFabricControllerId(String networkFabricControllerId) { this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); return this; @@ -202,6 +206,11 @@ public InternetGatewayImpl withTags(Map tags) { } } + public InternetGatewayImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); + return this; + } + public InternetGatewayImpl withInternetGatewayRuleId(String internetGatewayRuleId) { if (isInCreateMode()) { this.innerModel().withInternetGatewayRuleId(internetGatewayRuleId); @@ -212,12 +221,17 @@ public InternetGatewayImpl withInternetGatewayRuleId(String internetGatewayRuleI } } - public InternetGatewayImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public InternetGatewayImpl withTypePropertiesType(GatewayType typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public InternetGatewayImpl withInternetGatewayType(GatewayType internetGatewayType) { + this.innerModel().withInternetGatewayType(internetGatewayType); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java index 678ec0ba80b4..68cb6a547830 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,6 +10,7 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Collections; @@ -55,6 +56,10 @@ public RuleProperties ruleProperties() { return this.innerModel().ruleProperties(); } + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -199,6 +204,6 @@ public InternetGatewayRuleImpl withAnnotation(String annotation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java index 1331e6d722fb..9f3f05be558f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRulesListResult; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,83 +53,136 @@ public final class InternetGatewayRulesClientImpl implements InternetGatewayRule /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of InternetGatewayRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternetGatewayRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternetGatewayRulesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(InternetGatewayRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternetGatewayRules to be used + * The interface defining all the services for ManagedNetworkFabricManagementClientInternetGatewayRules to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientInternetGatewayRules") public interface InternetGatewayRulesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("internetGatewayRuleName") String internetGatewayRuleName, - @BodyParam("application/json") InternetGatewayRuleInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayRuleName") String internetGatewayRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRuleInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRuleInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayRuleName") String internetGatewayRuleName, - @BodyParam("application/json") InternetGatewayRulePatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRulePatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRulePatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("internetGatewayRuleName") String internetGatewayRuleName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") String e @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,189 +206,114 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRuleInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String internetGatewayRuleName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayRuleName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Internet Gateway Rule resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayRuleName, body, accept, context); - } - - /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayRuleInner> - beginCreateAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String internetGatewayRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + * @return an Internet Gateway Rule resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayRuleInner> beginCreateAsync( - String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, internetGatewayRuleName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayRuleName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, accept, context); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + * @return an Internet Gateway Rule resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternetGatewayRuleInner> - beginCreate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { - return this.beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); } /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternetGatewayRuleInner> beginCreate( - String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, internetGatewayRuleName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String internetGatewayRuleName, InternetGatewayRuleInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -335,18 +322,19 @@ public SyncPoller, InternetGatewayRuleInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayRuleName, + private Response createWithResponse(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { - return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + Context.NONE); } /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -356,18 +344,19 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayRuleName, + private Response createWithResponse(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { - return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + context); } /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -376,169 +365,111 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition. + * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRuleInner body) { - return createAsync(resourceGroupName, internetGatewayRuleName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> + beginCreateAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, + this.client.getContext()); } /** - * Creates an Internet Gateway rule. - * * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRuleInner body, Context context) { - return createAsync(resourceGroupName, internetGatewayRuleName, body, context).block(); - } - - /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayRuleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> + beginCreate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + Response response = createWithResponse(resourceGroupName, internetGatewayRuleName, body); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, Context.NONE); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayRuleName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + Response response = createWithResponse(resourceGroupName, internetGatewayRuleName, body, context); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource on successful completion of {@link Mono}. + * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String internetGatewayRuleName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner body) { + return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource along with {@link Response}. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayRuleName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName, context).block(); + public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner body) { + return beginCreate(resourceGroupName, internetGatewayRuleName, body).getFinalResult(); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * Creates an Internet Gateway rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Internet Gateway Rule resource. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { - return getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); + public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner body, Context context) { + return beginCreate(resourceGroupName, internetGatewayRuleName, body, context).getFinalResult(); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -553,129 +484,80 @@ public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayRuleName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. * @param body Internet Gateway Rule properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRulePatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayRuleName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + Context.NONE); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayRuleInner> - beginUpdateAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRulePatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, body, + context); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. * @param body Internet Gateway Rule properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayRuleInner> beginUpdateAsync( - String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, InternetGatewayRuleInner> + beginUpdateAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body, context); + = updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); + this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, + this.client.getContext()); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -689,12 +571,12 @@ private PollerFlux, InternetGatewayRuleInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayRuleInner> beginUpdate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, internetGatewayRuleName, body); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, Context.NONE); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -709,12 +591,12 @@ private PollerFlux, InternetGatewayRuleInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayRuleInner> beginUpdate( String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, internetGatewayRuleName, body, context); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -733,29 +615,6 @@ private Mono updateAsync(String resourceGroupName, Str } /** - * Updates an Internet Gateway Rule. - * - * API to update certain properties of the Internet Gateway Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param body Internet Gateway Rule properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body, Context context) { - return beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -769,12 +628,10 @@ private Mono updateAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { - return updateAsync(resourceGroupName, internetGatewayRuleName, body).block(); + return beginUpdate(resourceGroupName, internetGatewayRuleName, body).getFinalResult(); } /** - * Updates an Internet Gateway Rule. - * * API to update certain properties of the Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -789,12 +646,10 @@ public InternetGatewayRuleInner update(String resourceGroupName, String internet @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { - return updateAsync(resourceGroupName, internetGatewayRuleName, body, context).block(); + return beginUpdate(resourceGroupName, internetGatewayRuleName, body, context).getFinalResult(); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -807,95 +662,51 @@ public InternetGatewayRuleInner update(String resourceGroupName, String internet @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String internetGatewayRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayRuleName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String internetGatewayRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayRuleName == null) { - return Mono.error( - new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayRuleName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String internetGatewayRuleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, Context.NONE); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String internetGatewayRuleName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String internetGatewayRuleName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, context); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -903,17 +714,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String internetGatewayRuleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName, context); + String internetGatewayRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -925,12 +732,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayRuleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -944,12 +750,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayRuleName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -966,27 +771,6 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayR } /** - * Deletes an Internet Gateway Rule. - * - * Implements Internet Gateway Rules DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayRuleName Name of the Internet Gateway rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String internetGatewayRuleName, Context context) { - return beginDeleteAsync(resourceGroupName, internetGatewayRuleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -997,12 +781,10 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayR */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayRuleName) { - deleteAsync(resourceGroupName, internetGatewayRuleName).block(); + beginDelete(resourceGroupName, internetGatewayRuleName).getFinalResult(); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1014,99 +796,64 @@ public void delete(String resourceGroupName, String internetGatewayRuleName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayRuleName, Context context) { - deleteAsync(resourceGroupName, internetGatewayRuleName, context).block(); + beginDelete(resourceGroupName, internetGatewayRuleName, context).getFinalResult(); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1114,33 +861,34 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1148,131 +896,105 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1282,17 +1004,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1302,6 +1018,24 @@ private Mono> listByResourceGroupNextSin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1310,23 +1044,16 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1336,17 +1063,11 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1356,6 +1077,24 @@ private Mono> listBySubscriptionNextSing .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1364,22 +1103,14 @@ private Mono> listBySubscriptionNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGatewayRule items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java index 90285a233f8f..f37893f2cdbc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resou String internetGatewayRuleName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new InternetGatewayRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InternetGatewayRuleImpl(inner.getValue(), this.manager())); } public InternetGatewayRule getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java index ce63280f47f5..8b52280e0028 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewaysListResult; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewaysListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,83 +53,136 @@ public final class InternetGatewaysClientImpl implements InternetGatewaysClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of InternetGatewaysClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternetGatewaysClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternetGatewaysClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(InternetGatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternetGateways to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientInternetGateways to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientInternetGateways") public interface InternetGatewaysService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("internetGatewayName") String internetGatewayName, - @BodyParam("application/json") InternetGatewayInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayName") String internetGatewayName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayName") String internetGatewayName, - @BodyParam("application/json") InternetGatewayPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("internetGatewayName") String internetGatewayName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -163,168 +230,90 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String internetGatewayName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayName, body, accept, context); - } - - /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayInner> - beginCreateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, internetGatewayName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternetGatewayInner.class, InternetGatewayInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayInner> beginCreateAsync( - String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, internetGatewayName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternetGatewayInner.class, InternetGatewayInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, accept, context); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body) { - return this.beginCreateAsync(resourceGroupName, internetGatewayName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); } /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, internetGatewayName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String internetGatewayName, InternetGatewayInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -333,18 +322,19 @@ public SyncPoller, InternetGatewayInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayName, + private Response createWithResponse(String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { - return beginCreateAsync(resourceGroupName, internetGatewayName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + Context.NONE); } /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -354,18 +344,19 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayName, + private Response createWithResponse(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { - return beginCreateAsync(resourceGroupName, internetGatewayName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + context); } /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -374,175 +365,114 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, - InternetGatewayInner body) { - return createAsync(resourceGroupName, internetGatewayName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> + beginCreateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, internetGatewayName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InternetGatewayInner.class, InternetGatewayInner.class, this.client.getContext()); } /** - * Create a Network Fabric Service Internet Gateway. - * * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, - Context context) { - return createAsync(resourceGroupName, internetGatewayName, body, context).block(); - } - - /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayName Name of the Internet Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String internetGatewayName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner body) { + Response response = createWithResponse(resourceGroupName, internetGatewayName, body); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, Context.NONE); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String internetGatewayName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner body, Context context) { + Response response = createWithResponse(resourceGroupName, internetGatewayName, body, context); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, context); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Internet Gateway resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String internetGatewayName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String internetGatewayName, + InternetGatewayInner body) { + return beginCreateAsync(resourceGroupName, internetGatewayName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response}. + * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName, context).block(); + public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, + InternetGatewayInner body) { + return beginCreate(resourceGroupName, internetGatewayName, body).getFinalResult(); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * Creates a Network Fabric Service Internet Gateway resource instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName) { - return getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); + public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, + Context context) { + return beginCreate(resourceGroupName, internetGatewayName, body, context).getFinalResult(); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -552,132 +482,83 @@ public InternetGatewayInner getByResourceGroup(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String internetGatewayName, InternetGatewayPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + Context.NONE); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayInner> - beginUpdateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, internetGatewayName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternetGatewayInner.class, InternetGatewayInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, body, + context); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternetGatewayInner> beginUpdateAsync( - String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, internetGatewayName, body, context); + private PollerFlux, InternetGatewayInner> + beginUpdateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, internetGatewayName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternetGatewayInner.class, InternetGatewayInner.class, context); + InternetGatewayInner.class, InternetGatewayInner.class, this.client.getContext()); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -686,17 +567,17 @@ private PollerFlux, InternetGatewayInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayInner> beginUpdate(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, internetGatewayName, body); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, Context.NONE); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -706,17 +587,17 @@ public SyncPoller, InternetGatewayInner> beginU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayInner> beginUpdate(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, internetGatewayName, body, context); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, context); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -730,34 +611,11 @@ private Mono updateAsync(String resourceGroupName, String } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Internet Gateway resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String internetGatewayName, - InternetGatewayPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, internetGatewayName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Fabric Service Internet Gateway. - * - * Execute patch on Network Fabric Service Internet Gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -766,17 +624,15 @@ private Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { - return updateAsync(resourceGroupName, internetGatewayName, body).block(); + return beginUpdate(resourceGroupName, internetGatewayName, body).getFinalResult(); } /** - * Updates a Network Fabric Service Internet Gateway. - * * Execute patch on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param body API to update certain properties of the InternetGateway resource.. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -786,12 +642,10 @@ public InternetGatewayInner update(String resourceGroupName, String internetGate @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { - return updateAsync(resourceGroupName, internetGatewayName, body, context).block(); + return beginUpdate(resourceGroupName, internetGatewayName, body, context).getFinalResult(); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -804,112 +658,64 @@ public InternetGatewayInner update(String resourceGroupName, String internetGate @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String internetGatewayName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), internetGatewayName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String internetGatewayName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (internetGatewayName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), internetGatewayName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String internetGatewayName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, Context.NONE); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String internetGatewayName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String internetGatewayName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, context); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param internetGatewayName Name of the Internet Gateway. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String internetGatewayName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, internetGatewayName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String internetGatewayName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -921,12 +727,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -940,12 +745,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName, Context context) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -962,27 +766,6 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayN } /** - * Deletes a Network Fabric Service Internet Gateway. - * - * Execute a delete on Network Fabric Service Internet Gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param internetGatewayName Name of the Internet Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String internetGatewayName, Context context) { - return beginDeleteAsync(resourceGroupName, internetGatewayName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -993,12 +776,10 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayN */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayName) { - deleteAsync(resourceGroupName, internetGatewayName).block(); + beginDelete(resourceGroupName, internetGatewayName).getFinalResult(); } /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1010,99 +791,64 @@ public void delete(String resourceGroupName, String internetGatewayName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayName, Context context) { - deleteAsync(resourceGroupName, internetGatewayName, context).block(); + beginDelete(resourceGroupName, internetGatewayName, context).getFinalResult(); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1110,33 +856,34 @@ private PagedFlux listByResourceGroupAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1144,131 +891,105 @@ public PagedIterable listByResourceGroup(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedFlux}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1278,17 +999,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1298,6 +1013,24 @@ private Mono> listByResourceGroupNextSingleP .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1306,23 +1039,15 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1332,17 +1057,11 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1352,6 +1071,24 @@ private Mono> listBySubscriptionNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1360,22 +1097,14 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of InternetGateway items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java index f104baac1302..2f5b824fc2d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceG String internetGatewayName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new InternetGatewayImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InternetGatewayImpl(inner.getValue(), this.manager())); } public InternetGateway getByResourceGroup(String resourceGroupName, String internetGatewayName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java index 028bbd764dc1..1978120f0713 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,13 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitiesListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunitiesListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,81 +53,136 @@ public final class IpCommunitiesClientImpl implements IpCommunitiesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of IpCommunitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpCommunitiesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpCommunitiesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(IpCommunitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpCommunities to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientIpCommunities to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientIpCommunities") public interface IpCommunitiesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipCommunityName") String ipCommunityName, @BodyParam("application/json") IpCommunityInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipCommunityName") String ipCommunityName, @BodyParam("application/json") IpCommunityPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityPatch body, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -134,7 +190,15 @@ Mono> list(@HostParam("$host") String endpoint @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -142,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -161,168 +230,88 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipCommunityName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipCommunityName, body, accept, context); - } - - /** - * Create an IP Community. - * - * Implements an IP Community PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Community resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, ipCommunityName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String ipCommunityName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipCommunityName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, accept, context); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Community resource definition. + * @return the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body) { - return this.beginCreateAsync(resourceGroupName, ipCommunityName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName) { + return getByResourceGroupWithResponse(resourceGroupName, ipCommunityName, Context.NONE).getValue(); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Community resource definition. + * @return the IP Community resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipCommunityName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, + IpCommunityInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -331,18 +320,19 @@ public SyncPoller, IpCommunityInner> beginCreate(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipCommunityName, + private Response createWithResponse(String resourceGroupName, String ipCommunityName, IpCommunityInner body) { - return beginCreateAsync(resourceGroupName, ipCommunityName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, + Context.NONE); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -352,18 +342,18 @@ private Mono createAsync(String resourceGroupName, String ipCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipCommunityName, IpCommunityInner body, - Context context) { - return beginCreateAsync(resourceGroupName, ipCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, context); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -372,169 +362,108 @@ private Mono createAsync(String resourceGroupName, String ipCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body) { - return createAsync(resourceGroupName, ipCommunityName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, + String ipCommunityName, IpCommunityInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, ipCommunityName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, - Context context) { - return createAsync(resourceGroupName, ipCommunityName, body, context).block(); - } - - /** - * Gets an IP Community. - * - * Implements an IP Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipCommunityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner body) { + Response response = createWithResponse(resourceGroupName, ipCommunityName, body); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, Context.NONE); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipCommunityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipCommunityName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner body, Context context) { + Response response = createWithResponse(resourceGroupName, ipCommunityName, body, context); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, context); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String ipCommunityName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipCommunityName, + IpCommunityInner body) { + return beginCreateAsync(resourceGroupName, ipCommunityName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response}. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName, context).block(); + public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body) { + return beginCreate(resourceGroupName, ipCommunityName, body).getFinalResult(); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName) { - return getByResourceGroupWithResponse(resourceGroupName, ipCommunityName, Context.NONE).getValue(); + public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, + Context context) { + return beginCreate(resourceGroupName, ipCommunityName, body, context).getFinalResult(); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -549,109 +478,61 @@ public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCo @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String ipCommunityName, IpCommunityPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. * @param body IP Community properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipCommunityName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, + Context.NONE); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. * @param body IP Community properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginUpdateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipCommunityName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, body, context); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. * @param body IP Community properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -659,17 +540,13 @@ private PollerFlux, IpCommunityInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginUpdateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipCommunityName, body, context); + String ipCommunityName, IpCommunityPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, ipCommunityName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, context); + IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -683,12 +560,12 @@ private PollerFlux, IpCommunityInner> beginUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, String ipCommunityName, IpCommunityPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipCommunityName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipCommunityName, body); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, Context.NONE); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -703,12 +580,12 @@ public SyncPoller, IpCommunityInner> beginUpdate(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipCommunityName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipCommunityName, body, context); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, context); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -727,29 +604,6 @@ private Mono updateAsync(String resourceGroupName, String ipCo } /** - * Updates an IP Community. - * - * API to update certain properties of the IP Community resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, ipCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -762,12 +616,10 @@ private Mono updateAsync(String resourceGroupName, String ipCo */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body) { - return updateAsync(resourceGroupName, ipCommunityName, body).block(); + return beginUpdate(resourceGroupName, ipCommunityName, body).getFinalResult(); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -782,12 +634,10 @@ public IpCommunityInner update(String resourceGroupName, String ipCommunityName, @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, Context context) { - return updateAsync(resourceGroupName, ipCommunityName, body, context).block(); + return beginUpdate(resourceGroupName, ipCommunityName, body, context).getFinalResult(); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -799,111 +649,63 @@ public IpCommunityInner update(String resourceGroupName, String ipCommunityName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipCommunityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipCommunityName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipCommunityName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipCommunityName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, Context.NONE); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipCommunityName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipCommunityName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, context); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipCommunityName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipCommunityName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -915,12 +717,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName) { - return this.beginDeleteAsync(resourceGroupName, ipCommunityName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipCommunityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -934,12 +735,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipCommunityName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipCommunityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -956,27 +756,6 @@ private Mono deleteAsync(String resourceGroupName, String ipCommunityName) } /** - * Deletes an IP Community. - * - * Implements IP Community DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String ipCommunityName, Context context) { - return beginDeleteAsync(resourceGroupName, ipCommunityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -987,12 +766,10 @@ private Mono deleteAsync(String resourceGroupName, String ipCommunityName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipCommunityName) { - deleteAsync(resourceGroupName, ipCommunityName).block(); + beginDelete(resourceGroupName, ipCommunityName).getFinalResult(); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1004,99 +781,64 @@ public void delete(String resourceGroupName, String ipCommunityName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipCommunityName, Context context) { - deleteAsync(resourceGroupName, ipCommunityName, context).block(); + beginDelete(resourceGroupName, ipCommunityName, context).getFinalResult(); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedFlux}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1104,33 +846,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedFlux}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1138,131 +880,105 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedFlux}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedFlux}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1272,17 +988,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1292,6 +1002,24 @@ private Mono> listByResourceGroupNextSinglePageA .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1300,23 +1028,15 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1326,17 +1046,11 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1346,6 +1060,24 @@ private Mono> listBySubscriptionNextSinglePageAs .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1354,22 +1086,14 @@ private Mono> listBySubscriptionNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpCommunity items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java index 5906922b8461..03daf18ed08f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGroup Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, ipCommunityName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new IpCommunityImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new IpCommunityImpl(inner.getValue(), this.manager())); } public IpCommunity getByResourceGroup(String resourceGroupName, String ipCommunityName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java index b7738fe66401..b0e87d9d21e8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -52,16 +53,12 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public String annotation() { + return this.innerModel().annotation(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); } public List ipCommunityRules() { @@ -73,8 +70,20 @@ public List ipCommunityRules() { } } - public String annotation() { - return this.innerModel().annotation(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -182,22 +191,22 @@ public IpCommunityImpl withRegion(String location) { return this; } - public IpCommunityImpl withTags(Map tags) { + public IpCommunityImpl withIpCommunityRules(List ipCommunityRules) { if (isInCreateMode()) { - this.innerModel().withTags(tags); + this.innerModel().withIpCommunityRules(ipCommunityRules); return this; } else { - this.updateBody.withTags(tags); + this.updateBody.withIpCommunityRules(ipCommunityRules); return this; } } - public IpCommunityImpl withIpCommunityRules(List ipCommunityRules) { + public IpCommunityImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withIpCommunityRules(ipCommunityRules); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withIpCommunityRules(ipCommunityRules); + this.updateBody.withTags(tags); return this; } } @@ -208,6 +217,6 @@ public IpCommunityImpl withAnnotation(String annotation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java index 46d36c01e892..137bc4626d07 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,13 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,83 +53,136 @@ public final class IpExtendedCommunitiesClientImpl implements IpExtendedCommunit /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of IpExtendedCommunitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpExtendedCommunitiesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpExtendedCommunitiesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(IpExtendedCommunitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpExtendedCommunities to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientIpExtendedCommunities to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientIpExtendedCommunities") public interface IpExtendedCommunitiesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, - @BodyParam("application/json") IpExtendedCommunityInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, - @BodyParam("application/json") IpExtendedCommunityPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") String en @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -163,170 +230,91 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipExtendedCommunityName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context); - } - - /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> - beginCreateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String ipExtendedCommunityName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> beginCreateAsync( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String ipExtendedCommunityName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, accept, context); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. + * @return the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpExtendedCommunityInner> - beginCreate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { - return this.beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { + return getByResourceGroupWithResponse(resourceGroupName, ipExtendedCommunityName, Context.NONE).getValue(); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpExtendedCommunityInner> beginCreate( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String ipExtendedCommunityName, IpExtendedCommunityInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -335,18 +323,19 @@ public SyncPoller, IpExtendedCommunityInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, + private Response createWithResponse(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { - return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + Context.NONE); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -356,18 +345,19 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, + private Response createWithResponse(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + context); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -376,171 +366,111 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body) { - return createAsync(resourceGroupName, ipExtendedCommunityName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpExtendedCommunityInner> + beginCreateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, + this.client.getContext()); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body, Context context) { - return createAsync(resourceGroupName, ipExtendedCommunityName, body, context).block(); - } - - /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpExtendedCommunityInner> + beginCreate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { + Response response = createWithResponse(resourceGroupName, ipExtendedCommunityName, body); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, Context.NONE); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipExtendedCommunityName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpExtendedCommunityInner> beginCreate( + String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { + Response response = createWithResponse(resourceGroupName, ipExtendedCommunityName, body, context); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String ipExtendedCommunityName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner body) { + return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response}. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName, context).block(); + public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner body) { + return beginCreate(resourceGroupName, ipExtendedCommunityName, body).getFinalResult(); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { - return getByResourceGroupWithResponse(resourceGroupName, ipExtendedCommunityName, Context.NONE).getValue(); + public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner body, Context context) { + return beginCreate(resourceGroupName, ipExtendedCommunityName, body, context).getFinalResult(); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -555,129 +485,80 @@ public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + Context.NONE); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. * @param body IP Extended Community properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> - beginUpdateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, body, + context); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> beginUpdateAsync( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, IpExtendedCommunityInner> + beginUpdateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body, context); + = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); + this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, + this.client.getContext()); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -691,12 +572,12 @@ private PollerFlux, IpExtendedCommunityInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginUpdate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipExtendedCommunityName, body); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, Context.NONE); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -711,12 +592,12 @@ private PollerFlux, IpExtendedCommunityInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginUpdate( String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipExtendedCommunityName, body, context); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -735,29 +616,6 @@ private Mono updateAsync(String resourceGroupName, Str } /** - * Updates the IP Extended Community. - * - * API to update certain properties of the IP Extended Community resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Extended Community resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -771,12 +629,10 @@ private Mono updateAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - return updateAsync(resourceGroupName, ipExtendedCommunityName, body).block(); + return beginUpdate(resourceGroupName, ipExtendedCommunityName, body).getFinalResult(); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -791,12 +647,10 @@ public IpExtendedCommunityInner update(String resourceGroupName, String ipExtend @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - return updateAsync(resourceGroupName, ipExtendedCommunityName, body, context).block(); + return beginUpdate(resourceGroupName, ipExtendedCommunityName, body, context).getFinalResult(); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -809,95 +663,51 @@ public IpExtendedCommunityInner update(String resourceGroupName, String ipExtend @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipExtendedCommunityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipExtendedCommunityName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipExtendedCommunityName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, Context.NONE); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String ipExtendedCommunityName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipExtendedCommunityName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, context); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -905,17 +715,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName, context); + String ipExtendedCommunityName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -927,12 +733,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName) { - return this.beginDeleteAsync(resourceGroupName, ipExtendedCommunityName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipExtendedCommunityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -946,12 +751,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipExtendedCommunityName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipExtendedCommunityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -968,27 +772,6 @@ private Mono deleteAsync(String resourceGroupName, String ipExtendedCommun } /** - * Deletes the IP Extended Community. - * - * Implements IP Extended Community DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String ipExtendedCommunityName, Context context) { - return beginDeleteAsync(resourceGroupName, ipExtendedCommunityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -999,12 +782,10 @@ private Mono deleteAsync(String resourceGroupName, String ipExtendedCommun */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipExtendedCommunityName) { - deleteAsync(resourceGroupName, ipExtendedCommunityName).block(); + beginDelete(resourceGroupName, ipExtendedCommunityName).getFinalResult(); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1016,101 +797,64 @@ public void delete(String resourceGroupName, String ipExtendedCommunityName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipExtendedCommunityName, Context context) { - deleteAsync(resourceGroupName, ipExtendedCommunityName, context).block(); + beginDelete(resourceGroupName, ipExtendedCommunityName, context).getFinalResult(); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1118,33 +862,34 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1152,133 +897,105 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1288,18 +1005,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1309,6 +1019,24 @@ private Mono> listByResourceGroupNextSin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1317,24 +1045,16 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1344,18 +1064,11 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1365,6 +1078,24 @@ private Mono> listBySubscriptionNextSing .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1373,23 +1104,14 @@ private Mono> listBySubscriptionNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java index 157c39f359e9..8f9c5c97a4ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resou String ipExtendedCommunityName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, ipExtendedCommunityName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new IpExtendedCommunityImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new IpExtendedCommunityImpl(inner.getValue(), this.manager())); } public IpExtendedCommunity getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java index 537c0659906f..b7e9c318f28f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -53,16 +54,8 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String annotation() { + return this.innerModel().annotation(); } public List ipExtendedCommunityRules() { @@ -74,8 +67,24 @@ public List ipExtendedCommunityRules() { } } - public String annotation() { - return this.innerModel().annotation(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -216,6 +225,6 @@ public IpExtendedCommunityImpl withAnnotation(String annotation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java index 5cc40fad97da..951845bd7c35 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -52,16 +53,12 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public String annotation() { + return this.innerModel().annotation(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); } public List ipPrefixRules() { @@ -73,8 +70,20 @@ public List ipPrefixRules() { } } - public String annotation() { - return this.innerModel().annotation(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -182,22 +191,22 @@ public IpPrefixImpl withRegion(String location) { return this; } - public IpPrefixImpl withTags(Map tags) { + public IpPrefixImpl withIpPrefixRules(List ipPrefixRules) { if (isInCreateMode()) { - this.innerModel().withTags(tags); + this.innerModel().withIpPrefixRules(ipPrefixRules); return this; } else { - this.updateBody.withTags(tags); + this.updateBody.withIpPrefixRules(ipPrefixRules); return this; } } - public IpPrefixImpl withIpPrefixRules(List ipPrefixRules) { + public IpPrefixImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withIpPrefixRules(ipPrefixRules); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withIpPrefixRules(ipPrefixRules); + this.updateBody.withTags(tags); return this; } } @@ -213,6 +222,6 @@ public IpPrefixImpl withAnnotation(String annotation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java index bb4cfd0a9681..24adb33eeb68 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixesListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,79 +53,130 @@ public final class IpPrefixesClientImpl implements IpPrefixesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of IpPrefixesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpPrefixesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpPrefixesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(IpPrefixesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpPrefixes to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientIpPrefixes to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientIpPrefixes") public interface IpPrefixesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipPrefixName") String ipPrefixName, @BodyParam("application/json") IpPrefixInner body, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixInner body, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipPrefixName") String ipPrefixName, @BodyParam("application/json") IpPrefixPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -132,7 +184,15 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -140,182 +200,111 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipPrefixName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipPrefixName, body, accept, context); - } - - /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String ipPrefixName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, accept, context); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, - String ipPrefixName, IpPrefixInner body) { - return this.beginCreateAsync(resourceGroupName, ipPrefixName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName) { + return getByResourceGroupWithResponse(resourceGroupName, ipPrefixName, Context.NONE).getValue(); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, - String ipPrefixName, IpPrefixInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipPrefixName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, + IpPrefixInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -324,17 +313,17 @@ public SyncPoller, IpPrefixInner> beginCreate(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { - return beginCreateAsync(resourceGroupName, ipPrefixName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, Context.NONE); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -344,18 +333,18 @@ private Mono createAsync(String resourceGroupName, String ipPrefi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body, + private Response createWithResponse(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context) { - return beginCreateAsync(resourceGroupName, ipPrefixName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, context); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -364,164 +353,106 @@ private Mono createAsync(String resourceGroupName, String ipPrefi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { - return createAsync(resourceGroupName, ipPrefixName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, + String ipPrefixName, IpPrefixInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context) { - return createAsync(resourceGroupName, ipPrefixName, body, context).block(); - } - - /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipPrefixName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, + String ipPrefixName, IpPrefixInner body) { + Response response = createWithResponse(resourceGroupName, ipPrefixName, body); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, Context.NONE); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipPrefixName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipPrefixName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, + String ipPrefixName, IpPrefixInner body, Context context) { + Response response = createWithResponse(resourceGroupName, ipPrefixName, body, context); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, context); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String ipPrefixName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { + return beginCreateAsync(resourceGroupName, ipPrefixName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName, context).block(); + public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { + return beginCreate(resourceGroupName, ipPrefixName, body).getFinalResult(); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName) { - return getByResourceGroupWithResponse(resourceGroupName, ipPrefixName, Context.NONE).getValue(); + public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context) { + return beginCreate(resourceGroupName, ipPrefixName, body, context).getFinalResult(); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -535,106 +466,60 @@ public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefi @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. * @param body IP Prefix properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipPrefixName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, Context.NONE); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. * @param body IP Prefix properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginUpdateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, body, context); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. * @param body IP Prefix properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -642,16 +527,13 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginUpdateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, body, context); + String ipPrefixName, IpPrefixPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, context); + IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -665,12 +547,12 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipPrefixName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipPrefixName, body); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, Context.NONE); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -685,12 +567,12 @@ public SyncPoller, IpPrefixInner> beginUpdate(String r @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipPrefixName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, ipPrefixName, body, context); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, context); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -708,29 +590,6 @@ private Mono updateAsync(String resourceGroupName, String ipPrefi } /** - * Updates the IP Prefix. - * - * API to update certain properties of the IP Prefix resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Prefix resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, ipPrefixName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -743,12 +602,10 @@ private Mono updateAsync(String resourceGroupName, String ipPrefi */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { - return updateAsync(resourceGroupName, ipPrefixName, body).block(); + return beginUpdate(resourceGroupName, ipPrefixName, body).getFinalResult(); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -762,12 +619,10 @@ public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPre */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context) { - return updateAsync(resourceGroupName, ipPrefixName, body, context).block(); + return beginUpdate(resourceGroupName, ipPrefixName, body, context).getFinalResult(); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -779,109 +634,63 @@ public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPre */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipPrefixName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipPrefixName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipPrefixName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipPrefixName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, Context.NONE); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipPrefixName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipPrefixName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, context); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipPrefixName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipPrefixName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -893,12 +702,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName) { - return this.beginDeleteAsync(resourceGroupName, ipPrefixName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipPrefixName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -912,12 +720,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipPrefixName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipPrefixName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -933,27 +740,6 @@ private Mono deleteAsync(String resourceGroupName, String ipPrefixName) { } /** - * Deletes the IP Prefix. - * - * Implements IP Prefix DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String ipPrefixName, Context context) { - return beginDeleteAsync(resourceGroupName, ipPrefixName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +750,10 @@ private Mono deleteAsync(String resourceGroupName, String ipPrefixName, Co */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipPrefixName) { - deleteAsync(resourceGroupName, ipPrefixName).block(); + beginDelete(resourceGroupName, ipPrefixName).getFinalResult(); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -981,99 +765,64 @@ public void delete(String resourceGroupName, String ipPrefixName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipPrefixName, Context context) { - deleteAsync(resourceGroupName, ipPrefixName, context).block(); + beginDelete(resourceGroupName, ipPrefixName, context).getFinalResult(); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedFlux}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1081,33 +830,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedFlux}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1115,131 +864,105 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedFlux}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedFlux}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1249,17 +972,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1269,6 +986,24 @@ private Mono> listByResourceGroupNextSinglePageAsyn .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1277,23 +1012,15 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1303,17 +1030,11 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1323,6 +1044,24 @@ private Mono> listBySubscriptionNextSinglePageAsync .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1331,21 +1070,14 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of IpPrefix items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java index 55bce95489e4..f515be3c742d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupNam Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, ipPrefixName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new IpPrefixImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new IpPrefixImpl(inner.getValue(), this.manager())); } public IpPrefix getByResourceGroup(String resourceGroupName, String ipPrefixName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java index ed46f264bc3b..1233bde7ca86 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,13 +9,17 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; import java.util.Map; @@ -51,6 +55,10 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -67,6 +75,18 @@ public Integer mtu() { return this.innerModel().mtu(); } + public ExtendedVlan extendedVlan() { + return this.innerModel().extendedVlan(); + } + + public String networkToNetworkInterconnectId() { + return this.innerModel().networkToNetworkInterconnectId(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -178,12 +198,12 @@ public L2IsolationDomain refresh(Context context) { return this; } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.l2IsolationDomains() .updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.l2IsolationDomains() .updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context); @@ -237,6 +257,11 @@ public L2IsolationDomainImpl withTags(Map tags) { } } + public L2IsolationDomainImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + public L2IsolationDomainImpl withMtu(Integer mtu) { if (isInCreateMode()) { this.innerModel().withMtu(mtu); @@ -247,6 +272,26 @@ public L2IsolationDomainImpl withMtu(Integer mtu) { } } + public L2IsolationDomainImpl withExtendedVlan(ExtendedVlan extendedVlan) { + if (isInCreateMode()) { + this.innerModel().withExtendedVlan(extendedVlan); + return this; + } else { + this.updateBody.withExtendedVlan(extendedVlan); + return this; + } + } + + public L2IsolationDomainImpl withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + if (isInCreateMode()) { + this.innerModel().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); + return this; + } else { + this.updateBody.withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); + return this; + } + } + public L2IsolationDomainImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -257,7 +302,12 @@ public L2IsolationDomainImpl withAnnotation(String annotation) { } } + public L2IsolationDomainImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java index 7e5e49ba7901..b1e1bf175426 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,17 +29,18 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -57,86 +58,175 @@ public final class L2IsolationDomainsClientImpl implements L2IsolationDomainsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of L2IsolationDomainsClientImpl. * * @param client the instance of the service client containing this operation class. */ - L2IsolationDomainsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + L2IsolationDomainsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(L2IsolationDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiL2IsolationDomains to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientL2IsolationDomains to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientL2IsolationDomains") public interface L2IsolationDomainsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") L2IsolationDomainInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") L2IsolationDomainPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @@ -144,55 +234,60 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> commitConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -200,133 +295,67 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + private Mono getByResourceGroupAsync(String resourceGroupName, + String l2IsolationDomainName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> - beginCreateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context); } /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> beginCreateAsync( - String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { + return getByResourceGroupWithResponse(resourceGroupName, l2IsolationDomainName, Context.NONE).getValue(); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -336,59 +365,44 @@ private PollerFlux, L2IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body) { - return this.beginCreateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l2IsolationDomainName, body, context).getSyncPoller(); - } - - /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l2IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body) { - return beginCreateAsync(resourceGroupName, l2IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -399,18 +413,19 @@ private Mono createAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l2IsolationDomainName, + private Response createWithResponse(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - return beginCreateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * @@ -420,172 +435,115 @@ private Mono createAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body) { - return createAsync(resourceGroupName, l2IsolationDomainName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, L2IsolationDomainInner> + beginCreateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, + this.client.getContext()); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body, Context context) { - return createAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); - } - - /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainInner body) { + Response response = createWithResponse(resourceGroupName, l2IsolationDomainName, body); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, Context.NONE); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { + Response response = createWithResponse(resourceGroupName, l2IsolationDomainName, body, context); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String l2IsolationDomainName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner body) { + return beginCreateAsync(resourceGroupName, l2IsolationDomainName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName, context).block(); + public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner body) { + return beginCreate(resourceGroupName, l2IsolationDomainName, body).getFinalResult(); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { - return getByResourceGroupWithResponse(resourceGroupName, l2IsolationDomainName, Context.NONE).getValue(); + public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner body, Context context) { + return beginCreate(resourceGroupName, l2IsolationDomainName, body, context).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -600,128 +558,79 @@ public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> - beginUpdateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> beginUpdateAsync( - String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); + private PollerFlux, L2IsolationDomainInner> + beginUpdateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); + this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, + this.client.getContext()); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -735,12 +644,12 @@ private PollerFlux, L2IsolationDomainInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { - return this.beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, l2IsolationDomainName, body); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, Context.NONE); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -755,12 +664,12 @@ public SyncPoller, L2IsolationDomainInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, l2IsolationDomainName, body, context); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -773,35 +682,12 @@ public SyncPoller, L2IsolationDomainInner> be */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body) { - return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() + L2IsolationDomainPatch body) { + return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -815,12 +701,10 @@ private Mono updateAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { - return updateAsync(resourceGroupName, l2IsolationDomainName, body).block(); + return beginUpdate(resourceGroupName, l2IsolationDomainName, body).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -835,12 +719,10 @@ public L2IsolationDomainInner update(String resourceGroupName, String l2Isolatio @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - return updateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + return beginUpdate(resourceGroupName, l2IsolationDomainName, body, context).getFinalResult(); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -853,113 +735,65 @@ public L2IsolationDomainInner update(String resourceGroupName, String l2Isolatio @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l2IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l2IsolationDomainName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, Context.NONE); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String l2IsolationDomainName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l2IsolationDomainName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, context); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l2IsolationDomainName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String l2IsolationDomainName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -971,12 +805,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName) { - return this.beginDeleteAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -990,12 +823,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1012,149 +844,256 @@ private Mono deleteAsync(String resourceGroupName, String l2IsolationDomai } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - return beginDeleteAsync(resourceGroupName, l2IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String l2IsolationDomainName) { + beginDelete(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String l2IsolationDomainName) { - deleteAsync(resourceGroupName, l2IsolationDomainName).block(); + public void delete(String resourceGroupName, String l2IsolationDomainName, Context context) { + beginDelete(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * Deletes the L2 Isolation Domain. + * Displays L2IsolationDomains list by resource group GET method. * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String l2IsolationDomainName, Context context) { - deleteAsync(resourceGroupName, l2IsolationDomainName, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Implements the operation to the underlying resources. + * Displays L2IsolationDomains list by resource group GET method. * - * Enables isolation domain across the fabric or on specified racks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Displays L2IsolationDomains list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + String l2IsolationDomainName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1163,24 +1102,19 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l2IsolationDomainName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1190,25 +1124,19 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l2IsolationDomainName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1217,83 +1145,83 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, + private PollerFlux, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + Mono>> mono + = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, - UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context) - .getSyncPoller(); + UpdateAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l2IsolationDomainName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, + UpdateAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l2IsolationDomainName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1302,17 +1230,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, l2IsolationDomainName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1322,12 +1248,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context).getFinalResult(); } /** @@ -1338,33 +1264,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String l2IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1373,36 +1282,17 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, Context.NONE); } /** @@ -1410,19 +1300,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context); } /** @@ -1430,21 +1319,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1455,12 +1342,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1472,12 +1361,15 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1488,7 +1380,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1497,24 +1389,6 @@ private Mono validateConfigurationAsync(Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validates the configuration of the resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Validates the configuration of the resources. * @@ -1523,12 +1397,12 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); + return beginValidateConfiguration(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** @@ -1540,17 +1414,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); + return beginValidateConfiguration(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1558,128 +1430,78 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, String l2IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String l2IsolationDomainName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1687,18 +1509,20 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1707,18 +1531,21 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + Response response + = commitConfigurationWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1726,7 +1553,7 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -1736,28 +1563,6 @@ private Mono commitConfigurationAsy } /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1765,17 +1570,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); + return beginCommitConfiguration(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1784,270 +1587,70 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); + return beginCommitConfiguration(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * Get the next page of items. * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2057,53 +1660,20 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * Get the next page of items. * @@ -2111,24 +1681,15 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2139,22 +1700,14 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L2IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java index 15c56c5144f9..c4a7ab89df0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,15 +10,15 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class L2IsolationDomainsImpl implements L2IsolationDomains { @@ -38,12 +38,8 @@ public Response getByResourceGroupWithResponse(String resourc String l2IsolationDomainName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l2IsolationDomainName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new L2IsolationDomainImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new L2IsolationDomainImpl(inner.getValue(), this.manager())); } public L2IsolationDomain getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { @@ -64,23 +60,44 @@ public void delete(String resourceGroupName, String l2IsolationDomainName, Conte this.serviceClient().delete(resourceGroupName, l2IsolationDomainName, context); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - CommonPostActionResponseForDeviceUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } @@ -129,27 +146,6 @@ public CommonPostActionResponseForStateUpdate commitConfiguration(String resourc } } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - public L2IsolationDomain getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java index e0616a07b263..e4d9c068201d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,16 +10,28 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; import java.util.Map; @@ -55,24 +67,16 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String networkFabricId() { - return this.innerModel().networkFabricId(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String annotation() { + return this.innerModel().annotation(); } public RedistributeConnectedSubnets redistributeConnectedSubnets() { @@ -91,8 +95,44 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { return this.innerModel().connectedSubnetRoutePolicy(); } - public String annotation() { - return this.innerModel().annotation(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public StaticRouteRoutePolicy staticRouteRoutePolicy() { + return this.innerModel().staticRouteRoutePolicy(); + } + + public L3UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.innerModel().uniqueRdConfiguration(); + } + + public RoutePrefixLimitProperties v4routePrefixLimit() { + return this.innerModel().v4routePrefixLimit(); + } + + public RoutePrefixLimitProperties v6routePrefixLimit() { + return this.innerModel().v6routePrefixLimit(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public BmpExportPolicyProperties exportPolicyConfiguration() { + return this.innerModel().exportPolicyConfiguration(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -190,12 +230,12 @@ public L3IsolationDomain refresh(Context context) { return this; } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.l3IsolationDomains() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.l3IsolationDomains() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); @@ -244,6 +284,21 @@ public L3IsolationDomainImpl withTags(Map tags) { } } + public L3IsolationDomainImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public L3IsolationDomainImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + public L3IsolationDomainImpl withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets) { if (isInCreateMode()) { @@ -267,36 +322,79 @@ public L3IsolationDomainImpl withRedistributeStaticRoutes(RedistributeStaticRout public L3IsolationDomainImpl withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { - if (isInCreateMode()) { - this.innerModel().withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } else { - this.updateBody.withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } + this.innerModel().withAggregateRouteConfiguration(aggregateRouteConfiguration); + return this; } public L3IsolationDomainImpl withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); - return this; - } else { - this.updateBody.withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); - return this; - } + this.innerModel().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + return this; } - public L3IsolationDomainImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public L3IsolationDomainImpl withStaticRouteRoutePolicy(StaticRouteRoutePolicy staticRouteRoutePolicy) { + this.innerModel().withStaticRouteRoutePolicy(staticRouteRoutePolicy); + return this; + } + + public L3IsolationDomainImpl withUniqueRdConfiguration(L3UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.innerModel().withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + public L3IsolationDomainImpl withV4routePrefixLimit(RoutePrefixLimitProperties v4routePrefixLimit) { + this.innerModel().withV4routePrefixLimit(v4routePrefixLimit); + return this; + } + + public L3IsolationDomainImpl withV6routePrefixLimit(RoutePrefixLimitProperties v6routePrefixLimit) { + this.innerModel().withV6routePrefixLimit(v6routePrefixLimit); + return this; + } + + public L3IsolationDomainImpl withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration) { + this.innerModel().withExportPolicyConfiguration(exportPolicyConfiguration); + return this; + } + + public L3IsolationDomainImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public L3IsolationDomainImpl + withAggregateRouteConfiguration(AggregateRoutePatchConfiguration aggregateRouteConfiguration) { + this.updateBody.withAggregateRouteConfiguration(aggregateRouteConfiguration); + return this; + } + + public L3IsolationDomainImpl + withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy) { + this.updateBody.withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + return this; + } + + public L3IsolationDomainImpl withStaticRouteRoutePolicy(StaticRouteRoutePolicyPatch staticRouteRoutePolicy) { + this.updateBody.withStaticRouteRoutePolicy(staticRouteRoutePolicy); + return this; + } + + public L3IsolationDomainImpl withV4routePrefixLimit(RoutePrefixLimitPatchProperties v4routePrefixLimit) { + this.updateBody.withV4routePrefixLimit(v4routePrefixLimit); + return this; + } + + public L3IsolationDomainImpl withV6routePrefixLimit(RoutePrefixLimitPatchProperties v6routePrefixLimit) { + this.updateBody.withV6routePrefixLimit(v6routePrefixLimit); + return this; + } + + public L3IsolationDomainImpl + withExportPolicyConfiguration(BmpExportPolicyPatchProperties exportPolicyConfiguration) { + this.updateBody.withExportPolicyConfiguration(exportPolicyConfiguration); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java index e3dbd7ee6456..7a2a6e6c8c86 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,17 +29,18 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -57,103 +58,185 @@ public final class L3IsolationDomainsClientImpl implements L3IsolationDomainsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of L3IsolationDomainsClientImpl. * * @param client the instance of the service client containing this operation class. */ - L3IsolationDomainsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + L3IsolationDomainsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(L3IsolationDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiL3IsolationDomains to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientL3IsolationDomains to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientL3IsolationDomains") public interface L3IsolationDomainsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") L3IsolationDomainInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") L3IsolationDomainPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @@ -161,9 +244,9 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> commitConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @@ -172,7 +255,15 @@ Mono>> commitConfiguration(@HostParam("$host") String @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -180,20 +271,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -201,39 +295,67 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L3 Isolation Domain. + * Retrieves details of this L3 Isolation Domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String l3IsolationDomainName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves details of this L3 Isolation Domain. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L3 Isolation Domain resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); + } + + /** + * Retrieves details of this L3 Isolation Domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the L3 Isolation Domain resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { + return getByResourceGroupWithResponse(resourceGroupName, l3IsolationDomainName, Context.NONE).getValue(); + } + + /** * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -241,7 +363,6 @@ private Mono>> createWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -250,37 +371,17 @@ private Mono>> createWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + String l3IsolationDomainName, L3IsolationDomainInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -291,20 +392,19 @@ private Mono>> createWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> - beginCreateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -316,21 +416,19 @@ private Mono>> createWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -341,17 +439,18 @@ private PollerFlux, L3IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + private PollerFlux, L3IsolationDomainInner> + beginCreateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, + this.client.getContext()); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -359,7 +458,6 @@ public SyncPoller, L3IsolationDomainInner> be * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -367,13 +465,13 @@ public SyncPoller, L3IsolationDomainInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, body, context).getSyncPoller(); + String l3IsolationDomainName, L3IsolationDomainInner body) { + Response response = createWithResponse(resourceGroupName, l3IsolationDomainName, body); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, Context.NONE); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -381,21 +479,21 @@ public SyncPoller, L3IsolationDomainInner> be * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { + Response response = createWithResponse(resourceGroupName, l3IsolationDomainName, body, context); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -403,7 +501,6 @@ private Mono createAsync(String resourceGroupName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -411,14 +508,12 @@ private Mono createAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() + L3IsolationDomainInner body) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -434,12 +529,10 @@ private Mono createAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, body).block(); + return beginCreate(resourceGroupName, l3IsolationDomainName, body).getFinalResult(); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. @@ -456,16 +549,15 @@ public L3IsolationDomainInner create(String resourceGroupName, String l3Isolatio @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + return beginCreate(resourceGroupName, l3IsolationDomainName, body, context).getFinalResult(); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param body API to update certain properties of the L3 Isolation Domain resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -473,129 +565,18 @@ public L3IsolationDomainInner create(String resourceGroupName, String l3Isolatio * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context); - } - - /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String l3IsolationDomainName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName, context).block(); - } - - /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { - return getByResourceGroupWithResponse(resourceGroupName, l3IsolationDomainName, Context.NONE).getValue(); - } - - /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -604,43 +585,19 @@ public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -650,42 +607,19 @@ private Mono>> updateWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -706,32 +640,6 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Updates a L3 Isolation Domain. - * - * API to update certain properties of the L3 Isolation Domain resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); - } - - /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -745,12 +653,12 @@ private PollerFlux, L3IsolationDomainInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, l3IsolationDomainName, body); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, Context.NONE); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -765,12 +673,12 @@ public SyncPoller, L3IsolationDomainInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, l3IsolationDomainName, body, context); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -789,29 +697,6 @@ private Mono updateAsync(String resourceGroupName, Strin } /** - * Updates a L3 Isolation Domain. - * - * API to update certain properties of the L3 Isolation Domain resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -825,12 +710,10 @@ private Mono updateAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, body).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, body).getFinalResult(); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -845,12 +728,10 @@ public L3IsolationDomainInner update(String resourceGroupName, String l3Isolatio @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + return beginUpdate(resourceGroupName, l3IsolationDomainName, body, context).getFinalResult(); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -863,113 +744,65 @@ public L3IsolationDomainInner update(String resourceGroupName, String l3Isolatio @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, Context.NONE); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String l3IsolationDomainName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, context); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String l3IsolationDomainName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -981,12 +814,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1000,12 +832,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1022,27 +853,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a L3 Isolation Domain. - * - * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1053,12 +863,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName) { - deleteAsync(resourceGroupName, l3IsolationDomainName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1070,99 +878,64 @@ public void delete(String resourceGroupName, String l3IsolationDomainName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1170,33 +943,34 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1204,137 +978,109 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1342,142 +1088,87 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1485,20 +1176,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1507,21 +1199,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1529,40 +1221,17 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1570,18 +1239,16 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, body).getFinalResult(); } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1590,12 +1257,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context).getFinalResult(); } /** @@ -1606,33 +1273,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1641,36 +1291,17 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); } /** @@ -1678,19 +1309,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); } /** @@ -1698,21 +1328,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1723,12 +1351,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1740,12 +1370,15 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1756,7 +1389,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1765,24 +1398,6 @@ private Mono validateConfigurationAsync(Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validates the configuration of the resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Validates the configuration of the resources. * @@ -1791,12 +1406,12 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); + return beginValidateConfiguration(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** @@ -1808,17 +1423,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); + return beginValidateConfiguration(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1826,128 +1439,78 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String l3IsolationDomainName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1955,18 +1518,20 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1975,18 +1540,21 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response + = commitConfigurationWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1994,7 +1562,7 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -2004,28 +1572,6 @@ private Mono commitConfigurationAsy } /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2033,17 +1579,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); + return beginCommitConfiguration(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2052,12 +1596,12 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); + return beginCommitConfiguration(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** @@ -2067,17 +1611,11 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2087,6 +1625,24 @@ private Mono> listByResourceGroupNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2095,23 +1651,15 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2121,17 +1669,11 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2141,6 +1683,24 @@ private Mono> listBySubscriptionNextSingle .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2149,22 +1709,14 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of L3IsolationDomain items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java index ca4786525b97..c2c817d5bdcc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,15 +10,15 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class L3IsolationDomainsImpl implements L3IsolationDomains { @@ -38,12 +38,8 @@ public Response getByResourceGroupWithResponse(String resourc String l3IsolationDomainName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l3IsolationDomainName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new L3IsolationDomainImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new L3IsolationDomainImpl(inner.getValue(), this.manager())); } public L3IsolationDomain getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { @@ -85,23 +81,23 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new L3IsolationDomainImpl(inner1, this.manager())); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - CommonPostActionResponseForDeviceUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientBuilder.java similarity index 62% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientBuilder.java index d5b2c4cd9645..9eff4663fd9c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AzureNetworkFabricManagementServiceApiImpl type. + * A builder for creating a new instance of the ManagedNetworkFabricManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureNetworkFabricManagementServiceApiImpl.class }) -public final class AzureNetworkFabricManagementServiceApiBuilder { +@ServiceClientBuilder(serviceClients = { ManagedNetworkFabricManagementClientImpl.class }) +public final class ManagedNetworkFabricManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @param endpoint the endpoint value. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ManagedNetworkFabricManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @param subscriptionId the subscriptionId value. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ManagedNetworkFabricManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AzureNetworkFabricManagementServiceApiBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder environment(AzureEnvironment environment) { + public ManagedNetworkFabricManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AzureNetworkFabricManagementServiceApiBuilder environment(AzureEnvironmen * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder pipeline(HttpPipeline pipeline) { + public ManagedNetworkFabricManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AzureNetworkFabricManagementServiceApiBuilder pipeline(HttpPipeline pipel * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder defaultPollInterval(Duration defaultPollInterval) { + public ManagedNetworkFabricManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AzureNetworkFabricManagementServiceApiBuilder defaultPollInterval(Duratio * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the ManagedNetworkFabricManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public ManagedNetworkFabricManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureNetworkFabricManagementServiceApiImpl with the provided parameters. + * Builds an instance of ManagedNetworkFabricManagementClientImpl with the provided parameters. * - * @return an instance of AzureNetworkFabricManagementServiceApiImpl. + * @return an instance of ManagedNetworkFabricManagementClientImpl. */ - public AzureNetworkFabricManagementServiceApiImpl buildClient() { + public ManagedNetworkFabricManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,9 +131,8 @@ public AzureNetworkFabricManagementServiceApiImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureNetworkFabricManagementServiceApiImpl client - = new AzureNetworkFabricManagementServiceApiImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + ManagedNetworkFabricManagementClientImpl client = new ManagedNetworkFabricManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientImpl.java similarity index 85% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientImpl.java index 866b7db2282b..9eab730b3f51 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -15,16 +15,18 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; @@ -34,13 +36,17 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.ManagedNetworkFabricManagementClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; @@ -58,31 +64,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AzureNetworkFabricManagementServiceApiImpl type. + * Initializes a new instance of the ManagedNetworkFabricManagementClientImpl type. */ -@ServiceClient(builder = AzureNetworkFabricManagementServiceApiBuilder.class) -public final class AzureNetworkFabricManagementServiceApiImpl implements AzureNetworkFabricManagementServiceApi { +@ServiceClient(builder = ManagedNetworkFabricManagementClientBuilder.class) +public final class ManagedNetworkFabricManagementClientImpl implements ManagedNetworkFabricManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -91,12 +83,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -104,6 +96,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -147,31 +153,31 @@ public Duration getDefaultPollInterval() { } /** - * The AccessControlListsClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final AccessControlListsClient accessControlLists; + private final OperationsClient operations; /** - * Gets the AccessControlListsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AccessControlListsClient object. + * @return the OperationsClient object. */ - public AccessControlListsClient getAccessControlLists() { - return this.accessControlLists; + public OperationsClient getOperations() { + return this.operations; } /** - * The InternetGatewaysClient object to access its operations. + * The AccessControlListsClient object to access its operations. */ - private final InternetGatewaysClient internetGateways; + private final AccessControlListsClient accessControlLists; /** - * Gets the InternetGatewaysClient object to access its operations. + * Gets the AccessControlListsClient object to access its operations. * - * @return the InternetGatewaysClient object. + * @return the AccessControlListsClient object. */ - public InternetGatewaysClient getInternetGateways() { - return this.internetGateways; + public AccessControlListsClient getAccessControlLists() { + return this.accessControlLists; } /** @@ -188,6 +194,20 @@ public InternetGatewayRulesClient getInternetGatewayRules() { return this.internetGatewayRules; } + /** + * The InternetGatewaysClient object to access its operations. + */ + private final InternetGatewaysClient internetGateways; + + /** + * Gets the InternetGatewaysClient object to access its operations. + * + * @return the InternetGatewaysClient object. + */ + public InternetGatewaysClient getInternetGateways() { + return this.internetGateways; + } + /** * The IpCommunitiesClient object to access its operations. */ @@ -455,54 +475,83 @@ public NetworkTapsClient getNetworkTaps() { } /** - * The OperationsClient object to access its operations. + * The RoutePoliciesClient object to access its operations. */ - private final OperationsClient operations; + private final RoutePoliciesClient routePolicies; /** - * Gets the OperationsClient object to access its operations. + * Gets the RoutePoliciesClient object to access its operations. * - * @return the OperationsClient object. + * @return the RoutePoliciesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public RoutePoliciesClient getRoutePolicies() { + return this.routePolicies; } /** - * The RoutePoliciesClient object to access its operations. + * The NetworkMonitorsClient object to access its operations. */ - private final RoutePoliciesClient routePolicies; + private final NetworkMonitorsClient networkMonitors; /** - * Gets the RoutePoliciesClient object to access its operations. + * Gets the NetworkMonitorsClient object to access its operations. * - * @return the RoutePoliciesClient object. + * @return the NetworkMonitorsClient object. */ - public RoutePoliciesClient getRoutePolicies() { - return this.routePolicies; + public NetworkMonitorsClient getNetworkMonitors() { + return this.networkMonitors; } /** - * Initializes an instance of AzureNetworkFabricManagementServiceApi client. + * The NetworkBootstrapDevicesClient object to access its operations. + */ + private final NetworkBootstrapDevicesClient networkBootstrapDevices; + + /** + * Gets the NetworkBootstrapDevicesClient object to access its operations. + * + * @return the NetworkBootstrapDevicesClient object. + */ + public NetworkBootstrapDevicesClient getNetworkBootstrapDevices() { + return this.networkBootstrapDevices; + } + + /** + * The NetworkBootstrapInterfacesClient object to access its operations. + */ + private final NetworkBootstrapInterfacesClient networkBootstrapInterfaces; + + /** + * Gets the NetworkBootstrapInterfacesClient object to access its operations. + * + * @return the NetworkBootstrapInterfacesClient object. + */ + public NetworkBootstrapInterfacesClient getNetworkBootstrapInterfaces() { + return this.networkBootstrapInterfaces; + } + + /** + * Initializes an instance of ManagedNetworkFabricManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - AzureNetworkFabricManagementServiceApiImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + ManagedNetworkFabricManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-06-15"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-07-15"; + this.operations = new OperationsClientImpl(this); this.accessControlLists = new AccessControlListsClientImpl(this); - this.internetGateways = new InternetGatewaysClientImpl(this); this.internetGatewayRules = new InternetGatewayRulesClientImpl(this); + this.internetGateways = new InternetGatewaysClientImpl(this); this.ipCommunities = new IpCommunitiesClientImpl(this); this.ipExtendedCommunities = new IpExtendedCommunitiesClientImpl(this); this.ipPrefixes = new IpPrefixesClientImpl(this); @@ -522,8 +571,10 @@ public RoutePoliciesClient getRoutePolicies() { this.networkRacks = new NetworkRacksClientImpl(this); this.networkTapRules = new NetworkTapRulesClientImpl(this); this.networkTaps = new NetworkTapsClientImpl(this); - this.operations = new OperationsClientImpl(this); this.routePolicies = new RoutePoliciesClientImpl(this); + this.networkMonitors = new NetworkMonitorsClientImpl(this); + this.networkBootstrapDevices = new NetworkBootstrapDevicesClientImpl(this); + this.networkBootstrapInterfaces = new NetworkBootstrapInterfacesClientImpl(this); } /** @@ -563,6 +614,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -652,5 +720,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureNetworkFabricManagementServiceApiImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkFabricManagementClientImpl.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java index 03a115743551..fa5b850b4e8f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,9 +8,15 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -46,10 +52,22 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } + public String annotation() { + return this.innerModel().annotation(); + } + + public NeighborGroupDestination destination() { + return this.innerModel().destination(); + } + public List networkTapIds() { List inner = this.innerModel().networkTapIds(); if (inner != null) { @@ -68,16 +86,25 @@ public List networkTapRuleIds() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public List networkFabricIds() { + List inner = this.innerModel().networkFabricIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public NeighborGroupDestination destination() { - return this.innerModel().destination(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); } - public String annotation() { - return this.innerModel().annotation(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } public Region region() { @@ -175,6 +202,14 @@ public NeighborGroup refresh(Context context) { return this; } + public NeighborGroupResyncResponse resync() { + return serviceManager.neighborGroups().resync(resourceGroupName, neighborGroupName); + } + + public NeighborGroupResyncResponse resync(Context context) { + return serviceManager.neighborGroups().resync(resourceGroupName, neighborGroupName, context); + } + public NeighborGroupImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -185,6 +220,11 @@ public NeighborGroupImpl withRegion(String location) { return this; } + public NeighborGroupImpl withDestination(NeighborGroupDestination destination) { + this.innerModel().withDestination(destination); + return this; + } + public NeighborGroupImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -195,14 +235,9 @@ public NeighborGroupImpl withTags(Map tags) { } } - public NeighborGroupImpl withDestination(NeighborGroupDestination destination) { - if (isInCreateMode()) { - this.innerModel().withDestination(destination); - return this; - } else { - this.updateBody.withDestination(destination); - return this; - } + public NeighborGroupImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; } public NeighborGroupImpl withAnnotation(String annotation) { @@ -215,7 +250,17 @@ public NeighborGroupImpl withAnnotation(String annotation) { } } + public NeighborGroupImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public NeighborGroupImpl withDestination(NeighborGroupDestinationPatch destination) { + this.updateBody.withDestination(destination); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupResyncResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupResyncResponseImpl.java new file mode 100644 index 000000000000..caffe80c2854 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupResyncResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupResyncResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NeighborGroupResyncResponseImpl implements NeighborGroupResyncResponse { + private NeighborGroupResyncResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NeighborGroupResyncResponseImpl(NeighborGroupResyncResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NeighborGroupResyncResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java index 29ff270de4e6..c258432d97b9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -28,14 +29,16 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupsListResult; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,91 +55,172 @@ public final class NeighborGroupsClientImpl implements NeighborGroupsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NeighborGroupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NeighborGroupsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NeighborGroupsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NeighborGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNeighborGroups to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientNeighborGroups to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNeighborGroups") public interface NeighborGroupsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("neighborGroupName") String neighborGroupName, - @BodyParam("application/json") NeighborGroupInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("neighborGroupName") String neighborGroupName, - @BodyParam("application/json") NeighborGroupPatch body, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,185 +228,110 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT method. + * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String neighborGroupName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), neighborGroupName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT method. + * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return the Neighbor Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), neighborGroupName, body, accept, context); - } - - /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Neighbor Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeighborGroupInner> beginCreateAsync(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, neighborGroupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeighborGroupInner.class, NeighborGroupInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT method. + * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + * @return the Neighbor Group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeighborGroupInner> beginCreateAsync(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, neighborGroupName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeighborGroupInner.class, NeighborGroupInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String neighborGroupName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT method. + * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + * @return the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body) { - return this.beginCreateAsync(resourceGroupName, neighborGroupName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); } /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, neighborGroupName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String neighborGroupName, + NeighborGroupInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -331,18 +340,19 @@ public SyncPoller, NeighborGroupInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group on successful completion of {@link Mono}. + * @return defines the Neighbor Group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String neighborGroupName, + private Response createWithResponse(String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { - return beginCreateAsync(resourceGroupName, neighborGroupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, + Context.NONE); } /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -352,18 +362,18 @@ private Mono createAsync(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group on successful completion of {@link Mono}. + * @return defines the Neighbor Group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String neighborGroupName, + private Response createWithResponse(String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { - return beginCreateAsync(resourceGroupName, neighborGroupName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, context); } /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -372,167 +382,108 @@ private Mono createAsync(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { - return createAsync(resourceGroupName, neighborGroupName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginCreateAsync(String resourceGroupName, + String neighborGroupName, NeighborGroupInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, neighborGroupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NeighborGroupInner.class, NeighborGroupInner.class, this.client.getContext()); } /** - * Creates the Neighbor Group. - * * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body, - Context context) { - return createAsync(resourceGroupName, neighborGroupName, body, context).block(); - } - - /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String neighborGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), neighborGroupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner body) { + Response response = createWithResponse(resourceGroupName, neighborGroupName, body); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, Context.NONE); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. + * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String neighborGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), neighborGroupName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner body, Context context) { + Response response = createWithResponse(resourceGroupName, neighborGroupName, body, context); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, context); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. + * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group on successful completion of {@link Mono}. + * @return defines the Neighbor Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String neighborGroupName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String neighborGroupName, + NeighborGroupInner body) { + return beginCreateAsync(resourceGroupName, neighborGroupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. + * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group along with {@link Response}. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String neighborGroupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName, context).block(); + public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + return beginCreate(resourceGroupName, neighborGroupName, body).getFinalResult(); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets the Neighbor Group. + * Implements the Neighbor Group PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neighbor Group. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName) { - return getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); + public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body, + Context context) { + return beginCreate(resourceGroupName, neighborGroupName, body, context).getFinalResult(); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -546,108 +497,61 @@ public NeighborGroupInner getByResourceGroup(String resourceGroupName, String ne @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), neighborGroupName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. * @param body Neighbor Group properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return defines the Neighbor Group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), neighborGroupName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, + Context.NONE); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + * @return defines the Neighbor Group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeighborGroupInner> beginUpdateAsync(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, neighborGroupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeighborGroupInner.class, NeighborGroupInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, body, context); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. * @param body Neighbor Group properties to update. Only annotations are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -655,17 +559,13 @@ private PollerFlux, NeighborGroupInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NeighborGroupInner> beginUpdateAsync(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, neighborGroupName, body, context); + String neighborGroupName, NeighborGroupPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, neighborGroupName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeighborGroupInner.class, NeighborGroupInner.class, context); + NeighborGroupInner.class, NeighborGroupInner.class, this.client.getContext()); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -679,12 +579,12 @@ private PollerFlux, NeighborGroupInner> beginUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NeighborGroupInner> beginUpdate(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { - return this.beginUpdateAsync(resourceGroupName, neighborGroupName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, neighborGroupName, body); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, Context.NONE); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -699,12 +599,12 @@ public SyncPoller, NeighborGroupInner> beginUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NeighborGroupInner> beginUpdate(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, neighborGroupName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, neighborGroupName, body, context); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, context); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -723,29 +623,6 @@ private Mono updateAsync(String resourceGroupName, String ne } /** - * API to update certain properties of the Neighbor Group Resources. - * - * Updates the Neighbor Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. - * @param body Neighbor Group properties to update. Only annotations are supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the Neighbor Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, neighborGroupName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -758,12 +635,10 @@ private Mono updateAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { - return updateAsync(resourceGroupName, neighborGroupName, body).block(); + return beginUpdate(resourceGroupName, neighborGroupName, body).getFinalResult(); } /** - * API to update certain properties of the Neighbor Group Resources. - * * Updates the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -778,12 +653,10 @@ public NeighborGroupInner update(String resourceGroupName, String neighborGroupN @ServiceMethod(returns = ReturnType.SINGLE) public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { - return updateAsync(resourceGroupName, neighborGroupName, body, context).block(); + return beginUpdate(resourceGroupName, neighborGroupName, body, context).getFinalResult(); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -796,111 +669,64 @@ public NeighborGroupInner update(String resourceGroupName, String neighborGroupN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String neighborGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), neighborGroupName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String neighborGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (neighborGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), neighborGroupName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String neighborGroupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, Context.NONE); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String neighborGroupName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, neighborGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String neighborGroupName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, context); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param neighborGroupName Name of the Neighbor Group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String neighborGroupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, neighborGroupName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String neighborGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, neighborGroupName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -912,12 +738,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName) { - return this.beginDeleteAsync(resourceGroupName, neighborGroupName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, neighborGroupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -931,12 +756,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName, Context context) { - return this.beginDeleteAsync(resourceGroupName, neighborGroupName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, neighborGroupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -953,27 +777,6 @@ private Mono deleteAsync(String resourceGroupName, String neighborGroupNam } /** - * Deletes a Neighbor Group. - * - * Implements Neighbor Group DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param neighborGroupName Name of the Neighbor Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String neighborGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, neighborGroupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -984,12 +787,10 @@ private Mono deleteAsync(String resourceGroupName, String neighborGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String neighborGroupName) { - deleteAsync(resourceGroupName, neighborGroupName).block(); + beginDelete(resourceGroupName, neighborGroupName).getFinalResult(); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1001,99 +802,64 @@ public void delete(String resourceGroupName, String neighborGroupName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String neighborGroupName, Context context) { - deleteAsync(resourceGroupName, neighborGroupName, context).block(); + beginDelete(resourceGroupName, neighborGroupName, context).getFinalResult(); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1101,33 +867,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1135,131 +901,265 @@ public PagedIterable listByResourceGroup(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Neighbor Groups by subscription. + * Displays NeighborGroups list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Displays NeighborGroups list by subscription GET method. * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** * Displays NeighborGroups list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listSinglePage(Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List Neighbor Groups by subscription. + * Resync the Neighbor Group after a configuration change. * - * Displays NeighborGroups list by subscription GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync(String resourceGroupName, + String neighborGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync the Neighbor Group after a configuration change. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String neighborGroupName) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, Context.NONE); } /** - * List Neighbor Groups by subscription. + * Resync the Neighbor Group after a configuration change. * - * Displays NeighborGroups list by subscription GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String neighborGroupName, + Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context); + } + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupResyncResponseInner> + beginResyncAsync(String resourceGroupName, String neighborGroupName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, neighborGroupName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NeighborGroupResyncResponseInner.class, + NeighborGroupResyncResponseInner.class, this.client.getContext()); + } + + /** + * Resync the Neighbor Group after a configuration change. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupResyncResponseInner> + beginResync(String resourceGroupName, String neighborGroupName) { + Response response = resyncWithResponse(resourceGroupName, neighborGroupName); + return this.client.getLroResult(response, + NeighborGroupResyncResponseInner.class, NeighborGroupResyncResponseInner.class, Context.NONE); + } + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupResyncResponseInner> + beginResync(String resourceGroupName, String neighborGroupName, Context context) { + Response response = resyncWithResponse(resourceGroupName, neighborGroupName, context); + return this.client.getLroResult(response, + NeighborGroupResyncResponseInner.class, NeighborGroupResyncResponseInner.class, context); + } + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync(String resourceGroupName, String neighborGroupName) { + return beginResyncAsync(resourceGroupName, neighborGroupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupResyncResponseInner resync(String resourceGroupName, String neighborGroupName) { + return beginResync(resourceGroupName, neighborGroupName).getFinalResult(); + } + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupResyncResponseInner resync(String resourceGroupName, String neighborGroupName, + Context context) { + return beginResync(resourceGroupName, neighborGroupName, context).getFinalResult(); } /** @@ -1269,17 +1169,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1289,6 +1183,24 @@ private Mono> listByResourceGroupNextSinglePag .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1297,23 +1209,15 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1323,17 +1227,11 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1343,6 +1241,24 @@ private Mono> listBySubscriptionNextSinglePage .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1351,22 +1267,14 @@ private Mono> listBySubscriptionNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NeighborGroup items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java index 90356f19181f..259a03abe46c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -11,7 +11,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroups; public final class NeighborGroupsImpl implements NeighborGroups { @@ -31,12 +33,8 @@ public Response getByResourceGroupWithResponse(String resourceGro Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NeighborGroupImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NeighborGroupImpl(inner.getValue(), this.manager())); } public NeighborGroup getByResourceGroup(String resourceGroupName, String neighborGroupName) { @@ -76,6 +74,25 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new NeighborGroupImpl(inner1, this.manager())); } + public NeighborGroupResyncResponse resync(String resourceGroupName, String neighborGroupName) { + NeighborGroupResyncResponseInner inner = this.serviceClient().resync(resourceGroupName, neighborGroupName); + if (inner != null) { + return new NeighborGroupResyncResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NeighborGroupResyncResponse resync(String resourceGroupName, String neighborGroupName, Context context) { + NeighborGroupResyncResponseInner inner + = this.serviceClient().resync(resourceGroupName, neighborGroupName, context); + if (inner != null) { + return new NeighborGroupResyncResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public NeighborGroup getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceImpl.java new file mode 100644 index 000000000000..0ad57d55f37f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceImpl.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevicePatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import java.util.Collections; +import java.util.Map; + +public final class NetworkBootstrapDeviceImpl + implements NetworkBootstrapDevice, NetworkBootstrapDevice.Definition, NetworkBootstrapDevice.Update { + private NetworkBootstrapDeviceInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public String hostName() { + return this.innerModel().hostName(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public String version() { + return this.innerModel().version(); + } + + public String networkDeviceSku() { + return this.innerModel().networkDeviceSku(); + } + + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public String secondaryManagementIpv4Address() { + return this.innerModel().secondaryManagementIpv4Address(); + } + + public String dhcpV4ServerIpAddress() { + return this.innerModel().dhcpV4ServerIpAddress(); + } + + public String primaryManagementIpv6Address() { + return this.innerModel().primaryManagementIpv6Address(); + } + + public String secondaryManagementIpv6Address() { + return this.innerModel().secondaryManagementIpv6Address(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String primaryManagementIpv4Address() { + return this.innerModel().primaryManagementIpv4Address(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkBootstrapDeviceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkBootstrapDeviceName; + + private NetworkBootstrapDevicePatch updateBody; + + public NetworkBootstrapDeviceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkBootstrapDevice create() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .create(resourceGroupName, networkBootstrapDeviceName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkBootstrapDevice create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .create(resourceGroupName, networkBootstrapDeviceName, this.innerModel(), context); + return this; + } + + NetworkBootstrapDeviceImpl(String name, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkBootstrapDeviceInner(); + this.serviceManager = serviceManager; + this.networkBootstrapDeviceName = name; + } + + public NetworkBootstrapDeviceImpl update() { + this.updateBody = new NetworkBootstrapDevicePatch(); + return this; + } + + public NetworkBootstrapDevice apply() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .update(resourceGroupName, networkBootstrapDeviceName, updateBody, Context.NONE); + return this; + } + + public NetworkBootstrapDevice apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .update(resourceGroupName, networkBootstrapDeviceName, updateBody, context); + return this; + } + + NetworkBootstrapDeviceImpl(NetworkBootstrapDeviceInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkBootstrapDeviceName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkBootstrapDevices"); + } + + public NetworkBootstrapDevice refresh() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, Context.NONE) + .getValue(); + return this; + } + + public NetworkBootstrapDevice refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapDevices() + .getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, context) + .getValue(); + return this; + } + + public NetworkBootstrapDeviceRebootResponse reboot() { + return serviceManager.networkBootstrapDevices().reboot(resourceGroupName, networkBootstrapDeviceName); + } + + public NetworkBootstrapDeviceRebootResponse reboot(Context context) { + return serviceManager.networkBootstrapDevices().reboot(resourceGroupName, networkBootstrapDeviceName, context); + } + + public NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration() { + return serviceManager.networkBootstrapDevices() + .refreshConfiguration(resourceGroupName, networkBootstrapDeviceName); + } + + public NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(Context context) { + return serviceManager.networkBootstrapDevices() + .refreshConfiguration(resourceGroupName, networkBootstrapDeviceName, context); + } + + public NetworkBootstrapDeviceUpgradeResponse upgrade(UpdateVersion body) { + return serviceManager.networkBootstrapDevices().upgrade(resourceGroupName, networkBootstrapDeviceName, body); + } + + public NetworkBootstrapDeviceUpgradeResponse upgrade(UpdateVersion body, Context context) { + return serviceManager.networkBootstrapDevices() + .upgrade(resourceGroupName, networkBootstrapDeviceName, body, context); + } + + public NetworkBootstrapDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body) { + return serviceManager.networkBootstrapDevices() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body); + } + + public NetworkBootstrapDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body, Context context) { + return serviceManager.networkBootstrapDevices() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body, context); + } + + public NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords() { + return serviceManager.networkBootstrapDevices().resyncPasswords(resourceGroupName, networkBootstrapDeviceName); + } + + public NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(Context context) { + return serviceManager.networkBootstrapDevices() + .resyncPasswords(resourceGroupName, networkBootstrapDeviceName, context); + } + + public NetworkBootstrapDeviceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkBootstrapDeviceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkBootstrapDeviceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NetworkBootstrapDeviceImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public NetworkBootstrapDeviceImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + + public NetworkBootstrapDeviceImpl withHostName(String hostName) { + if (isInCreateMode()) { + this.innerModel().withHostName(hostName); + return this; + } else { + this.updateBody.withHostName(hostName); + return this; + } + } + + public NetworkBootstrapDeviceImpl withSerialNumber(String serialNumber) { + if (isInCreateMode()) { + this.innerModel().withSerialNumber(serialNumber); + return this; + } else { + this.updateBody.withSerialNumber(serialNumber); + return this; + } + } + + public NetworkBootstrapDeviceImpl withNetworkDeviceSku(String networkDeviceSku) { + this.innerModel().withNetworkDeviceSku(networkDeviceSku); + return this; + } + + public NetworkBootstrapDeviceImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRebootResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRebootResponseImpl.java new file mode 100644 index 000000000000..f3cf447016a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRebootResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkBootstrapDeviceRebootResponseImpl implements NetworkBootstrapDeviceRebootResponse { + private NetworkBootstrapDeviceRebootResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkBootstrapDeviceRebootResponseImpl(NetworkBootstrapDeviceRebootResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkBootstrapDeviceRebootResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRefreshConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRefreshConfigurationResponseImpl.java new file mode 100644 index 000000000000..72a9f2c4b520 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRefreshConfigurationResponseImpl.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkBootstrapDeviceRefreshConfigurationResponseImpl + implements NetworkBootstrapDeviceRefreshConfigurationResponse { + private NetworkBootstrapDeviceRefreshConfigurationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkBootstrapDeviceRefreshConfigurationResponseImpl( + NetworkBootstrapDeviceRefreshConfigurationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkBootstrapDeviceRefreshConfigurationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceResyncPasswordsResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceResyncPasswordsResponseImpl.java new file mode 100644 index 000000000000..0667e5ed73c2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceResyncPasswordsResponseImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkBootstrapDeviceResyncPasswordsResponseImpl + implements NetworkBootstrapDeviceResyncPasswordsResponse { + private NetworkBootstrapDeviceResyncPasswordsResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkBootstrapDeviceResyncPasswordsResponseImpl(NetworkBootstrapDeviceResyncPasswordsResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkBootstrapDeviceResyncPasswordsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..18eb39a7ba9d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl + implements NetworkBootstrapDeviceUpdateAdministrativeStateResponse { + private NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl( + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpgradeResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpgradeResponseImpl.java new file mode 100644 index 000000000000..ac20d488896b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpgradeResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkBootstrapDeviceUpgradeResponseImpl implements NetworkBootstrapDeviceUpgradeResponse { + private NetworkBootstrapDeviceUpgradeResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkBootstrapDeviceUpgradeResponseImpl(NetworkBootstrapDeviceUpgradeResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkBootstrapDeviceUpgradeResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesClientImpl.java new file mode 100644 index 000000000000..e52237d70b86 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesClientImpl.java @@ -0,0 +1,2153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapDeviceListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevicePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NetworkBootstrapDevicesClient. + */ +public final class NetworkBootstrapDevicesClientImpl implements NetworkBootstrapDevicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkBootstrapDevicesService service; + + /** + * The service client containing this operation class. + */ + private final ManagedNetworkFabricManagementClientImpl client; + + /** + * Initializes an instance of NetworkBootstrapDevicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkBootstrapDevicesClientImpl(ManagedNetworkFabricManagementClientImpl client) { + this.service = RestProxy.create(NetworkBootstrapDevicesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkBootstrapDevices to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkBootstrapDevices") + public interface NetworkBootstrapDevicesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapDeviceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapDeviceInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapDevicePatch body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapDevicePatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/reboot") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reboot(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/reboot") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rebootSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> refreshConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateVersion body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateVersion body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateDeviceAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateDeviceAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncPasswords(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncPasswordsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkBootstrapDeviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context); + } + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceInner getByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName) { + return getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, Context.NONE).getValue(); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + context); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkBootstrapDeviceInner> beginCreateAsync( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, + this.client.getContext()); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceInner> + beginCreate(String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body) { + Response response = createWithResponse(resourceGroupName, networkBootstrapDeviceName, body); + return this.client.getLroResult(response, + NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, Context.NONE); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDeviceInner body, + Context context) { + Response response + = createWithResponse(resourceGroupName, networkBootstrapDeviceName, body, context); + return this.client.getLroResult(response, + NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, context); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body) { + return beginCreateAsync(resourceGroupName, networkBootstrapDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceInner create(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body) { + return beginCreate(resourceGroupName, networkBootstrapDeviceName, body).getFinalResult(); + } + + /** + * Creates a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceInner create(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDeviceInner body, Context context) { + return beginCreate(resourceGroupName, networkBootstrapDeviceName, body, context).getFinalResult(); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + context); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkBootstrapDeviceInner> beginUpdateAsync( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, + this.client.getContext()); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceInner> + beginUpdate(String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body) { + Response response = updateWithResponse(resourceGroupName, networkBootstrapDeviceName, body); + return this.client.getLroResult(response, + NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, Context.NONE); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, NetworkBootstrapDevicePatch body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, networkBootstrapDeviceName, body, context); + return this.client.getLroResult(response, + NetworkBootstrapDeviceInner.class, NetworkBootstrapDeviceInner.class, context); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body) { + return beginUpdateAsync(resourceGroupName, networkBootstrapDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceInner update(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body) { + return beginUpdate(resourceGroupName, networkBootstrapDeviceName, body).getFinalResult(); + } + + /** + * Update certain properties of the Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Network Bootstrap Device properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Device resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceInner update(String resourceGroupName, String networkBootstrapDeviceName, + NetworkBootstrapDevicePatch body, Context context) { + return beginUpdate(resourceGroupName, networkBootstrapDeviceName, body, context).getFinalResult(); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkBootstrapDeviceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, Context.NONE); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, context); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkBootstrapDeviceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName) { + Response response = deleteWithResponse(resourceGroupName, networkBootstrapDeviceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkBootstrapDeviceName) { + return beginDeleteAsync(resourceGroupName, networkBootstrapDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkBootstrapDeviceName) { + beginDelete(resourceGroupName, networkBootstrapDeviceName).getFinalResult(); + } + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkBootstrapDeviceName, Context context) { + beginDelete(resourceGroupName, networkBootstrapDeviceName, context).getFinalResult(); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rebootWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reboot(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rebootWithResponse(String resourceGroupName, String networkBootstrapDeviceName) { + final String accept = "application/json"; + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, Context.NONE); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rebootWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + Context context) { + final String accept = "application/json"; + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkBootstrapDeviceRebootResponseInner> + beginRebootAsync(String resourceGroupName, String networkBootstrapDeviceName) { + Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapDeviceRebootResponseInner.class, + NetworkBootstrapDeviceRebootResponseInner.class, this.client.getContext()); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceRebootResponseInner> + beginReboot(String resourceGroupName, String networkBootstrapDeviceName) { + Response response = rebootWithResponse(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceRebootResponseInner.class, + NetworkBootstrapDeviceRebootResponseInner.class, Context.NONE); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapDeviceRebootResponseInner> + beginReboot(String resourceGroupName, String networkBootstrapDeviceName, Context context) { + Response response = rebootWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceRebootResponseInner.class, + NetworkBootstrapDeviceRebootResponseInner.class, context); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rebootAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + return beginRebootAsync(resourceGroupName, networkBootstrapDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceRebootResponseInner reboot(String resourceGroupName, + String networkBootstrapDeviceName) { + return beginReboot(resourceGroupName, networkBootstrapDeviceName).getFinalResult(); + } + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceRebootResponseInner reboot(String resourceGroupName, String networkBootstrapDeviceName, + Context context) { + return beginReboot(resourceGroupName, networkBootstrapDeviceName, context).getFinalResult(); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, Context.NONE); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkBootstrapDeviceRefreshConfigurationResponseInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkBootstrapDeviceName) { + Mono>> mono + = refreshConfigurationWithResponseAsync(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, + NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, this.client.getContext()); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkBootstrapDeviceName) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, + NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, Context.NONE); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkBootstrapDeviceName, Context context) { + Response response + = refreshConfigurationWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, + NetworkBootstrapDeviceRefreshConfigurationResponseInner.class, context); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + refreshConfigurationAsync(String resourceGroupName, String networkBootstrapDeviceName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkBootstrapDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName) { + return beginRefreshConfiguration(resourceGroupName, networkBootstrapDeviceName).getFinalResult(); + } + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + return beginRefreshConfiguration(resourceGroupName, networkBootstrapDeviceName, context).getFinalResult(); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, UpdateVersion body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + context); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkBootstrapDeviceUpgradeResponseInner> + beginUpgradeAsync(String resourceGroupName, String networkBootstrapDeviceName, UpdateVersion body) { + Mono>> mono + = upgradeWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, body); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapDeviceUpgradeResponseInner.class, + NetworkBootstrapDeviceUpgradeResponseInner.class, this.client.getContext()); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkBootstrapDeviceName, UpdateVersion body) { + Response response = upgradeWithResponse(resourceGroupName, networkBootstrapDeviceName, body); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceUpgradeResponseInner.class, + NetworkBootstrapDeviceUpgradeResponseInner.class, Context.NONE); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkBootstrapDeviceName, UpdateVersion body, Context context) { + Response response + = upgradeWithResponse(resourceGroupName, networkBootstrapDeviceName, body, context); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceUpgradeResponseInner.class, + NetworkBootstrapDeviceUpgradeResponseInner.class, context); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, + String networkBootstrapDeviceName, UpdateVersion body) { + return beginUpgradeAsync(resourceGroupName, networkBootstrapDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceUpgradeResponseInner upgrade(String resourceGroupName, + String networkBootstrapDeviceName, UpdateVersion body) { + return beginUpgrade(resourceGroupName, networkBootstrapDeviceName, body).getFinalResult(); + } + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceUpgradeResponseInner upgrade(String resourceGroupName, + String networkBootstrapDeviceName, UpdateVersion body, Context context) { + return beginUpgrade(resourceGroupName, networkBootstrapDeviceName, body, context).getFinalResult(); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + networkBootstrapDeviceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, contentType, accept, body, + context); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkBootstrapDeviceName, + UpdateDeviceAdministrativeState body) { + Mono>> mono + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + UpdateDeviceAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkBootstrapDeviceName, body); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, Context.NONE); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + UpdateDeviceAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkBootstrapDeviceName, body, context); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.class, context); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkBootstrapDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState( + String resourceGroupName, String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body).getFinalResult(); + } + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState( + String resourceGroupName, String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body, + Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body, context) + .getFinalResult(); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncPasswordsWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.resyncPasswords(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncPasswordsWithResponse(String resourceGroupName, + String networkBootstrapDeviceName) { + final String accept = "application/json"; + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, Context.NONE); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncPasswordsWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + final String accept = "application/json"; + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkBootstrapDeviceResyncPasswordsResponseInner> + beginResyncPasswordsAsync(String resourceGroupName, String networkBootstrapDeviceName) { + Mono>> mono + = resyncPasswordsWithResponseAsync(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkBootstrapDeviceResyncPasswordsResponseInner.class, + NetworkBootstrapDeviceResyncPasswordsResponseInner.class, this.client.getContext()); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkBootstrapDeviceName) { + Response response = resyncPasswordsWithResponse(resourceGroupName, networkBootstrapDeviceName); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceResyncPasswordsResponseInner.class, + NetworkBootstrapDeviceResyncPasswordsResponseInner.class, Context.NONE); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkBootstrapDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkBootstrapDeviceName, Context context) { + Response response + = resyncPasswordsWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + return this.client + .getLroResult( + response, NetworkBootstrapDeviceResyncPasswordsResponseInner.class, + NetworkBootstrapDeviceResyncPasswordsResponseInner.class, context); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncPasswordsAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + return beginResyncPasswordsAsync(resourceGroupName, networkBootstrapDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName) { + return beginResyncPasswords(resourceGroupName, networkBootstrapDeviceName).getFinalResult(); + } + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + return beginResyncPasswords(resourceGroupName, networkBootstrapDeviceName, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesImpl.java new file mode 100644 index 000000000000..b35bd7d21467 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesImpl.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevices; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; + +public final class NetworkBootstrapDevicesImpl implements NetworkBootstrapDevices { + private static final ClientLogger LOGGER = new ClientLogger(NetworkBootstrapDevicesImpl.class); + + private final NetworkBootstrapDevicesClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkBootstrapDevicesImpl(NetworkBootstrapDevicesClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkBootstrapDeviceImpl(inner.getValue(), this.manager())); + } + + public NetworkBootstrapDevice getByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName) { + NetworkBootstrapDeviceInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, networkBootstrapDeviceName); + if (inner != null) { + return new NetworkBootstrapDeviceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName) { + this.serviceClient().delete(resourceGroupName, networkBootstrapDeviceName); + } + + public void delete(String resourceGroupName, String networkBootstrapDeviceName, Context context) { + this.serviceClient().delete(resourceGroupName, networkBootstrapDeviceName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapDeviceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapDeviceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapDeviceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapDeviceImpl(inner1, this.manager())); + } + + public NetworkBootstrapDeviceRebootResponse reboot(String resourceGroupName, String networkBootstrapDeviceName) { + NetworkBootstrapDeviceRebootResponseInner inner + = this.serviceClient().reboot(resourceGroupName, networkBootstrapDeviceName); + if (inner != null) { + return new NetworkBootstrapDeviceRebootResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceRebootResponse reboot(String resourceGroupName, String networkBootstrapDeviceName, + Context context) { + NetworkBootstrapDeviceRebootResponseInner inner + = this.serviceClient().reboot(resourceGroupName, networkBootstrapDeviceName, context); + if (inner != null) { + return new NetworkBootstrapDeviceRebootResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName) { + NetworkBootstrapDeviceRefreshConfigurationResponseInner inner + = this.serviceClient().refreshConfiguration(resourceGroupName, networkBootstrapDeviceName); + if (inner != null) { + return new NetworkBootstrapDeviceRefreshConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + NetworkBootstrapDeviceRefreshConfigurationResponseInner inner + = this.serviceClient().refreshConfiguration(resourceGroupName, networkBootstrapDeviceName, context); + if (inner != null) { + return new NetworkBootstrapDeviceRefreshConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceUpgradeResponse upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body) { + NetworkBootstrapDeviceUpgradeResponseInner inner + = this.serviceClient().upgrade(resourceGroupName, networkBootstrapDeviceName, body); + if (inner != null) { + return new NetworkBootstrapDeviceUpgradeResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceUpgradeResponse upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body, Context context) { + NetworkBootstrapDeviceUpgradeResponseInner inner + = this.serviceClient().upgrade(resourceGroupName, networkBootstrapDeviceName, body, context); + if (inner != null) { + return new NetworkBootstrapDeviceUpgradeResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body) { + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner inner + = this.serviceClient().updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body); + if (inner != null) { + return new NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body, Context context) { + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner inner = this.serviceClient() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, body, context); + if (inner != null) { + return new NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName) { + NetworkBootstrapDeviceResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkBootstrapDeviceName); + if (inner != null) { + return new NetworkBootstrapDeviceResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + NetworkBootstrapDeviceResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkBootstrapDeviceName, context); + if (inner != null) { + return new NetworkBootstrapDeviceResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapDevice getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkBootstrapDeviceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + this.delete(resourceGroupName, networkBootstrapDeviceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + this.delete(resourceGroupName, networkBootstrapDeviceName, context); + } + + private NetworkBootstrapDevicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkBootstrapDeviceImpl define(String name) { + return new NetworkBootstrapDeviceImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfaceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfaceImpl.java new file mode 100644 index 000000000000..778403d753c0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfaceImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfacePatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +public final class NetworkBootstrapInterfaceImpl + implements NetworkBootstrapInterface, NetworkBootstrapInterface.Definition, NetworkBootstrapInterface.Update { + private NetworkBootstrapInterfaceInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public String physicalIdentifier() { + return this.innerModel().physicalIdentifier(); + } + + public String connectedTo() { + return this.innerModel().connectedTo(); + } + + public InterfaceType interfaceType() { + return this.innerModel().interfaceType(); + } + + public String description() { + return this.innerModel().description(); + } + + public String additionalDescription() { + return this.innerModel().additionalDescription(); + } + + public String ipv4Address() { + return this.innerModel().ipv4Address(); + } + + public String ipv6Address() { + return this.innerModel().ipv6Address(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkBootstrapInterfaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkBootstrapDeviceName; + + private String networkBootstrapInterfaceName; + + private NetworkBootstrapInterfacePatch updateBody; + + public NetworkBootstrapInterfaceImpl withExistingNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName) { + this.resourceGroupName = resourceGroupName; + this.networkBootstrapDeviceName = networkBootstrapDeviceName; + return this; + } + + public NetworkBootstrapInterface create() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .create(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, this.innerModel(), + Context.NONE); + return this; + } + + public NetworkBootstrapInterface create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .create(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, this.innerModel(), + context); + return this; + } + + NetworkBootstrapInterfaceImpl(String name, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkBootstrapInterfaceInner(); + this.serviceManager = serviceManager; + this.networkBootstrapInterfaceName = name; + } + + public NetworkBootstrapInterfaceImpl update() { + this.updateBody = new NetworkBootstrapInterfacePatch(); + return this; + } + + public NetworkBootstrapInterface apply() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .update(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, updateBody, + Context.NONE); + return this; + } + + public NetworkBootstrapInterface apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .update(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, updateBody, context); + return this; + } + + NetworkBootstrapInterfaceImpl(NetworkBootstrapInterfaceInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkBootstrapDeviceName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkBootstrapDevices"); + this.networkBootstrapInterfaceName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkBootstrapInterfaces"); + } + + public NetworkBootstrapInterface refresh() { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, Context.NONE) + .getValue(); + return this; + } + + public NetworkBootstrapInterface refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkBootstrapInterfaces() + .getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context) + .getValue(); + return this; + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.networkBootstrapInterfaces() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + body); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + Context context) { + return serviceManager.networkBootstrapInterfaces() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + body, context); + } + + public NetworkBootstrapInterfaceImpl withAdditionalDescription(String additionalDescription) { + if (isInCreateMode()) { + this.innerModel().withAdditionalDescription(additionalDescription); + return this; + } else { + this.updateBody.withAdditionalDescription(additionalDescription); + return this; + } + } + + public NetworkBootstrapInterfaceImpl withSerialNumber(String serialNumber) { + if (isInCreateMode()) { + this.innerModel().withSerialNumber(serialNumber); + return this; + } else { + this.updateBody.withSerialNumber(serialNumber); + return this; + } + } + + public NetworkBootstrapInterfaceImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesClientImpl.java new file mode 100644 index 000000000000..68ccfe2b6a8e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesClientImpl.java @@ -0,0 +1,1257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapInterfaceListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfacePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NetworkBootstrapInterfacesClient. + */ +public final class NetworkBootstrapInterfacesClientImpl implements NetworkBootstrapInterfacesClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkBootstrapInterfacesService service; + + /** + * The service client containing this operation class. + */ + private final ManagedNetworkFabricManagementClientImpl client; + + /** + * Initializes an instance of NetworkBootstrapInterfacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkBootstrapInterfacesClientImpl(ManagedNetworkFabricManagementClientImpl client) { + this.service = RestProxy.create(NetworkBootstrapInterfacesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkBootstrapInterfaces to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkBootstrapInterfaces") + public interface NetworkBootstrapInterfacesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapInterfaceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapInterfaceInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapInterfacePatch body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkBootstrapInterfacePatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNetworkBootstrapDevice( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkBootstrapDeviceSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkBootstrapDeviceName") String networkBootstrapDeviceName, + @PathParam("networkBootstrapInterfaceName") String networkBootstrapInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNetworkBootstrapDeviceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkBootstrapDeviceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + return getWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, accept, context); + } + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapInterfaceInner get(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + return getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + Context.NONE).getValue(); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, Context.NONE); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, context); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkBootstrapInterfaceInner> beginCreateAsync( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfaceInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, + this.client.getContext()); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapInterfaceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfaceInner body) { + Response response + = createWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body); + return this.client.getLroResult(response, + NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, Context.NONE); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapInterfaceInner> beginCreate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfaceInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body, context); + return this.client.getLroResult(response, + NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, context); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body) { + return beginCreateAsync(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapInterfaceInner create(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body) { + return beginCreate(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body) + .getFinalResult(); + } + + /** + * Create a Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapInterfaceInner create(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfaceInner body, Context context) { + return beginCreate(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body, context) + .getFinalResult(); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, Context.NONE); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, context); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkBootstrapInterfaceInner> beginUpdateAsync( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfacePatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, + this.client.getContext()); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapInterfaceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfacePatch body) { + Response response + = updateWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body); + return this.client.getLroResult(response, + NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, Context.NONE); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkBootstrapInterfaceInner> beginUpdate( + String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + NetworkBootstrapInterfacePatch body, Context context) { + Response response = updateWithResponse(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body, context); + return this.client.getLroResult(response, + NetworkBootstrapInterfaceInner.class, NetworkBootstrapInterfaceInner.class, context); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body) { + return beginUpdateAsync(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapInterfaceInner update(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body) { + return beginUpdate(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body) + .getFinalResult(); + } + + /** + * Update certain properties of the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body NetworkBootstrapInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the NetworkBootstrapInterface resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkBootstrapInterfaceInner update(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, NetworkBootstrapInterfacePatch body, Context context) { + return beginUpdate(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, body, context) + .getFinalResult(); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, Context.NONE); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, context); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + Response response + = deleteWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + return beginDeleteAsync(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + beginDelete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName).getFinalResult(); + } + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context) { + beginDelete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context) + .getFinalResult(); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByNetworkBootstrapDeviceSinglePageAsync(String resourceGroupName, String networkBootstrapDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByNetworkBootstrapDevice(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetworkBootstrapDeviceAsync(String resourceGroupName, + String networkBootstrapDeviceName) { + return new PagedFlux<>( + () -> listByNetworkBootstrapDeviceSinglePageAsync(resourceGroupName, networkBootstrapDeviceName), + nextLink -> listByNetworkBootstrapDeviceNextSinglePageAsync(nextLink)); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listByNetworkBootstrapDeviceSinglePage(String resourceGroupName, String networkBootstrapDeviceName) { + final String accept = "application/json"; + Response res + = service.listByNetworkBootstrapDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkBootstrapDeviceSinglePage( + String resourceGroupName, String networkBootstrapDeviceName, Context context) { + final String accept = "application/json"; + Response res + = service.listByNetworkBootstrapDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName) { + return new PagedIterable<>( + () -> listByNetworkBootstrapDeviceSinglePage(resourceGroupName, networkBootstrapDeviceName), + nextLink -> listByNetworkBootstrapDeviceNextSinglePage(nextLink)); + } + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + return new PagedIterable<>( + () -> listByNetworkBootstrapDeviceSinglePage(resourceGroupName, networkBootstrapDeviceName, context), + nextLink -> listByNetworkBootstrapDeviceNextSinglePage(nextLink, context)); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + networkBootstrapDeviceName, networkBootstrapInterfaceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, Context.NONE); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, contentType, accept, body, context); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, + networkBootstrapDeviceName, networkBootstrapInterfaceName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + Response response = updateAdministrativeStateWithResponse(resourceGroupName, + networkBootstrapDeviceName, networkBootstrapInterfaceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, UpdateAdministrativeState body, Context context) { + Response response = updateAdministrativeStateWithResponse(resourceGroupName, + networkBootstrapDeviceName, networkBootstrapInterfaceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body).getFinalResult(); + } + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body, + Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, + networkBootstrapInterfaceName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByNetworkBootstrapDeviceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listByNetworkBootstrapDeviceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkBootstrapDeviceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNetworkBootstrapDeviceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkBootstrapDeviceNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listByNetworkBootstrapDeviceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesImpl.java new file mode 100644 index 000000000000..66c6a2e7b6a7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesImpl.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfaces; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +public final class NetworkBootstrapInterfacesImpl implements NetworkBootstrapInterfaces { + private static final ClientLogger LOGGER = new ClientLogger(NetworkBootstrapInterfacesImpl.class); + + private final NetworkBootstrapInterfacesClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkBootstrapInterfacesImpl(NetworkBootstrapInterfacesClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkBootstrapInterfaceImpl(inner.getValue(), this.manager())); + } + + public NetworkBootstrapInterface get(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + NetworkBootstrapInterfaceInner inner + = this.serviceClient().get(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName); + if (inner != null) { + return new NetworkBootstrapInterfaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName) { + this.serviceClient().delete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName); + } + + public void delete(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context) { + this.serviceClient() + .delete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context); + } + + public PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName) { + PagedIterable inner + = this.serviceClient().listByNetworkBootstrapDevice(resourceGroupName, networkBootstrapDeviceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapInterfaceImpl(inner1, this.manager())); + } + + public PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName, Context context) { + PagedIterable inner + = this.serviceClient().listByNetworkBootstrapDevice(resourceGroupName, networkBootstrapDeviceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkBootstrapInterfaceImpl(inner1, this.manager())); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body, + Context context) { + CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + .updateAdministrativeState(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkBootstrapInterface getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + String networkBootstrapInterfaceName + = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapInterfaces"); + if (networkBootstrapInterfaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapInterfaces'.", id))); + } + return this + .getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + String networkBootstrapInterfaceName + = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapInterfaces"); + if (networkBootstrapInterfaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapInterfaces'.", id))); + } + return this.getWithResponse(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, + context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + String networkBootstrapInterfaceName + = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapInterfaces"); + if (networkBootstrapInterfaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapInterfaces'.", id))); + } + this.delete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkBootstrapDeviceName = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapDevices"); + if (networkBootstrapDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapDevices'.", id))); + } + String networkBootstrapInterfaceName + = ResourceManagerUtils.getValueFromIdByName(id, "networkBootstrapInterfaces"); + if (networkBootstrapInterfaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'networkBootstrapInterfaces'.", id))); + } + this.delete(resourceGroupName, networkBootstrapDeviceName, networkBootstrapInterfaceName, context); + } + + private NetworkBootstrapInterfacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkBootstrapInterfaceImpl define(String name) { + return new NetworkBootstrapInterfaceImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java index f4ce5242f942..5795c4c74002 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,16 +9,33 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CertificateRotationStatus; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationStatus; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; import java.util.Collections; +import java.util.List; import java.util.Map; public final class NetworkDeviceImpl implements NetworkDevice, NetworkDevice.Definition, NetworkDevice.Update { @@ -51,10 +68,30 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } + public String annotation() { + return this.innerModel().annotation(); + } + + public String hostName() { + return this.innerModel().hostName(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public IdentitySelector identitySelector() { + return this.innerModel().identitySelector(); + } + public String version() { return this.innerModel().version(); } @@ -79,6 +116,14 @@ public String managementIpv6Address() { return this.innerModel().managementIpv6Address(); } + public String rwDeviceConfig() { + return this.innerModel().rwDeviceConfig(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -91,16 +136,26 @@ public AdministrativeState administrativeState() { return this.innerModel().administrativeState(); } - public String hostname() { - return this.innerModel().hostname(); + public List secretRotationStatus() { + List inner = this.innerModel().secretRotationStatus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String serialNumber() { - return this.innerModel().serialNumber(); + public List certificateRotationStatus() { + List inner = this.innerModel().certificateRotationStatus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String annotation() { - return this.innerModel().annotation(); + public String networkFabricId() { + return this.innerModel().networkFabricId(); } public Region region() { @@ -198,40 +253,74 @@ public NetworkDevice refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate reboot(RebootProperties body) { + public OperationStatusResult reboot(RebootProperties body) { return serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName, body); } - public CommonPostActionResponseForStateUpdate reboot(RebootProperties body, Context context) { + public OperationStatusResult reboot(RebootProperties body, Context context) { return serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName, body, context); } - public CommonPostActionResponseForStateUpdate refreshConfiguration() { + public NetworkDeviceRefreshConfigurationResponse refreshConfiguration() { return serviceManager.networkDevices().refreshConfiguration(resourceGroupName, networkDeviceName); } - public CommonPostActionResponseForStateUpdate refreshConfiguration(Context context) { + public NetworkDeviceRefreshConfigurationResponse refreshConfiguration(Context context) { return serviceManager.networkDevices().refreshConfiguration(resourceGroupName, networkDeviceName, context); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body) { + public NetworkDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body) { return serviceManager.networkDevices().updateAdministrativeState(resourceGroupName, networkDeviceName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body, - Context context) { + public NetworkDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body, Context context) { return serviceManager.networkDevices() .updateAdministrativeState(resourceGroupName, networkDeviceName, body, context); } - public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body) { + public NetworkDeviceUpgradeResponse upgrade(NetworkDeviceUpgradeRequest body) { return serviceManager.networkDevices().upgrade(resourceGroupName, networkDeviceName, body); } - public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context) { + public NetworkDeviceUpgradeResponse upgrade(NetworkDeviceUpgradeRequest body, Context context) { return serviceManager.networkDevices().upgrade(resourceGroupName, networkDeviceName, body, context); } + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body) { + return serviceManager.networkDevices().runRoCommand(resourceGroupName, networkDeviceName, body); + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body, + Context context) { + return serviceManager.networkDevices().runRoCommand(resourceGroupName, networkDeviceName, body, context); + } + + public NetworkDeviceRunRwCommandResponse runRwCommand(DeviceRwCommand body) { + return serviceManager.networkDevices().runRwCommand(resourceGroupName, networkDeviceName, body); + } + + public NetworkDeviceRunRwCommandResponse runRwCommand(DeviceRwCommand body, Context context) { + return serviceManager.networkDevices().runRwCommand(resourceGroupName, networkDeviceName, body, context); + } + + public NetworkDeviceResyncPasswordsResponse resyncPasswords() { + return serviceManager.networkDevices().resyncPasswords(resourceGroupName, networkDeviceName); + } + + public NetworkDeviceResyncPasswordsResponse resyncPasswords(Context context) { + return serviceManager.networkDevices().resyncPasswords(resourceGroupName, networkDeviceName, context); + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates() { + return serviceManager.networkDevices().resyncCertificates(resourceGroupName, networkDeviceName); + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates(Context context) { + return serviceManager.networkDevices().resyncCertificates(resourceGroupName, networkDeviceName, context); + } + public NetworkDeviceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -242,6 +331,16 @@ public NetworkDeviceImpl withRegion(String location) { return this; } + public NetworkDeviceImpl withSerialNumber(String serialNumber) { + if (isInCreateMode()) { + this.innerModel().withSerialNumber(serialNumber); + return this; + } else { + this.updateBody.withSerialNumber(serialNumber); + return this; + } + } + public NetworkDeviceImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -252,42 +351,52 @@ public NetworkDeviceImpl withTags(Map tags) { } } - public NetworkDeviceImpl withNetworkDeviceSku(String networkDeviceSku) { - this.innerModel().withNetworkDeviceSku(networkDeviceSku); + public NetworkDeviceImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public NetworkDeviceImpl withHostname(String hostname) { + public NetworkDeviceImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withHostname(hostname); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withHostname(hostname); + this.updateBody.withAnnotation(annotation); return this; } } - public NetworkDeviceImpl withSerialNumber(String serialNumber) { + public NetworkDeviceImpl withHostName(String hostName) { if (isInCreateMode()) { - this.innerModel().withSerialNumber(serialNumber); + this.innerModel().withHostName(hostName); return this; } else { - this.updateBody.withSerialNumber(serialNumber); + this.updateBody.withHostName(hostName); return this; } } - public NetworkDeviceImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NetworkDeviceImpl withIdentitySelector(IdentitySelector identitySelector) { + this.innerModel().withIdentitySelector(identitySelector); + return this; + } + + public NetworkDeviceImpl withNetworkDeviceSku(String networkDeviceSku) { + this.innerModel().withNetworkDeviceSku(networkDeviceSku); + return this; + } + + public NetworkDeviceImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public NetworkDeviceImpl withIdentitySelector(IdentitySelectorPatch identitySelector) { + this.updateBody.withIdentitySelector(identitySelector); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRefreshConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRefreshConfigurationResponseImpl.java new file mode 100644 index 000000000000..8a09a49928b4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRefreshConfigurationResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkDeviceRefreshConfigurationResponseImpl implements NetworkDeviceRefreshConfigurationResponse { + private NetworkDeviceRefreshConfigurationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkDeviceRefreshConfigurationResponseImpl(NetworkDeviceRefreshConfigurationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkDeviceRefreshConfigurationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceResyncPasswordsResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceResyncPasswordsResponseImpl.java new file mode 100644 index 000000000000..09d79ae44314 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceResyncPasswordsResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkDeviceResyncPasswordsResponseImpl implements NetworkDeviceResyncPasswordsResponse { + private NetworkDeviceResyncPasswordsResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkDeviceResyncPasswordsResponseImpl(NetworkDeviceResyncPasswordsResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkDeviceResyncPasswordsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRunRwCommandResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRunRwCommandResponseImpl.java new file mode 100644 index 000000000000..0b02c74ddc09 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRunRwCommandResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkDeviceRunRwCommandResponseImpl implements NetworkDeviceRunRwCommandResponse { + private NetworkDeviceRunRwCommandResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkDeviceRunRwCommandResponseImpl(NetworkDeviceRunRwCommandResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkDeviceRwCommandResponseProperties properties() { + return this.innerModel().properties(); + } + + public NetworkDeviceRunRwCommandResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java index 46ebc57f4b27..6082b6cd613d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java index fe892204816f..646646658216 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkusListResult; import reactor.core.publisher.Mono; /** @@ -42,32 +42,41 @@ public final class NetworkDeviceSkusClientImpl implements NetworkDeviceSkusClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkDeviceSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkDeviceSkusClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkDeviceSkusClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkDeviceSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkDeviceSkus to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkDeviceSkus to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkDeviceSkus") public interface NetworkDeviceSkusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("networkDeviceSkuName") String networkDeviceSkuName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("networkDeviceSkuName") String networkDeviceSkuName, @HeaderParam("Accept") String accept, Context context); @@ -75,8 +84,16 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -84,13 +101,19 @@ Mono> list(@HostParam("$host") String endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -101,60 +124,14 @@ Mono> listBySubscriptionNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkDeviceSkuName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkDeviceSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceSkuName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), networkDeviceSkuName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), networkDeviceSkuName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Device Sku. - * - * Get a Network Device SKU details. - * - * @param networkDeviceSkuName Name of the Network Device SKU. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Network Device SKU details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String networkDeviceSkuName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkDeviceSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - networkDeviceSkuName, accept, context); - } - - /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -169,8 +146,6 @@ private Mono getAsync(String networkDeviceSkuName) { } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -182,12 +157,12 @@ private Mono getAsync(String networkDeviceSkuName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkDeviceSkuName, Context context) { - return getWithResponseAsync(networkDeviceSkuName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + networkDeviceSkuName, accept, context); } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -202,123 +177,96 @@ public NetworkDeviceSkuInner get(String networkDeviceSkuName) { } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -328,17 +276,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -348,6 +290,24 @@ private Mono> listBySubscriptionNextSingleP .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -356,22 +316,14 @@ private Mono> listBySubscriptionNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDeviceSku items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java index 751a6ef6e88e..81f1d213448c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,12 +29,8 @@ public NetworkDeviceSkusImpl(NetworkDeviceSkusClient innerClient, public Response getWithResponse(String networkDeviceSkuName, Context context) { Response inner = this.serviceClient().getWithResponse(networkDeviceSkuName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkDeviceSkuImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkDeviceSkuImpl(inner.getValue(), this.manager())); } public NetworkDeviceSku get(String networkDeviceSkuName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpdateAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpdateAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..9262206162ad --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpdateAdministrativeStateResponseImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkDeviceUpdateAdministrativeStateResponseImpl + implements NetworkDeviceUpdateAdministrativeStateResponse { + private NetworkDeviceUpdateAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkDeviceUpdateAdministrativeStateResponseImpl(NetworkDeviceUpdateAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkDeviceUpdateAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpgradeResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpgradeResponseImpl.java new file mode 100644 index 000000000000..b12207a3194b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpgradeResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkDeviceUpgradeResponseImpl implements NetworkDeviceUpgradeResponse { + private NetworkDeviceUpgradeResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkDeviceUpgradeResponseImpl(NetworkDeviceUpgradeResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkDeviceUpgradeResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java index 0d8014713c04..780855b7e376 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,18 +29,28 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDevicesListResult; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicesListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -57,133 +67,308 @@ public final class NetworkDevicesClientImpl implements NetworkDevicesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkDevicesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkDevicesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkDevicesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkDevicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkDevices to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkDevices to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkDevices") public interface NetworkDevicesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") NetworkDeviceInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") NetworkDevicePatchParameters body, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDevicePatchParameters body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDevicePatchParameters body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reboot(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RebootProperties body, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reboot(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") RebootProperties body, @HeaderParam("Accept") String accept, + Response rebootSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RebootProperties body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> refreshConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") UpdateDeviceAdministrativeState body, @HeaderParam("Accept") String accept, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateDeviceAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateDeviceAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, @BodyParam("application/json") UpdateVersion body, - @HeaderParam("Accept") String accept, Context context); + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceUpgradeRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceUpgradeRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRoCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runRoCommand(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRoCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRoCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response runRoCommandSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRoCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRwCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runRwCommand(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRwCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRwCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response runRwCommandSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRwCommand body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncPasswords(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncPasswordsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncCertificates(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncCertificatesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -191,64 +376,94 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Device. - * - * Create a Network Device resource. + * Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Device resource details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkDeviceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Device. + * Gets the Network Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Device resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkDeviceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Network Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Device resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkDeviceName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + } + + /** + * Gets the Network Device resource details. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Device resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName) { + return getByResourceGroupWithResponse(resourceGroupName, networkDeviceName, Context.NONE).getValue(); + } + + /** * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -257,37 +472,15 @@ private Mono>> createWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + NetworkDeviceInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -296,19 +489,19 @@ private Mono>> createWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Device resource definition. + * @return the Network Device resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,21 +511,18 @@ private PollerFlux, NetworkDeviceInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Device resource definition. + * @return the Network Device resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -341,23 +531,22 @@ private PollerFlux, NetworkDeviceInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Device resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, + private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + Mono>> mono = createWithResponseAsync(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -365,39 +554,38 @@ public SyncPoller, NetworkDeviceInner> beginCreat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + String networkDeviceName, NetworkDeviceInner body) { + Response response = createWithResponse(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, Context.NONE); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body) { - return beginCreateAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, + String networkDeviceName, NetworkDeviceInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, context); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -405,14 +593,12 @@ private Mono createAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkDeviceName, body, context).last() + NetworkDeviceInner body) { + return beginCreateAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -425,12 +611,10 @@ private Mono createAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body) { - return createAsync(resourceGroupName, networkDeviceName, body).block(); + return beginCreate(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -445,233 +629,74 @@ public NetworkDeviceInner create(String resourceGroupName, String networkDeviceN @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body, Context context) { - return createAsync(resourceGroupName, networkDeviceName, body, context).block(); + return beginCreate(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Network Device properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param body Network Device properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Network Device properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkDeviceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Network Device. - * - * Gets the Network Device resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkDeviceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName, context).block(); - } - - /** - * Gets a Network Device. - * - * Gets the Network Device resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName) { - return getByResourceGroupWithResponse(resourceGroupName, networkDeviceName, Context.NONE).getValue(); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -691,32 +716,6 @@ private PollerFlux, NetworkDeviceInner> beginUpda } /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Device resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginUpdateAsync(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, context); - } - - /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -730,12 +729,12 @@ private PollerFlux, NetworkDeviceInner> beginUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, Context.NONE); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -750,12 +749,12 @@ public SyncPoller, NetworkDeviceInner> beginUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, context); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -774,29 +773,6 @@ private Mono updateAsync(String resourceGroupName, String ne } /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Device resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body, Context context) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -810,12 +786,10 @@ private Mono updateAsync(String resourceGroupName, String ne @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body) { - return updateAsync(resourceGroupName, networkDeviceName, body).block(); + return beginUpdate(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -830,12 +804,10 @@ public NetworkDeviceInner update(String resourceGroupName, String networkDeviceN @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - return updateAsync(resourceGroupName, networkDeviceName, body, context).block(); + return beginUpdate(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -848,111 +820,64 @@ public NetworkDeviceInner update(String resourceGroupName, String networkDeviceN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkDeviceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, Context.NONE); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, context); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +889,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -983,12 +907,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1005,27 +928,6 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam } /** - * Deletes a Network Device. - * - * Delete the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkDeviceName, Context context) { - return beginDeleteAsync(resourceGroupName, networkDeviceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1036,12 +938,10 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName) { - deleteAsync(resourceGroupName, networkDeviceName).block(); + beginDelete(resourceGroupName, networkDeviceName).getFinalResult(); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1053,99 +953,64 @@ public void delete(String resourceGroupName, String networkDeviceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, Context context) { - deleteAsync(resourceGroupName, networkDeviceName, context).block(); + beginDelete(resourceGroupName, networkDeviceName, context).getFinalResult(); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1153,33 +1018,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1187,136 +1052,108 @@ public PagedIterable listByResourceGroup(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1325,43 +1162,40 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rebootWithResponseAsync(String resourceGroupName, String networkDeviceName, RebootProperties body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reboot(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + return FluxUtil.withContext(context -> service.reboot(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Reboot the Network Device. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rebootWithResponse(String resourceGroupName, String networkDeviceName, + RebootProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1371,42 +1205,18 @@ private Mono>> rebootWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rebootWithResponseAsync(String resourceGroupName, String networkDeviceName, + private Response rebootWithResponse(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reboot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1415,940 +1225,1424 @@ private Mono>> rebootWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, OperationStatusResultInner> beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body) { Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + public SyncPoller, OperationStatusResultInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { + Response response = rebootWithResponse(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + public SyncPoller, OperationStatusResultInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { + Response response = rebootWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rebootAsync(String resourceGroupName, String networkDeviceName, + RebootProperties body) { + return beginRebootAsync(resourceGroupName, networkDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reboot the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner reboot(String resourceGroupName, String networkDeviceName, + RebootProperties body) { + return beginReboot(resourceGroupName, networkDeviceName, body).getFinalResult(); + } + + /** + * Reboot the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, + Context context) { + return beginReboot(resourceGroupName, networkDeviceName, body, context).getFinalResult(); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, + String networkDeviceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkDeviceName) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkDeviceRefreshConfigurationResponseInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName) { + Mono>> mono + = refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkDeviceRefreshConfigurationResponseInner.class, + NetworkDeviceRefreshConfigurationResponseInner.class, this.client.getContext()); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkDeviceName); + return this.client + .getLroResult( + response, NetworkDeviceRefreshConfigurationResponseInner.class, + NetworkDeviceRefreshConfigurationResponseInner.class, Context.NONE); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkDeviceRefreshConfigurationResponseInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkDeviceName, context); + return this.client + .getLroResult( + response, NetworkDeviceRefreshConfigurationResponseInner.class, + NetworkDeviceRefreshConfigurationResponseInner.class, context); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshConfigurationAsync(String resourceGroupName, + String networkDeviceName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkDeviceName) { + return beginRefreshConfiguration(resourceGroupName, networkDeviceName).getFinalResult(); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceRefreshConfigurationResponseInner refreshConfiguration(String resourceGroupName, + String networkDeviceName, Context context) { + return beginRefreshConfiguration(resourceGroupName, networkDeviceName, context).getFinalResult(); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body) { + Mono>> mono + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkDeviceUpdateAdministrativeStateResponseInner.class, + NetworkDeviceUpdateAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, NetworkDeviceUpdateAdministrativeStateResponseInner.class, + NetworkDeviceUpdateAdministrativeStateResponseInner.class, Context.NONE); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkDeviceUpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, NetworkDeviceUpdateAdministrativeStateResponseInner.class, + NetworkDeviceUpdateAdministrativeStateResponseInner.class, context); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, body).getFinalResult(); + } + + /** + * Updates the Administrative state of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceUpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, body, context).getFinalResult(); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, + String networkDeviceName, NetworkDeviceUpgradeRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkDeviceUpgradeResponseInner> + beginUpgradeAsync(String resourceGroupName, String networkDeviceName, NetworkDeviceUpgradeRequest body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkDeviceUpgradeResponseInner.class, + NetworkDeviceUpgradeResponseInner.class, this.client.getContext()); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceUpgradeResponseInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, NetworkDeviceUpgradeRequest body) { + Response response = upgradeWithResponse(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult(response, + NetworkDeviceUpgradeResponseInner.class, NetworkDeviceUpgradeResponseInner.class, Context.NONE); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceUpgradeResponseInner> beginUpgrade( + String resourceGroupName, String networkDeviceName, NetworkDeviceUpgradeRequest body, Context context) { + Response response = upgradeWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client.getLroResult(response, + NetworkDeviceUpgradeResponseInner.class, NetworkDeviceUpgradeResponseInner.class, context); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body) { + return beginUpgradeAsync(resourceGroupName, networkDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body) { + return beginUpgrade(resourceGroupName, networkDeviceName, body).getFinalResult(); + } + + /** + * Upgrades the version of the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceUpgradeResponseInner upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body, Context context) { + return beginUpgrade(resourceGroupName, networkDeviceName, body, context).getFinalResult(); + } + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runRoCommandWithResponseAsync(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.runRoCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response runRoCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRoCommand body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.runRoCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response runRoCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRoCommand body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.runRoCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); + } + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { + Mono>> mono + = runRoCommandWithResponseAsync(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, this.client.getContext()); + } + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { + Response response = runRoCommandWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Reboot the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rebootAsync(String resourceGroupName, - String networkDeviceName, RebootProperties body) { - return beginRebootAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body, Context context) { + Response response = runRoCommandWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Reboot the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rebootAsync(String resourceGroupName, - String networkDeviceName, RebootProperties body, Context context) { - return beginRebootAsync(resourceGroupName, networkDeviceName, body, context).last() + private Mono + runRoCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { + return beginRunRoCommandAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Reboot the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body) { - return rebootAsync(resourceGroupName, networkDeviceName, body).block(); + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + return beginRunRoCommand(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Reboot the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body, Context context) { - return rebootAsync(resourceGroupName, networkDeviceName, body, context).block(); + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context) { + return beginRunRoCommand(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, - String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } + private Mono>> runRwCommandWithResponseAsync(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.runRwCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, - String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } + private Response runRwCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context); + return service.runRwCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response runRwCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.runRwCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, NetworkDeviceRunRwCommandResponseInner> + beginRunRwCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRwCommand body) { Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + = runRwCommandWithResponseAsync(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), NetworkDeviceRunRwCommandResponseInner.class, + NetworkDeviceRunRwCommandResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkDeviceName) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + public SyncPoller, NetworkDeviceRunRwCommandResponseInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body) { + Response response = runRwCommandWithResponse(resourceGroupName, networkDeviceName, body); + return this.client.getLroResult( + response, NetworkDeviceRunRwCommandResponseInner.class, NetworkDeviceRunRwCommandResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, - String networkDeviceName) { - return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, NetworkDeviceRunRwCommandResponseInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body, Context context) { + Response response = runRwCommandWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client.getLroResult( + response, NetworkDeviceRunRwCommandResponseInner.class, NetworkDeviceRunRwCommandResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, - String networkDeviceName, Context context) { - return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context).last() + private Mono runRwCommandAsync(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body) { + return beginRunRwCommandAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, - String networkDeviceName) { - return refreshConfigurationAsync(resourceGroupName, networkDeviceName).block(); + public NetworkDeviceRunRwCommandResponseInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body) { + return beginRunRwCommand(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, - String networkDeviceName, Context context) { - return refreshConfigurationAsync(resourceGroupName, networkDeviceName, context).block(); + public NetworkDeviceRunRwCommandResponseInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context) { + return beginRunRwCommand(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> resyncPasswordsWithResponseAsync(String resourceGroupName, + String networkDeviceName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.resyncPasswords(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response resyncPasswordsWithResponse(String resourceGroupName, String networkDeviceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncPasswordsWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + final String accept = "application/json"; + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + private PollerFlux, NetworkDeviceResyncPasswordsResponseInner> + beginResyncPasswordsAsync(String resourceGroupName, String networkDeviceName) { + Mono>> mono = resyncPasswordsWithResponseAsync(resourceGroupName, networkDeviceName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkDeviceResyncPasswordsResponseInner.class, + NetworkDeviceResyncPasswordsResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + public SyncPoller, NetworkDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkDeviceName) { + Response response = resyncPasswordsWithResponse(resourceGroupName, networkDeviceName); + return this.client + .getLroResult( + response, NetworkDeviceResyncPasswordsResponseInner.class, + NetworkDeviceResyncPasswordsResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, NetworkDeviceResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkDeviceName, Context context) { + Response response = resyncPasswordsWithResponse(resourceGroupName, networkDeviceName, context); + return this.client + .getLroResult( + response, NetworkDeviceResyncPasswordsResponseInner.class, + NetworkDeviceResyncPasswordsResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context).last() + private Mono resyncPasswordsAsync(String resourceGroupName, + String networkDeviceName) { + return beginResyncPasswordsAsync(resourceGroupName, networkDeviceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).block(); + public NetworkDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkDeviceName) { + return beginResyncPasswords(resourceGroupName, networkDeviceName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Network Device. * - * Updates the Administrative state of the Network Device. + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context).block(); + public NetworkDeviceResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkDeviceName, + Context context) { + return beginResyncPasswords(resourceGroupName, networkDeviceName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> resyncCertificatesWithResponseAsync(String resourceGroupName, + String networkDeviceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.resyncCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response resyncCertificatesWithResponse(String resourceGroupName, String networkDeviceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.resyncCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body) { - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncCertificatesWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + final String accept = "application/json"; + return service.resyncCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { - context = this.client.mergeContext(context); + PollerFlux, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificatesAsync(String resourceGroupName, String networkDeviceName) { Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + = resyncCertificatesWithResponseAsync(resourceGroupName, networkDeviceName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body) { - return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkDeviceName) { + Response response = resyncCertificatesWithResponse(resourceGroupName, networkDeviceName); + return this.client + .getLroResult( + response, NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { - return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkDeviceName, Context context) { + Response response = resyncCertificatesWithResponse(resourceGroupName, networkDeviceName, context); + return this.client + .getLroResult( + response, NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body) { - return beginUpgradeAsync(resourceGroupName, networkDeviceName, body).last() + private Mono resyncCertificatesAsync(String resourceGroupName, + String networkDeviceName) { + return beginResyncCertificatesAsync(resourceGroupName, networkDeviceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body, Context context) { - return beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, + String networkDeviceName) { + return beginResyncCertificates(resourceGroupName, networkDeviceName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest certificates to the Network Device. * - * Upgrades the version of the Network Device. + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body) { - return upgradeAsync(resourceGroupName, networkDeviceName, body).block(); + public NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, + String networkDeviceName, Context context) { + return beginResyncCertificates(resourceGroupName, networkDeviceName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return paged collection of NetworkDevice items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body, Context context) { - return upgradeAsync(resourceGroupName, networkDeviceName, body, context).block(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -2358,24 +2652,15 @@ public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2386,23 +2671,15 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2412,17 +2689,11 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2432,6 +2703,24 @@ private Mono> listBySubscriptionNextSinglePage .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2440,22 +2729,14 @@ private Mono> listBySubscriptionNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkDevice items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java index 00f7fcdbf4ed..0625eda37552 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,14 +10,30 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevices; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; public final class NetworkDevicesImpl implements NetworkDevices { private static final ClientLogger LOGGER = new ClientLogger(NetworkDevicesImpl.class); @@ -36,12 +52,8 @@ public Response getByResourceGroupWithResponse(String resourceGro Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkDeviceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkDeviceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkDeviceImpl(inner.getValue(), this.manager())); } public NetworkDevice getByResourceGroup(String resourceGroupName, String networkDeviceName) { @@ -81,89 +93,174 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkDeviceImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().reboot(resourceGroupName, networkDeviceName, body); + public OperationStatusResult reboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { + OperationStatusResultInner inner = this.serviceClient().reboot(resourceGroupName, networkDeviceName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body, Context context) { - CommonPostActionResponseForStateUpdateInner inner + public OperationStatusResult reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, + Context context) { + OperationStatusResultInner inner = this.serviceClient().reboot(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, + public NetworkDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, String networkDeviceName) { - CommonPostActionResponseForStateUpdateInner inner + NetworkDeviceRefreshConfigurationResponseInner inner = this.serviceClient().refreshConfiguration(resourceGroupName, networkDeviceName); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceRefreshConfigurationResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, + public NetworkDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { - CommonPostActionResponseForStateUpdateInner inner + NetworkDeviceRefreshConfigurationResponseInner inner = this.serviceClient().refreshConfiguration(resourceGroupName, networkDeviceName, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceRefreshConfigurationResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner + NetworkDeviceUpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, networkDeviceName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceUpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner + NetworkDeviceUpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceUpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body) { - CommonPostActionResponseForStateUpdateInner inner + public NetworkDeviceUpgradeResponse upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body) { + NetworkDeviceUpgradeResponseInner inner = this.serviceClient().upgrade(resourceGroupName, networkDeviceName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceUpgradeResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body, Context context) { - CommonPostActionResponseForStateUpdateInner inner + public NetworkDeviceUpgradeResponse upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body, Context context) { + NetworkDeviceUpgradeResponseInner inner = this.serviceClient().upgrade(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkDeviceUpgradeResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner inner + = this.serviceClient().runRoCommand(resourceGroupName, networkDeviceName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context) { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner inner + = this.serviceClient().runRoCommand(resourceGroupName, networkDeviceName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkDeviceRunRwCommandResponse runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body) { + NetworkDeviceRunRwCommandResponseInner inner + = this.serviceClient().runRwCommand(resourceGroupName, networkDeviceName, body); + if (inner != null) { + return new NetworkDeviceRunRwCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkDeviceRunRwCommandResponse runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context) { + NetworkDeviceRunRwCommandResponseInner inner + = this.serviceClient().runRwCommand(resourceGroupName, networkDeviceName, body, context); + if (inner != null) { + return new NetworkDeviceRunRwCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkDeviceName) { + NetworkDeviceResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkDeviceName); + if (inner != null) { + return new NetworkDeviceResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkDeviceName, + Context context) { + NetworkDeviceResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkDeviceName, context); + if (inner != null) { + return new NetworkDeviceResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, + String networkDeviceName) { + NetworkFabricResyncCertificatesResponseInner inner + = this.serviceClient().resyncCertificates(resourceGroupName, networkDeviceName); + if (inner != null) { + return new NetworkFabricResyncCertificatesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, + String networkDeviceName, Context context) { + NetworkFabricResyncCertificatesResponseInner inner + = this.serviceClient().resyncCertificates(resourceGroupName, networkDeviceName, context); + if (inner != null) { + return new NetworkFabricResyncCertificatesResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java index 29bf540f6060..1745de3d875f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -11,7 +11,10 @@ import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; @@ -51,10 +54,36 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } + public String annotation() { + return this.innerModel().annotation(); + } + + public List infrastructureExpressRouteConnections() { + List inner = this.innerModel().infrastructureExpressRouteConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List workloadExpressRouteConnections() { + List inner = this.innerModel().workloadExpressRouteConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public ControllerServices infrastructureServices() { return this.innerModel().infrastructureServices(); } @@ -76,10 +105,6 @@ public List networkFabricIds() { } } - public Boolean workloadManagementNetwork() { - return this.innerModel().workloadManagementNetwork(); - } - public IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled() { return this.innerModel().isWorkloadManagementNetworkEnabled(); } @@ -105,30 +130,12 @@ public NfcSku nfcSku() { return this.innerModel().nfcSku(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); } - public List infrastructureExpressRouteConnections() { - List inner = this.innerModel().infrastructureExpressRouteConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List workloadExpressRouteConnections() { - List inner = this.innerModel().workloadExpressRouteConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String annotation() { - return this.innerModel().annotation(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } public Region region() { @@ -247,30 +254,13 @@ public NetworkFabricControllerImpl withTags(Map tags) { } } - public NetworkFabricControllerImpl - withManagedResourceGroupConfiguration(ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { - this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); - return this; - } - - public NetworkFabricControllerImpl - withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { - this.innerModel().withIsWorkloadManagementNetworkEnabled(isWorkloadManagementNetworkEnabled); - return this; - } - - public NetworkFabricControllerImpl withIpv4AddressSpace(String ipv4AddressSpace) { - this.innerModel().withIpv4AddressSpace(ipv4AddressSpace); - return this; - } - - public NetworkFabricControllerImpl withIpv6AddressSpace(String ipv6AddressSpace) { - this.innerModel().withIpv6AddressSpace(ipv6AddressSpace); + public NetworkFabricControllerImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public NetworkFabricControllerImpl withNfcSku(NfcSku nfcSku) { - this.innerModel().withNfcSku(nfcSku); + public NetworkFabricControllerImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); return this; } @@ -296,12 +286,39 @@ public NetworkFabricControllerImpl withInfrastructureExpressRouteConnections( } } - public NetworkFabricControllerImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public NetworkFabricControllerImpl + withManagedResourceGroupConfiguration(ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + public NetworkFabricControllerImpl + withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { + this.innerModel().withIsWorkloadManagementNetworkEnabled(isWorkloadManagementNetworkEnabled); + return this; + } + + public NetworkFabricControllerImpl withIpv4AddressSpace(String ipv4AddressSpace) { + this.innerModel().withIpv4AddressSpace(ipv4AddressSpace); + return this; + } + + public NetworkFabricControllerImpl withIpv6AddressSpace(String ipv6AddressSpace) { + this.innerModel().withIpv6AddressSpace(ipv6AddressSpace); + return this; + } + + public NetworkFabricControllerImpl withNfcSku(NfcSku nfcSku) { + this.innerModel().withNfcSku(nfcSku); + return this; + } + + public NetworkFabricControllerImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java index 2e3260f6079f..34962e6c221e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricControllersListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllersListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,83 +53,136 @@ public final class NetworkFabricControllersClientImpl implements NetworkFabricCo /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkFabricControllersClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricControllersClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricControllersClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricControllersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabricControllers to be + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkFabricControllers to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkFabricControllers") public interface NetworkFabricControllersService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, - @BodyParam("application/json") NetworkFabricControllerInner body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, - @BodyParam("application/json") NetworkFabricControllerPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricControllerName") String networkFabricControllerName, - @HeaderParam("Accept") String accept, Context context); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") Stri @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -163,173 +230,92 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkFabricControllerName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, body, accept, context); - } - - /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricControllerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkFabricControllerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricControllerName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricControllerName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, accept, context); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricControllerInner> - beginCreate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricControllerName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, + String networkFabricControllerName) { + return getByResourceGroupWithResponse(resourceGroupName, networkFabricControllerName, Context.NONE).getValue(); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricControllerInner> beginCreate( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, - Context context) { - return this.beginCreateAsync(resourceGroupName, networkFabricControllerName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkFabricControllerName, NetworkFabricControllerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -338,18 +324,19 @@ public SyncPoller, NetworkFabricControl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricControllerName, + private Response createWithResponse(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { - return beginCreateAsync(resourceGroupName, networkFabricControllerName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, body, + Context.NONE); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -359,18 +346,19 @@ private Mono createAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricControllerName, + private Response createWithResponse(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricControllerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, body, + context); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -379,172 +367,113 @@ private Mono createAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body) { - return createAsync(resourceGroupName, networkFabricControllerName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkFabricControllerName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, + this.client.getContext()); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body, Context context) { - return createAsync(resourceGroupName, networkFabricControllerName, body, context).block(); - } - - /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkFabricControllerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricControllerInner> + beginCreate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { + Response response = createWithResponse(resourceGroupName, networkFabricControllerName, body); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, Context.NONE); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricControllerInner> beginCreate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, + Context context) { + Response response + = createWithResponse(resourceGroupName, networkFabricControllerName, body, context); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, context); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String networkFabricControllerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner body) { + return beginCreateAsync(resourceGroupName, networkFabricControllerName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricControllerName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName, context).block(); + public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner body) { + return beginCreate(resourceGroupName, networkFabricControllerName, body).getFinalResult(); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, - String networkFabricControllerName) { - return getByResourceGroupWithResponse(resourceGroupName, networkFabricControllerName, Context.NONE).getValue(); + public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner body, Context context) { + return beginCreate(resourceGroupName, networkFabricControllerName, body, context).getFinalResult(); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -559,111 +488,64 @@ public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. * @param body Network Fabric Controller properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, body, + Context.NONE); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. * @param body Network Fabric Controller properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, body, + context); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. * @param body Network Fabric Controller properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -671,19 +553,15 @@ private PollerFlux, NetworkFabricContro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, body, context); + = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - context); + this.client.getContext()); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -697,12 +575,12 @@ private PollerFlux, NetworkFabricContro @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginUpdate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricControllerName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkFabricControllerName, body); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, Context.NONE); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -718,12 +596,13 @@ private PollerFlux, NetworkFabricContro public SyncPoller, NetworkFabricControllerInner> beginUpdate( String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkFabricControllerName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkFabricControllerName, body, context); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, context); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -742,29 +621,6 @@ private Mono updateAsync(String resourceGroupName, } /** - * Updates a Network Fabric Controller. - * - * Updates are currently not supported for the Network Fabric Controller resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricControllerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -778,12 +634,10 @@ private Mono updateAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - return updateAsync(resourceGroupName, networkFabricControllerName, body).block(); + return beginUpdate(resourceGroupName, networkFabricControllerName, body).getFinalResult(); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -798,12 +652,10 @@ public NetworkFabricControllerInner update(String resourceGroupName, String netw @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, Context context) { - return updateAsync(resourceGroupName, networkFabricControllerName, body, context).block(); + return beginUpdate(resourceGroupName, networkFabricControllerName, body, context).getFinalResult(); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -816,95 +668,51 @@ public NetworkFabricControllerInner update(String resourceGroupName, String netw @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricControllerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkFabricControllerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, Context.NONE); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkFabricControllerName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricControllerName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, context); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -912,17 +720,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkFabricControllerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName, context); + String networkFabricControllerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -935,12 +739,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricControllerName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkFabricControllerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -954,12 +757,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkFabricControllerName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkFabricControllerName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -976,27 +778,6 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricCon } /** - * Deletes a Network Fabric Controller. - * - * Deletes the Network Fabric Controller resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricControllerName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricControllerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1007,12 +788,10 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricCon */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricControllerName) { - deleteAsync(resourceGroupName, networkFabricControllerName).block(); + beginDelete(resourceGroupName, networkFabricControllerName).getFinalResult(); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1024,102 +803,65 @@ public void delete(String resourceGroupName, String networkFabricControllerName) */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricControllerName, Context context) { - deleteAsync(resourceGroupName, networkFabricControllerName, context).block(); + beginDelete(resourceGroupName, networkFabricControllerName, context).getFinalResult(); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1127,34 +869,34 @@ private PagedFlux listByResourceGroupAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1162,133 +904,105 @@ public PagedIterable listByResourceGroup(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1298,18 +1012,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1319,6 +1026,24 @@ private Mono> listByResourceGroupNex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1327,24 +1052,16 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1354,18 +1071,11 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1375,6 +1085,24 @@ private Mono> listBySubscriptionNext .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1383,23 +1111,15 @@ private Mono> listBySubscriptionNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkFabricController items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java index 4112f9a66283..b60a46ca8a1e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String r String networkFabricControllerName, Context context) { Response inner = this.serviceClient() .getByResourceGroupWithResponse(resourceGroupName, networkFabricControllerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkFabricControllerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkFabricControllerImpl(inner.getValue(), this.manager())); } public NetworkFabricController getByResourceGroup(String resourceGroupName, String networkFabricControllerName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java index 5c20efd96917..d8c7acd0376a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,20 +9,48 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationResponse; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponse; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.QosProperties; +import com.azure.resourcemanager.managednetworkfabric.models.SecretRotationSummary; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse; import java.util.Collections; import java.util.List; import java.util.Map; @@ -57,6 +85,10 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -78,6 +110,19 @@ public List routerIds() { } } + public StorageAccountConfiguration storageAccountConfiguration() { + return this.innerModel().storageAccountConfiguration(); + } + + public List fabricLocks() { + List inner = this.innerModel().fabricLocks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String networkFabricControllerId() { return this.innerModel().networkFabricControllerId(); } @@ -137,6 +182,66 @@ public List l3IsolationDomains() { } } + public Integer hardwareAlertThreshold() { + return this.innerModel().hardwareAlertThreshold(); + } + + public List controlPlaneAcls() { + List inner = this.innerModel().controlPlaneAcls(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List featureFlags() { + List inner = this.innerModel().featureFlags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List trustedIpPrefixes() { + List inner = this.innerModel().trustedIpPrefixes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.innerModel().uniqueRdConfiguration(); + } + + public Integer storageArrayCount() { + return this.innerModel().storageArrayCount(); + } + + public List activeCommitBatches() { + List inner = this.innerModel().activeCommitBatches(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SecretRotationSummary secretRotationSummary() { + return this.innerModel().secretRotationSummary(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public AuthorizedTransceiverProperties authorizedTransceiver() { + return this.innerModel().authorizedTransceiver(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -149,6 +254,10 @@ public AdministrativeState administrativeState() { return this.innerModel().administrativeState(); } + public QosProperties qosConfiguration() { + return this.innerModel().qosConfiguration(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -248,57 +357,55 @@ public NetworkFabric refresh(Context context) { return this; } - public CommonPostActionResponseForDeviceUpdate provision() { + public OperationStatusResult provision() { return serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName); } - public CommonPostActionResponseForDeviceUpdate provision(Context context) { + public OperationStatusResult provision(Context context) { return serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName, context); } - public CommonPostActionResponseForDeviceUpdate deprovision() { + public OperationStatusResult deprovision() { return serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName); } - public CommonPostActionResponseForDeviceUpdate deprovision(Context context) { + public OperationStatusResult deprovision(Context context) { return serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName, context); } - public CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties body) { + public OperationStatusResult upgrade(UpgradeNetworkFabricProperties body) { return serviceManager.networkFabrics().upgrade(resourceGroupName, networkFabricName, body); } - public CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties body, Context context) { + public OperationStatusResult upgrade(UpgradeNetworkFabricProperties body, Context context) { return serviceManager.networkFabrics().upgrade(resourceGroupName, networkFabricName, body, context); } - public CommonPostActionResponseForStateUpdate refreshConfiguration() { + public OperationStatusResult refreshConfiguration() { return serviceManager.networkFabrics().refreshConfiguration(resourceGroupName, networkFabricName); } - public CommonPostActionResponseForStateUpdate refreshConfiguration(Context context) { + public OperationStatusResult refreshConfiguration(Context context) { return serviceManager.networkFabrics().refreshConfiguration(resourceGroupName, networkFabricName, context); } - public CommonPostActionResponseForStateUpdate - updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body) { return serviceManager.networkFabrics() .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body); } - public CommonPostActionResponseForStateUpdate - updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body, Context context) { + public UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body, + Context context) { return serviceManager.networkFabrics() .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); } - public CommonPostActionResponseForStateUpdate - updateInfraManagementBfdConfiguration(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(UpdateAdministrativeState body) { return serviceManager.networkFabrics() .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body); } - public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(UpdateAdministrativeState body, Context context) { return serviceManager.networkFabrics() .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); @@ -313,20 +420,92 @@ public ValidateConfigurationResponse validateConfiguration(ValidateConfiguration .validateConfiguration(resourceGroupName, networkFabricName, body, context); } - public ValidateConfigurationResponse getTopology() { + public GetTopologyResponse getTopology() { return serviceManager.networkFabrics().getTopology(resourceGroupName, networkFabricName); } - public ValidateConfigurationResponse getTopology(Context context) { + public GetTopologyResponse getTopology(Context context) { return serviceManager.networkFabrics().getTopology(resourceGroupName, networkFabricName, context); } - public CommonPostActionResponseForStateUpdate commitConfiguration() { + public CommitConfigurationResponse commitConfiguration() { return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName); } - public CommonPostActionResponseForStateUpdate commitConfiguration(Context context) { - return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName, context); + public CommitConfigurationResponse commitConfiguration(CommitConfigurationRequest body, Context context) { + return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName, body, context); + } + + public CommitBatchStatusOperationResponse commitBatchStatus(CommitBatchStatusRequest body) { + return serviceManager.networkFabrics().commitBatchStatus(resourceGroupName, networkFabricName, body); + } + + public CommitBatchStatusOperationResponse commitBatchStatus(CommitBatchStatusRequest body, Context context) { + return serviceManager.networkFabrics().commitBatchStatus(resourceGroupName, networkFabricName, body, context); + } + + public DiscardCommitBatchOperationResponse discardCommitBatch(DiscardCommitBatchRequest body) { + return serviceManager.networkFabrics().discardCommitBatch(resourceGroupName, networkFabricName, body); + } + + public DiscardCommitBatchOperationResponse discardCommitBatch(DiscardCommitBatchRequest body, Context context) { + return serviceManager.networkFabrics().discardCommitBatch(resourceGroupName, networkFabricName, body, context); + } + + public OperationStatusResult lockFabric(NetworkFabricLockRequest body) { + return serviceManager.networkFabrics().lockFabric(resourceGroupName, networkFabricName, body); + } + + public OperationStatusResult lockFabric(NetworkFabricLockRequest body, Context context) { + return serviceManager.networkFabrics().lockFabric(resourceGroupName, networkFabricName, body, context); + } + + public ViewDeviceConfigurationOperationResponse viewDeviceConfiguration() { + return serviceManager.networkFabrics().viewDeviceConfiguration(resourceGroupName, networkFabricName); + } + + public ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(Context context) { + return serviceManager.networkFabrics().viewDeviceConfiguration(resourceGroupName, networkFabricName, context); + } + + public ArmConfigurationDiffOperationResponse armConfigurationDiff() { + return serviceManager.networkFabrics().armConfigurationDiff(resourceGroupName, networkFabricName); + } + + public ArmConfigurationDiffOperationResponse armConfigurationDiff(Context context) { + return serviceManager.networkFabrics().armConfigurationDiff(resourceGroupName, networkFabricName, context); + } + + public NetworkFabricRotatePasswordsResponse rotatePasswords() { + return serviceManager.networkFabrics().rotatePasswords(resourceGroupName, networkFabricName); + } + + public NetworkFabricRotatePasswordsResponse rotatePasswords(Context context) { + return serviceManager.networkFabrics().rotatePasswords(resourceGroupName, networkFabricName, context); + } + + public NetworkFabricResyncPasswordsResponse resyncPasswords() { + return serviceManager.networkFabrics().resyncPasswords(resourceGroupName, networkFabricName); + } + + public NetworkFabricResyncPasswordsResponse resyncPasswords(Context context) { + return serviceManager.networkFabrics().resyncPasswords(resourceGroupName, networkFabricName, context); + } + + public NetworkFabricRotateCertificatesResponse rotateCertificates() { + return serviceManager.networkFabrics().rotateCertificates(resourceGroupName, networkFabricName); + } + + public NetworkFabricRotateCertificatesResponse rotateCertificates(Context context) { + return serviceManager.networkFabrics().rotateCertificates(resourceGroupName, networkFabricName, context); + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates() { + return serviceManager.networkFabrics().resyncCertificates(resourceGroupName, networkFabricName); + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates(Context context) { + return serviceManager.networkFabrics().resyncCertificates(resourceGroupName, networkFabricName, context); } public NetworkFabricImpl withRegion(Region location) { @@ -390,11 +569,21 @@ public NetworkFabricImpl withTags(Map tags) { } } + public NetworkFabricImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + public NetworkFabricImpl withFabricVersion(String fabricVersion) { this.innerModel().withFabricVersion(fabricVersion); return this; } + public NetworkFabricImpl withStorageAccountConfiguration(StorageAccountConfiguration storageAccountConfiguration) { + this.innerModel().withStorageAccountConfiguration(storageAccountConfiguration); + return this; + } + public NetworkFabricImpl withRackCount(Integer rackCount) { if (isInCreateMode()) { this.innerModel().withRackCount(rackCount); @@ -415,6 +604,66 @@ public NetworkFabricImpl withIpv6Prefix(String ipv6Prefix) { } } + public NetworkFabricImpl withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + if (isInCreateMode()) { + this.innerModel().withHardwareAlertThreshold(hardwareAlertThreshold); + return this; + } else { + this.updateBody.withHardwareAlertThreshold(hardwareAlertThreshold); + return this; + } + } + + public NetworkFabricImpl withControlPlaneAcls(List controlPlaneAcls) { + if (isInCreateMode()) { + this.innerModel().withControlPlaneAcls(controlPlaneAcls); + return this; + } else { + this.updateBody.withControlPlaneAcls(controlPlaneAcls); + return this; + } + } + + public NetworkFabricImpl withFeatureFlags(List featureFlags) { + if (isInCreateMode()) { + this.innerModel().withFeatureFlags(featureFlags); + return this; + } else { + this.updateBody.withFeatureFlags(featureFlags); + return this; + } + } + + public NetworkFabricImpl withTrustedIpPrefixes(List trustedIpPrefixes) { + if (isInCreateMode()) { + this.innerModel().withTrustedIpPrefixes(trustedIpPrefixes); + return this; + } else { + this.updateBody.withTrustedIpPrefixes(trustedIpPrefixes); + return this; + } + } + + public NetworkFabricImpl withUniqueRdConfiguration(UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.innerModel().withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + public NetworkFabricImpl withStorageArrayCount(Integer storageArrayCount) { + this.innerModel().withStorageArrayCount(storageArrayCount); + return this; + } + + public NetworkFabricImpl withAuthorizedTransceiver(AuthorizedTransceiverProperties authorizedTransceiver) { + this.innerModel().withAuthorizedTransceiver(authorizedTransceiver); + return this; + } + + public NetworkFabricImpl withQosConfiguration(QosProperties qosConfiguration) { + this.innerModel().withQosConfiguration(qosConfiguration); + return this; + } + public NetworkFabricImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -425,6 +674,11 @@ public NetworkFabricImpl withAnnotation(String annotation) { } } + public NetworkFabricImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + public NetworkFabricImpl withServerCountPerRack(Integer serverCountPerRack) { this.updateBody.withServerCountPerRack(serverCountPerRack); return this; @@ -435,19 +689,40 @@ public NetworkFabricImpl withFabricAsn(Long fabricAsn) { return this; } - public NetworkFabricImpl withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + public NetworkFabricImpl + withTerminalServerConfiguration(TerminalServerPatchConfiguration terminalServerConfiguration) { this.updateBody.withTerminalServerConfiguration(terminalServerConfiguration); return this; } - public NetworkFabricImpl withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + public NetworkFabricImpl + withManagementNetworkConfiguration(ManagementNetworkPatchConfiguration managementNetworkConfiguration) { this.updateBody.withManagementNetworkConfiguration(managementNetworkConfiguration); return this; } + public NetworkFabricImpl + withStorageAccountConfiguration(StorageAccountPatchConfiguration storageAccountConfiguration) { + this.updateBody.withStorageAccountConfiguration(storageAccountConfiguration); + return this; + } + + public NetworkFabricImpl withUniqueRdConfiguration(UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration) { + this.updateBody.withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + public NetworkFabricImpl withQosConfiguration(QosPatchProperties qosConfiguration) { + this.updateBody.withQosConfiguration(qosConfiguration); + return this; + } + + public NetworkFabricImpl withAuthorizedTransceiver(AuthorizedTransceiverPatchProperties authorizedTransceiver) { + this.updateBody.withAuthorizedTransceiver(authorizedTransceiver); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncCertificatesResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncCertificatesResponseImpl.java new file mode 100644 index 000000000000..d86c3a6296b7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncCertificatesResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkFabricResyncCertificatesResponseImpl implements NetworkFabricResyncCertificatesResponse { + private NetworkFabricResyncCertificatesResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkFabricResyncCertificatesResponseImpl(NetworkFabricResyncCertificatesResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkFabricResyncCertificatesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncPasswordsResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncPasswordsResponseImpl.java new file mode 100644 index 000000000000..b1551c070c5d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncPasswordsResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkFabricResyncPasswordsResponseImpl implements NetworkFabricResyncPasswordsResponse { + private NetworkFabricResyncPasswordsResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkFabricResyncPasswordsResponseImpl(NetworkFabricResyncPasswordsResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkFabricResyncPasswordsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotateCertificatesResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotateCertificatesResponseImpl.java new file mode 100644 index 000000000000..8056e612a171 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotateCertificatesResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkFabricRotateCertificatesResponseImpl implements NetworkFabricRotateCertificatesResponse { + private NetworkFabricRotateCertificatesResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkFabricRotateCertificatesResponseImpl(NetworkFabricRotateCertificatesResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkFabricRotateCertificatesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotatePasswordsResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotatePasswordsResponseImpl.java new file mode 100644 index 000000000000..619d12a52c37 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotatePasswordsResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkFabricRotatePasswordsResponseImpl implements NetworkFabricRotatePasswordsResponse { + private NetworkFabricRotatePasswordsResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkFabricRotatePasswordsResponseImpl(NetworkFabricRotatePasswordsResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkFabricRotatePasswordsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java index a96b43e134e5..7db2708ca202 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java index 38087a21f521..db6569d01284 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkusListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkusListResult; import reactor.core.publisher.Mono; /** @@ -42,41 +42,58 @@ public final class NetworkFabricSkusClientImpl implements NetworkFabricSkusClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkFabricSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricSkusClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricSkusClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabricSkus to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkFabricSkus to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkFabricSkus") public interface NetworkFabricSkusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("networkFabricSkuName") String networkFabricSkuName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("networkFabricSkuName") String networkFabricSkuName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -84,13 +101,19 @@ Mono> list(@HostParam("$host") String endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -102,61 +125,14 @@ Mono> listBySubscriptionNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkFabricSkuName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkFabricSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricSkuName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), networkFabricSkuName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), networkFabricSkuName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Fabric Sku. - * - * Implements Network Fabric SKU GET method. - * - * @param networkFabricSkuName Name of the Network Fabric SKU. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric SKU resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String networkFabricSkuName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkFabricSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - networkFabricSkuName, accept, context); - } - - /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -171,8 +147,6 @@ private Mono getAsync(String networkFabricSkuName) { } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -184,12 +158,12 @@ private Mono getAsync(String networkFabricSkuName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkFabricSkuName, Context context) { - return getWithResponseAsync(networkFabricSkuName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + networkFabricSkuName, accept, context); } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -204,123 +178,96 @@ public NetworkFabricSkuInner get(String networkFabricSkuName) { } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -330,17 +277,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -350,6 +291,24 @@ private Mono> listBySubscriptionNextSingleP .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -358,22 +317,14 @@ private Mono> listBySubscriptionNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabricSku items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java index 0eeacb38d226..2f296dbb900c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,12 +29,8 @@ public NetworkFabricSkusImpl(NetworkFabricSkusClient innerClient, public Response getWithResponse(String networkFabricSkuName, Context context) { Response inner = this.serviceClient().getWithResponse(networkFabricSkuName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkFabricSkuImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkFabricSkuImpl(inner.getValue(), this.manager())); } public NetworkFabricSku get(String networkFabricSkuName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java index ad4a4b4333cf..5e7a29822b8a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,17 +29,32 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; @@ -59,92 +74,155 @@ public final class NetworkFabricsClientImpl implements NetworkFabricsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkFabricsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabrics to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkFabrics to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkFabrics") public interface NetworkFabricsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") NetworkFabricInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") NetworkFabricPatch body, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> provision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> provision(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response provisionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -152,73 +230,140 @@ Mono>> provision(@HostParam("$host") String endpoint, @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deprovision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> deprovision(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deprovisionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") UpgradeNetworkFabricProperties body, @HeaderParam("Accept") String accept, + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpgradeNetworkFabricProperties body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpgradeNetworkFabricProperties body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> refreshConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateWorkloadManagementBfdConfiguration(@HostParam("$host") String endpoint, + Mono>> updateWorkloadManagementBfdConfiguration( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateWorkloadManagementBfdConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateInfraManagementBfdConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + Mono>> updateInfraManagementBfdConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateInfraManagementBfdConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") ValidateConfigurationProperties body, @HeaderParam("Accept") String accept, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateConfigurationProperties body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateConfigurationProperties body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getTopology(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> getTopology(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getTopologySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -226,9 +371,199 @@ Mono>> getTopology(@HostParam("$host") String endpoint @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> commitConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CommitConfigurationRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CommitConfigurationRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitBatchStatus") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitBatchStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CommitBatchStatusRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitBatchStatus") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitBatchStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CommitBatchStatusRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/discardCommitBatch") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> discardCommitBatch(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiscardCommitBatchRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/discardCommitBatch") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response discardCommitBatchSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiscardCommitBatchRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/lockFabric") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> lockFabric(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricLockRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/lockFabric") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response lockFabricSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricLockRequest body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/viewDeviceConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> viewDeviceConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/viewDeviceConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response viewDeviceConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/armConfigurationDiff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> armConfigurationDiff(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/armConfigurationDiff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response armConfigurationDiffSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotatePasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotatePasswords(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotatePasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rotatePasswordsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncPasswords(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncPasswords") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncPasswordsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotateCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateCertificates(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotateCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rotateCertificatesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncCertificates(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncCertificates") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncCertificatesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -237,7 +572,15 @@ Mono>> commitConfiguration(@HostParam("$host") String @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -245,14 +588,1464 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Get Network Fabric resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Network Fabric resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkFabricName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Network Fabric resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + } + + /** + * Get Network Fabric resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Fabric resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName) { + return getByResourceGroupWithResponse(resourceGroupName, networkFabricName, Context.NONE).getValue(); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, + NetworkFabricInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, + String networkFabricName, NetworkFabricInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner body) { + Response response = createWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, Context.NONE); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, context); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkFabricName, + NetworkFabricInner body) { + return beginCreateAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body) { + return beginCreate(resourceGroupName, networkFabricName, body).getFinalResult(); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body, + Context context) { + return beginCreate(resourceGroupName, networkFabricName, body, context).getFinalResult(); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, + NetworkFabricPatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricPatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, + String networkFabricName, NetworkFabricPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, + String networkFabricName, NetworkFabricPatch body) { + Response response = updateWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, Context.NONE); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, + String networkFabricName, NetworkFabricPatch body, Context context) { + Response response = updateWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, context); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkFabricName, + NetworkFabricPatch body) { + return beginUpdateAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { + return beginUpdate(resourceGroupName, networkFabricName, body).getFinalResult(); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body, + Context context) { + return beginUpdate(resourceGroupName, networkFabricName, body, context).getFinalResult(); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkFabricName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, Context.NONE); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, context); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName) { + Response response = deleteWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkFabricName) { + return beginDeleteAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkFabricName) { + beginDelete(resourceGroupName, networkFabricName).getFinalResult(); + } + + /** + * Delete Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkFabricName, Context context) { + beginDelete(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all the Network Fabric resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all the Network Fabric resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> provisionWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response provisionWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.provisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response provisionWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.provisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginProvisionAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginProvision(String resourceGroupName, String networkFabricName) { + Response response = provisionWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginProvision(String resourceGroupName, String networkFabricName, Context context) { + Response response = provisionWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono provisionAsync(String resourceGroupName, String networkFabricName) { + return beginProvisionAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner provision(String resourceGroupName, String networkFabricName) { + return beginProvision(resourceGroupName, networkFabricName).getFinalResult(); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner provision(String resourceGroupName, String networkFabricName, Context context) { + return beginProvision(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deprovisionWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deprovision(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deprovisionWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.deprovisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deprovisionWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.deprovisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginDeprovisionAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginDeprovision(String resourceGroupName, String networkFabricName) { + Response response = deprovisionWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginDeprovision(String resourceGroupName, String networkFabricName, Context context) { + Response response = deprovisionWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deprovisionAsync(String resourceGroupName, String networkFabricName) { + return beginDeprovisionAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner deprovision(String resourceGroupName, String networkFabricName) { + return beginDeprovision(resourceGroupName, networkFabricName).getFinalResult(); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner deprovision(String resourceGroupName, String networkFabricName, Context context) { + return beginDeprovision(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, + String networkFabricName, UpgradeNetworkFabricProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { + Response response = upgradeWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginUpgrade( + String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, Context context) { + Response response = upgradeWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body) { + return beginUpgradeAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner upgrade(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body) { + return beginUpgrade(resourceGroupName, networkFabricName, body).getFinalResult(); + } + + /** + * Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner upgrade(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body, Context context) { + return beginUpgrade(resourceGroupName, networkFabricName, body, context).getFinalResult(); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono + = refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshConfigurationAsync(String resourceGroupName, + String networkFabricName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner refreshConfiguration(String resourceGroupName, String networkFabricName) { + return beginRefreshConfiguration(resourceGroupName, networkFabricName).getFinalResult(); + } + + /** + * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner refreshConfiguration(String resourceGroupName, String networkFabricName, + Context context) { + return beginRefreshConfiguration(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateWorkloadManagementBfdConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -260,44 +2053,21 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWorkloadManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateWorkloadManagementBfdConfigurationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, Context.NONE); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -306,43 +2076,21 @@ private Mono>> createWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, body, accept, context); - } - - /** - * Create Network Fabric. - * - * Create Network Fabric resource. + private Response updateWorkloadManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateWorkloadManagementBfdConfigurationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context); + } + + /** + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -350,83 +2098,88 @@ private Mono>> createWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + private PollerFlux, UpdateAdministrativeStateResponseInner> + beginUpdateWorkloadManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Mono>> mono + = updateWorkloadManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, context); + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Response response + = updateWorkloadManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body, Context context) { + Response response + = updateWorkloadManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -434,19 +2187,18 @@ public SyncPoller, NetworkFabricInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body) { - return beginCreateAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + public UpdateAdministrativeStateResponseInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body) + .getFinalResult(); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -455,19 +2207,17 @@ private Mono createAsync(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public UpdateAdministrativeStateResponseInner updateWorkloadManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context) + .getFinalResult(); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -475,516 +2225,405 @@ private Mono createAsync(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body) { - return createAsync(resourceGroupName, networkFabricName, body).block(); + private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateInfraManagementBfdConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body, - Context context) { - return createAsync(resourceGroupName, networkFabricName, body, context).block(); + private Response updateInfraManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateInfraManagementBfdConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } + private Response updateInfraManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateInfraManagementBfdConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateAdministrativeStateResponseInner> + beginUpdateInfraManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Mono>> mono + = updateInfraManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkFabricName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Response response + = updateInfraManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body, Context context) { + Response response + = updateInfraManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Fabric resource details. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName) { - return getByResourceGroupWithResponse(resourceGroupName, networkFabricName, Context.NONE).getValue(); + private Mono updateInfraManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public UpdateAdministrativeStateResponseInner updateInfraManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, body, accept, context); - } - - /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + public UpdateAdministrativeStateResponseInner updateInfraManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context) + .getFinalResult(); + } + + /** + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, + String networkFabricName, ValidateConfigurationProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.validateConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Fabric. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * - * Update certain properties of the Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); + } + + /** + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + Mono>> mono + = validateConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @param context The context to associate with this operation. + * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + Response response = validateConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body) { - return beginUpdateAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + Response response + = validateConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @param context The context to associate with this operation. + * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricName, body, context).last() + private Mono validateConfigurationAsync(String resourceGroupName, + String networkFabricName, ValidateConfigurationProperties body) { + return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { - return updateAsync(resourceGroupName, networkFabricName, body).block(); + public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + return beginValidateConfiguration(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Validate configuration properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Fabric resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body, - Context context) { - return updateAsync(resourceGroupName, networkFabricName, body, context).block(); + public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + return beginValidateConfiguration(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, + private Mono>> getTopologyWithResponseAsync(String resourceGroupName, String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.getTopology(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Response getTopologyWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.getTopologySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -992,110 +2631,109 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response getTopologyWithResponse(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + final String accept = "application/json"; + return service.getTopologySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of topology of the underlying resources in the given Network Fabric + * instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName).getSyncPoller(); + private PollerFlux, GetTopologyResponseInner> + beginGetTopologyAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = getTopologyWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GetTopologyResponseInner.class, GetTopologyResponseInner.class, + this.client.getContext()); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public SyncPoller, GetTopologyResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName) { + Response response = getTopologyWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, + GetTopologyResponseInner.class, GetTopologyResponseInner.class, Context.NONE); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricName) { - return beginDeleteAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GetTopologyResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName, Context context) { + Response response = getTopologyWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, + GetTopologyResponseInner.class, GetTopologyResponseInner.class, context); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return topology of the underlying resources in the given Network Fabric instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricName, context).last() + private Mono getTopologyAsync(String resourceGroupName, String networkFabricName) { + return beginGetTopologyAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String networkFabricName) { - deleteAsync(resourceGroupName, networkFabricName).block(); + public GetTopologyResponseInner getTopology(String resourceGroupName, String networkFabricName) { + return beginGetTopology(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1103,1165 +2741,896 @@ public void delete(String resourceGroupName, String networkFabricName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String networkFabricName, Context context) { - deleteAsync(resourceGroupName, networkFabricName, context).block(); + public GetTopologyResponseInner getTopology(String resourceGroupName, String networkFabricName, Context context) { + return beginGetTopology(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, + String networkFabricName, CommitConfigurationRequest body) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + private Response commitConfigurationWithResponse(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, body, Context.NONE); + } + + /** + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body, Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, body, context); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CommitConfigurationResponseInner> + beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body) { + Mono>> mono + = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CommitConfigurationResponseInner.class, + CommitConfigurationResponseInner.class, this.client.getContext()); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CommitConfigurationResponseInner> + beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName) { + final CommitConfigurationRequest body = null; + Mono>> mono + = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CommitConfigurationResponseInner.class, + CommitConfigurationResponseInner.class, this.client.getContext()); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CommitConfigurationResponseInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName, CommitConfigurationRequest body) { + Response response = commitConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + CommitConfigurationResponseInner.class, CommitConfigurationResponseInner.class, Context.NONE); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CommitConfigurationResponseInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName) { + final CommitConfigurationRequest body = null; + Response response = commitConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + CommitConfigurationResponseInner.class, CommitConfigurationResponseInner.class, Context.NONE); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CommitConfigurationResponseInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName, CommitConfigurationRequest body, + Context context) { + Response response + = commitConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, + CommitConfigurationResponseInner.class, CommitConfigurationResponseInner.class, context); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync(String resourceGroupName, + String networkFabricName, CommitConfigurationRequest body) { + return beginCommitConfigurationAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync(String resourceGroupName, + String networkFabricName) { + final CommitConfigurationRequest body = null; + return beginCommitConfigurationAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public CommitConfigurationResponseInner commitConfiguration(String resourceGroupName, String networkFabricName) { + final CommitConfigurationRequest body = null; + return beginCommitConfiguration(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CommitConfigurationResponseInner commitConfiguration(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body, Context context) { + return beginCommitConfiguration(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionWithResponseAsync(String resourceGroupName, - String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } + private Mono>> commitBatchStatusWithResponseAsync(String resourceGroupName, + String networkFabricName, CommitBatchStatusRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.commitBatchStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.provision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + private Response commitBatchStatusWithResponse(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.commitBatchStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); + } + + /** + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginProvisionAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitBatchStatusWithResponse(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.commitBatchStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginProvisionAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, CommitBatchStatusOperationResponseInner> + beginCommitBatchStatusAsync(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body) { Mono>> mono - = provisionWithResponseAsync(resourceGroupName, networkFabricName, context); + = commitBatchStatusWithResponseAsync(resourceGroupName, networkFabricName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + .getLroResult(mono, + this.client.getHttpPipeline(), CommitBatchStatusOperationResponseInner.class, + CommitBatchStatusOperationResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginProvision(String resourceGroupName, String networkFabricName) { - return this.beginProvisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public SyncPoller, CommitBatchStatusOperationResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body) { + Response response = commitBatchStatusWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult(response, + CommitBatchStatusOperationResponseInner.class, CommitBatchStatusOperationResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginProvision(String resourceGroupName, String networkFabricName, Context context) { - return this.beginProvisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public SyncPoller, CommitBatchStatusOperationResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body, + Context context) { + Response response + = commitBatchStatusWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult(response, + CommitBatchStatusOperationResponseInner.class, CommitBatchStatusOperationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, - String networkFabricName) { - return beginProvisionAsync(resourceGroupName, networkFabricName).last() + private Mono commitBatchStatusAsync(String resourceGroupName, + String networkFabricName, CommitBatchStatusRequest body) { + return beginCommitBatchStatusAsync(resourceGroupName, networkFabricName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginProvisionAsync(resourceGroupName, networkFabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CommitBatchStatusOperationResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + return beginCommitBatchStatus(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName) { - return provisionAsync(resourceGroupName, networkFabricName).block(); + public CommitBatchStatusOperationResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + return beginCommitBatchStatus(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName, - Context context) { - return provisionAsync(resourceGroupName, networkFabricName, context).block(); + private Mono>> discardCommitBatchWithResponseAsync(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.discardCommitBatch(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deprovisionWithResponseAsync(String resourceGroupName, - String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } + private Response discardCommitBatchWithResponse(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deprovision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.discardCommitBatchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deprovisionWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deprovision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovisionAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + private Response discardCommitBatchWithResponse(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.discardCommitBatchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovisionAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, DiscardCommitBatchOperationResponseInner> + beginDiscardCommitBatchAsync(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { Mono>> mono - = deprovisionWithResponseAsync(resourceGroupName, networkFabricName, context); + = discardCommitBatchWithResponseAsync(resourceGroupName, networkFabricName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + .getLroResult(mono, + this.client.getHttpPipeline(), DiscardCommitBatchOperationResponseInner.class, + DiscardCommitBatchOperationResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovision(String resourceGroupName, String networkFabricName) { - return this.beginDeprovisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public SyncPoller, DiscardCommitBatchOperationResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body) { + Response response = discardCommitBatchWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult(response, + DiscardCommitBatchOperationResponseInner.class, DiscardCommitBatchOperationResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovision(String resourceGroupName, String networkFabricName, Context context) { - return this.beginDeprovisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, - String networkFabricName) { - return beginDeprovisionAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, DiscardCommitBatchOperationResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body, + Context context) { + Response response + = discardCommitBatchWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult(response, + DiscardCommitBatchOperationResponseInner.class, DiscardCommitBatchOperationResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginDeprovisionAsync(resourceGroupName, networkFabricName, context).last() + private Mono discardCommitBatchAsync(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body) { + return beginDiscardCommitBatchAsync(resourceGroupName, networkFabricName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, - String networkFabricName) { - return deprovisionAsync(resourceGroupName, networkFabricName).block(); + public DiscardCommitBatchOperationResponseInner discardCommitBatch(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body) { + return beginDiscardCommitBatch(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName, - Context context) { - return deprovisionAsync(resourceGroupName, networkFabricName, context).block(); + public DiscardCommitBatchOperationResponseInner discardCommitBatch(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body, Context context) { + return beginDiscardCommitBatch(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> lockFabricWithResponseAsync(String resourceGroupName, + String networkFabricName, NetworkFabricLockRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) + .withContext(context -> service.lockFabric(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, body, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + private Response lockFabricWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.lockFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response lockFabricWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.lockFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { - return this.beginUpgradeAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + private PollerFlux, OperationStatusResultInner> + beginLockFabricAsync(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body) { + Mono>> mono = lockFabricWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, - Context context) { - return this.beginUpgradeAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + public SyncPoller, OperationStatusResultInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body) { + Response response = lockFabricWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties body) { - return beginUpgradeAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginLockFabric( + String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body, Context context) { + Response response = lockFabricWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties body, Context context) { - return beginUpgradeAsync(resourceGroupName, networkFabricName, body, context).last() + private Mono lockFabricAsync(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + return beginLockFabricAsync(resourceGroupName, networkFabricName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, - UpgradeNetworkFabricProperties body) { - return upgradeAsync(resourceGroupName, networkFabricName, body).block(); + public OperationStatusResultInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + return beginLockFabric(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Network Fabric properties to update. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, - UpgradeNetworkFabricProperties body, Context context) { - return upgradeAsync(resourceGroupName, networkFabricName, body, context).block(); + public OperationStatusResultInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + return beginLockFabric(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, + private Mono>> viewDeviceConfigurationWithResponseAsync(String resourceGroupName, String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + context -> service.viewDeviceConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + private Response viewDeviceConfigurationWithResponse(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return service.viewDeviceConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response viewDeviceConfigurationWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.viewDeviceConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + PollerFlux, ViewDeviceConfigurationOperationResponseInner> + beginViewDeviceConfigurationAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); + = viewDeviceConfigurationWithResponseAsync(resourceGroupName, networkFabricName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), ViewDeviceConfigurationOperationResponseInner.class, + ViewDeviceConfigurationOperationResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkFabricName) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + SyncPoller, ViewDeviceConfigurationOperationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName) { + Response response = viewDeviceConfigurationWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, ViewDeviceConfigurationOperationResponseInner.class, + ViewDeviceConfigurationOperationResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2269,76 +3638,55 @@ private Mono>> refreshConfigurationWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + SyncPoller, ViewDeviceConfigurationOperationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName, Context context) { + Response response + = viewDeviceConfigurationWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, ViewDeviceConfigurationOperationResponseInner.class, + ViewDeviceConfigurationOperationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, + private Mono viewDeviceConfigurationAsync(String resourceGroupName, String networkFabricName) { - return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName, context).last() + return beginViewDeviceConfigurationAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + public ViewDeviceConfigurationOperationResponseInner viewDeviceConfiguration(String resourceGroupName, String networkFabricName) { - return refreshConfigurationAsync(resourceGroupName, networkFabricName).block(); + return beginViewDeviceConfiguration(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2346,980 +3694,746 @@ public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + public ViewDeviceConfigurationOperationResponseInner viewDeviceConfiguration(String resourceGroupName, String networkFabricName, Context context) { - return refreshConfigurationAsync(resourceGroupName, networkFabricName, context).block(); + return beginViewDeviceConfiguration(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> armConfigurationDiffWithResponseAsync(String resourceGroupName, + String networkFabricName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateWorkloadManagementBfdConfiguration(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, - body, accept, context)) + .withContext(context -> service.armConfigurationDiff(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateWorkloadManagementBfdConfiguration(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, body, - accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + private Response armConfigurationDiffWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.armConfigurationDiffSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateWorkloadManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - Mono>> mono - = updateWorkloadManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response armConfigurationDiffWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.armConfigurationDiffSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateWorkloadManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWorkloadManagementBfdConfigurationWithResponseAsync( - resourceGroupName, networkFabricName, body, context); + PollerFlux, ArmConfigurationDiffOperationResponseInner> + beginArmConfigurationDiffAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono + = armConfigurationDiffWithResponseAsync(resourceGroupName, networkFabricName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult(mono, + this.client.getHttpPipeline(), ArmConfigurationDiffOperationResponseInner.class, + ArmConfigurationDiffOperationResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - return this.beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) - .getSyncPoller(); + SyncPoller, ArmConfigurationDiffOperationResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName) { + Response response = armConfigurationDiffWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, ArmConfigurationDiffOperationResponseInner.class, + ArmConfigurationDiffOperationResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body, Context context) { - return this - .beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .getSyncPoller(); + SyncPoller, ArmConfigurationDiffOperationResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName, Context context) { + Response response = armConfigurationDiffWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, ArmConfigurationDiffOperationResponseInner.class, + ArmConfigurationDiffOperationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWorkloadManagementBfdConfigurationAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).last() + private Mono armConfigurationDiffAsync(String resourceGroupName, + String networkFabricName) { + return beginArmConfigurationDiffAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWorkloadManagementBfdConfigurationAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + public ArmConfigurationDiffOperationResponseInner armConfigurationDiff(String resourceGroupName, + String networkFabricName) { + return beginArmConfigurationDiff(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public ArmConfigurationDiffOperationResponseInner armConfigurationDiff(String resourceGroupName, + String networkFabricName, Context context) { + return beginArmConfigurationDiff(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .block(); + private Mono>> rotatePasswordsWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.rotatePasswords(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response rotatePasswordsWithResponse(String resourceGroupName, String networkFabricName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateInfraManagementBfdConfiguration(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, - body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.rotatePasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateInfraManagementBfdConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context); - } - - /** - * Implements the operation to the underlying resources. + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateInfraManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - Mono>> mono - = updateInfraManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rotatePasswordsWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.rotatePasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateInfraManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateInfraManagementBfdConfigurationWithResponseAsync( - resourceGroupName, networkFabricName, body, context); + private PollerFlux, NetworkFabricRotatePasswordsResponseInner> + beginRotatePasswordsAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = rotatePasswordsWithResponseAsync(resourceGroupName, networkFabricName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkFabricRotatePasswordsResponseInner.class, + NetworkFabricRotatePasswordsResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - return this.beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) - .getSyncPoller(); + public SyncPoller, NetworkFabricRotatePasswordsResponseInner> + beginRotatePasswords(String resourceGroupName, String networkFabricName) { + Response response = rotatePasswordsWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, NetworkFabricRotatePasswordsResponseInner.class, + NetworkFabricRotatePasswordsResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body, Context context) { - return this.beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .getSyncPoller(); + public SyncPoller, NetworkFabricRotatePasswordsResponseInner> + beginRotatePasswords(String resourceGroupName, String networkFabricName, Context context) { + Response response = rotatePasswordsWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, NetworkFabricRotatePasswordsResponseInner.class, + NetworkFabricRotatePasswordsResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateInfraManagementBfdConfigurationAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - return beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateInfraManagementBfdConfigurationAsync( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - return beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .last() + private Mono rotatePasswordsAsync(String resourceGroupName, + String networkFabricName) { + return beginRotatePasswordsAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, - String networkFabricName, UpdateAdministrativeState body) { - return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public NetworkFabricRotatePasswordsResponseInner rotatePasswords(String resourceGroupName, + String networkFabricName) { + return beginRotatePasswords(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Rotate all passwords on the Terminal Server and Network Devices. * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, - String networkFabricName, UpdateAdministrativeState body, Context context) { - return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + public NetworkFabricRotatePasswordsResponseInner rotatePasswords(String resourceGroupName, String networkFabricName, + Context context) { + return beginRotatePasswords(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String networkFabricName, ValidateConfigurationProperties body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono>> resyncPasswordsWithResponseAsync(String resourceGroupName, + String networkFabricName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) + .withContext(context -> service.resyncPasswords(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String networkFabricName, ValidateConfigurationProperties body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context); - } - - /** - * Implements the operation to the underlying resources. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncPasswordsWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncPasswordsWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.resyncPasswordsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginValidateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + private PollerFlux, NetworkFabricResyncPasswordsResponseInner> + beginResyncPasswordsAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = resyncPasswordsWithResponseAsync(resourceGroupName, networkFabricName); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkFabricResyncPasswordsResponseInner.class, + NetworkFabricResyncPasswordsResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginValidateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .getSyncPoller(); + public SyncPoller, NetworkFabricResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkFabricName) { + Response response = resyncPasswordsWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, NetworkFabricResyncPasswordsResponseInner.class, + NetworkFabricResyncPasswordsResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String networkFabricName, ValidateConfigurationProperties body) { - return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricResyncPasswordsResponseInner> + beginResyncPasswords(String resourceGroupName, String networkFabricName, Context context) { + Response response = resyncPasswordsWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, NetworkFabricResyncPasswordsResponseInner.class, + NetworkFabricResyncPasswordsResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String networkFabricName, ValidateConfigurationProperties body, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body, context).last() + private Mono resyncPasswordsAsync(String resourceGroupName, + String networkFabricName) { + return beginResyncPasswordsAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body) { - return validateConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public NetworkFabricResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, + String networkFabricName) { + return beginResyncPasswords(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Resync the latest passwords to the Terminal Server and Network Devices. * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param body Validate configuration properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body, Context context) { - return validateConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + public NetworkFabricResyncPasswordsResponseInner resyncPasswords(String resourceGroupName, String networkFabricName, + Context context) { + return beginResyncPasswords(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getTopologyWithResponseAsync(String resourceGroupName, + private Mono>> rotateCertificatesWithResponseAsync(String resourceGroupName, String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getTopology(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.rotateCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getTopologyWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getTopology(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. + private Response rotateCertificatesWithResponse(String resourceGroupName, String networkFabricName) { + final String accept = "application/json"; + return service.rotateCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + } + + /** + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of topology of the underlying resources in the given Network Fabric - * instance. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginGetTopologyAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = getTopologyWithResponseAsync(resourceGroupName, networkFabricName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rotateCertificatesWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.rotateCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of topology of the underlying resources in the given Network Fabric - * instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginGetTopologyAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + private + PollerFlux, NetworkFabricRotateCertificatesResponseInner> + beginRotateCertificatesAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = getTopologyWithResponseAsync(resourceGroupName, networkFabricName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + = rotateCertificatesWithResponseAsync(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkFabricRotateCertificatesResponseInner.class, + NetworkFabricRotateCertificatesResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric - * instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginGetTopology(String resourceGroupName, String networkFabricName) { - return this.beginGetTopologyAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public + SyncPoller, NetworkFabricRotateCertificatesResponseInner> + beginRotateCertificates(String resourceGroupName, String networkFabricName) { + Response response = rotateCertificatesWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, NetworkFabricRotateCertificatesResponseInner.class, + NetworkFabricRotateCertificatesResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3327,136 +4441,126 @@ private Mono>> getTopologyWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric - * instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginGetTopology(String resourceGroupName, String networkFabricName, Context context) { - return this.beginGetTopologyAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public + SyncPoller, NetworkFabricRotateCertificatesResponseInner> + beginRotateCertificates(String resourceGroupName, String networkFabricName, Context context) { + Response response = rotateCertificatesWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, NetworkFabricRotateCertificatesResponseInner.class, + NetworkFabricRotateCertificatesResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTopologyAsync(String resourceGroupName, + private Mono rotateCertificatesAsync(String resourceGroupName, String networkFabricName) { - return beginGetTopologyAsync(resourceGroupName, networkFabricName).last() + return beginRotateCertificatesAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance on successful completion of - * {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTopologyAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginGetTopologyAsync(resourceGroupName, networkFabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public NetworkFabricRotateCertificatesResponseInner rotateCertificates(String resourceGroupName, + String networkFabricName) { + return beginRotateCertificates(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Rotate all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName) { - return getTopologyAsync(resourceGroupName, networkFabricName).block(); + public NetworkFabricRotateCertificatesResponseInner rotateCertificates(String resourceGroupName, + String networkFabricName, Context context) { + return beginRotateCertificates(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return topology of the underlying resources in the given Network Fabric instance. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName, - Context context) { - return getTopologyAsync(resourceGroupName, networkFabricName, context).block(); + private Mono>> resyncCertificatesWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.resyncCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } + private Response resyncCertificatesWithResponse(String resourceGroupName, String networkFabricName) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.resyncCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3464,107 +4568,70 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + private Response resyncCertificatesWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.resyncCertificatesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + PollerFlux, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificatesAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); + = resyncCertificatesWithResponseAsync(resourceGroupName, networkFabricName); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginCommitConfiguration(String resourceGroupName, String networkFabricName) { - return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkFabricName) { + Response response = resyncCertificatesWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3572,76 +4639,63 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + SyncPoller, NetworkFabricResyncCertificatesResponseInner> + beginResyncCertificates(String resourceGroupName, String networkFabricName, Context context) { + Response response = resyncCertificatesWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, NetworkFabricResyncCertificatesResponseInner.class, + NetworkFabricResyncCertificatesResponseInner.class, context); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, + private Mono resyncCertificatesAsync(String resourceGroupName, String networkFabricName) { - return beginCommitConfigurationAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context).last() + return beginResyncCertificatesAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, + public NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkFabricName) { - return commitConfigurationAsync(resourceGroupName, networkFabricName).block(); + return beginResyncCertificates(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. + * Re-sync all certificates on Network Devices. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3649,12 +4703,12 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, + public NetworkFabricResyncCertificatesResponseInner resyncCertificates(String resourceGroupName, String networkFabricName, Context context) { - return commitConfigurationAsync(resourceGroupName, networkFabricName, context).block(); + return beginResyncCertificates(resourceGroupName, networkFabricName, context).getFinalResult(); } /** @@ -3664,17 +4718,11 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabric items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -3684,6 +4732,24 @@ private Mono> listByResourceGroupNextSinglePag .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -3692,23 +4758,15 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -3718,17 +4776,11 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabric items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -3738,6 +4790,24 @@ private Mono> listBySubscriptionNextSinglePage .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -3746,22 +4816,14 @@ private Mono> listBySubscriptionNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkFabric items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java index 6e29df22b4cf..748db0768731 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,18 +10,42 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse; public final class NetworkFabricsImpl implements NetworkFabrics { private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricsImpl.class); @@ -40,12 +64,8 @@ public Response getByResourceGroupWithResponse(String resourceGro Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkFabricName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkFabricImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkFabricImpl(inner.getValue(), this.manager())); } public NetworkFabric getByResourceGroup(String resourceGroupName, String networkFabricName) { @@ -85,131 +105,125 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkFabricImpl(inner1, this.manager())); } - public CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName) { - CommonPostActionResponseForDeviceUpdateInner inner - = this.serviceClient().provision(resourceGroupName, networkFabricName); + public OperationStatusResult provision(String resourceGroupName, String networkFabricName) { + OperationStatusResultInner inner = this.serviceClient().provision(resourceGroupName, networkFabricName); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName, - Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + public OperationStatusResult provision(String resourceGroupName, String networkFabricName, Context context) { + OperationStatusResultInner inner = this.serviceClient().provision(resourceGroupName, networkFabricName, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName) { - CommonPostActionResponseForDeviceUpdateInner inner - = this.serviceClient().deprovision(resourceGroupName, networkFabricName); + public OperationStatusResult deprovision(String resourceGroupName, String networkFabricName) { + OperationStatusResultInner inner = this.serviceClient().deprovision(resourceGroupName, networkFabricName); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName, - Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + public OperationStatusResult deprovision(String resourceGroupName, String networkFabricName, Context context) { + OperationStatusResultInner inner = this.serviceClient().deprovision(resourceGroupName, networkFabricName, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, + public OperationStatusResult upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().upgrade(resourceGroupName, networkFabricName, body); + OperationStatusResultInner inner = this.serviceClient().upgrade(resourceGroupName, networkFabricName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, + public OperationStatusResult upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, Context context) { - CommonPostActionResponseForStateUpdateInner inner + OperationStatusResultInner inner = this.serviceClient().upgrade(resourceGroupName, networkFabricName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, - String networkFabricName) { - CommonPostActionResponseForStateUpdateInner inner + public OperationStatusResult refreshConfiguration(String resourceGroupName, String networkFabricName) { + OperationStatusResultInner inner = this.serviceClient().refreshConfiguration(resourceGroupName, networkFabricName); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, - String networkFabricName, Context context) { - CommonPostActionResponseForStateUpdateInner inner + public OperationStatusResult refreshConfiguration(String resourceGroupName, String networkFabricName, + Context context) { + OperationStatusResultInner inner = this.serviceClient().refreshConfiguration(resourceGroupName, networkFabricName, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new OperationStatusResultImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(String resourceGroupName, + public UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(String resourceGroupName, + public UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(String resourceGroupName, + public UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(String resourceGroupName, + public UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } @@ -237,44 +251,236 @@ public ValidateConfigurationResponse validateConfiguration(String resourceGroupN } } - public ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName) { - ValidateConfigurationResponseInner inner - = this.serviceClient().getTopology(resourceGroupName, networkFabricName); + public GetTopologyResponse getTopology(String resourceGroupName, String networkFabricName) { + GetTopologyResponseInner inner = this.serviceClient().getTopology(resourceGroupName, networkFabricName); if (inner != null) { - return new ValidateConfigurationResponseImpl(inner, this.manager()); + return new GetTopologyResponseImpl(inner, this.manager()); } else { return null; } } - public ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName, - Context context) { - ValidateConfigurationResponseInner inner + public GetTopologyResponse getTopology(String resourceGroupName, String networkFabricName, Context context) { + GetTopologyResponseInner inner = this.serviceClient().getTopology(resourceGroupName, networkFabricName, context); if (inner != null) { - return new ValidateConfigurationResponseImpl(inner, this.manager()); + return new GetTopologyResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, - String networkFabricName) { - CommonPostActionResponseForStateUpdateInner inner + public CommitConfigurationResponse commitConfiguration(String resourceGroupName, String networkFabricName) { + CommitConfigurationResponseInner inner = this.serviceClient().commitConfiguration(resourceGroupName, networkFabricName); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new CommitConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommitConfigurationResponse commitConfiguration(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body, Context context) { + CommitConfigurationResponseInner inner + = this.serviceClient().commitConfiguration(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommitConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommitBatchStatusOperationResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + CommitBatchStatusOperationResponseInner inner + = this.serviceClient().commitBatchStatus(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommitBatchStatusOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommitBatchStatusOperationResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + CommitBatchStatusOperationResponseInner inner + = this.serviceClient().commitBatchStatus(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommitBatchStatusOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiscardCommitBatchOperationResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + DiscardCommitBatchOperationResponseInner inner + = this.serviceClient().discardCommitBatch(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new DiscardCommitBatchOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiscardCommitBatchOperationResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context) { + DiscardCommitBatchOperationResponseInner inner + = this.serviceClient().discardCommitBatch(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new DiscardCommitBatchOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + OperationStatusResultInner inner = this.serviceClient().lockFabric(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + OperationStatusResultInner inner + = this.serviceClient().lockFabric(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(String resourceGroupName, + String networkFabricName) { + ViewDeviceConfigurationOperationResponseInner inner + = this.serviceClient().viewDeviceConfiguration(resourceGroupName, networkFabricName); + if (inner != null) { + return new ViewDeviceConfigurationOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(String resourceGroupName, + String networkFabricName, Context context) { + ViewDeviceConfigurationOperationResponseInner inner + = this.serviceClient().viewDeviceConfiguration(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new ViewDeviceConfigurationOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArmConfigurationDiffOperationResponse armConfigurationDiff(String resourceGroupName, + String networkFabricName) { + ArmConfigurationDiffOperationResponseInner inner + = this.serviceClient().armConfigurationDiff(resourceGroupName, networkFabricName); + if (inner != null) { + return new ArmConfigurationDiffOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArmConfigurationDiffOperationResponse armConfigurationDiff(String resourceGroupName, + String networkFabricName, Context context) { + ArmConfigurationDiffOperationResponseInner inner + = this.serviceClient().armConfigurationDiff(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new ArmConfigurationDiffOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricRotatePasswordsResponse rotatePasswords(String resourceGroupName, String networkFabricName) { + NetworkFabricRotatePasswordsResponseInner inner + = this.serviceClient().rotatePasswords(resourceGroupName, networkFabricName); + if (inner != null) { + return new NetworkFabricRotatePasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricRotatePasswordsResponse rotatePasswords(String resourceGroupName, String networkFabricName, + Context context) { + NetworkFabricRotatePasswordsResponseInner inner + = this.serviceClient().rotatePasswords(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new NetworkFabricRotatePasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkFabricName) { + NetworkFabricResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkFabricName); + if (inner != null) { + return new NetworkFabricResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkFabricName, + Context context) { + NetworkFabricResyncPasswordsResponseInner inner + = this.serviceClient().resyncPasswords(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new NetworkFabricResyncPasswordsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricRotateCertificatesResponse rotateCertificates(String resourceGroupName, + String networkFabricName) { + NetworkFabricRotateCertificatesResponseInner inner + = this.serviceClient().rotateCertificates(resourceGroupName, networkFabricName); + if (inner != null) { + return new NetworkFabricRotateCertificatesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricRotateCertificatesResponse rotateCertificates(String resourceGroupName, + String networkFabricName, Context context) { + NetworkFabricRotateCertificatesResponseInner inner + = this.serviceClient().rotateCertificates(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new NetworkFabricRotateCertificatesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, + String networkFabricName) { + NetworkFabricResyncCertificatesResponseInner inner + = this.serviceClient().resyncCertificates(resourceGroupName, networkFabricName); + if (inner != null) { + return new NetworkFabricResyncCertificatesResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, + public NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, String networkFabricName, Context context) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().commitConfiguration(resourceGroupName, networkFabricName, context); + NetworkFabricResyncCertificatesResponseInner inner + = this.serviceClient().resyncCertificates(resourceGroupName, networkFabricName, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkFabricResyncCertificatesResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java index cba6aa445442..a848946812b3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,12 +8,16 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class NetworkInterfaceImpl implements NetworkInterface, NetworkInterface.Definition, NetworkInterface.Update { @@ -33,6 +37,10 @@ public String type() { return this.innerModel().type(); } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -57,6 +65,22 @@ public String ipv6Address() { return this.innerModel().ipv6Address(); } + public String description() { + return this.innerModel().description(); + } + + public String additionalDescription() { + return this.innerModel().additionalDescription(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -65,6 +89,10 @@ public AdministrativeState administrativeState() { return this.innerModel().administrativeState(); } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -160,17 +188,32 @@ public NetworkInterface refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.networkInterfaces() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.networkInterfaces() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); } + public NetworkInterfaceImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public NetworkInterfaceImpl withAdditionalDescription(String additionalDescription) { + if (isInCreateMode()) { + this.innerModel().withAdditionalDescription(additionalDescription); + return this; + } else { + this.updateBody.withAdditionalDescription(additionalDescription); + return this; + } + } + public NetworkInterfaceImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -181,7 +224,12 @@ public NetworkInterfaceImpl withAnnotation(String annotation) { } } + public NetworkInterfaceImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java index 8869118f3efe..7118eab154d6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,16 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfacesList; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,299 +56,274 @@ public final class NetworkInterfacesClientImpl implements NetworkInterfacesClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkInterfacesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkInterfacesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkInterfacesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkInterfacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkInterfaces to be used by + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkInterfaces to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkInterfaces") public interface NetworkInterfacesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, - @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") NetworkInterfaceInner body, @HeaderParam("Accept") String accept, + @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfaceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfaceInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") NetworkInterfacePatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfacePatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfacePatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, - @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("networkInterfaceName") String networkInterfaceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkDevice(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByNetworkDevice(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkDeviceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNetworkDeviceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkDeviceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource along with {@link Response} on successful completion of + * @return the Network Interface resource details along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String networkDeviceName, String networkInterfaceName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Interface resource details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context); - } - - /** - * Create NetworkInterface. - * - * Create a Network Interface resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the NetworkInterface resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginCreateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, - this.client.getContext()); + private Mono getAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName) { + return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the NetworkInterface resource. + * @return the Network Interface resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginCreateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, networkDeviceName, networkInterfaceName, accept, context); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. + * @return the Network Interface resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { + return getWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE).getValue(); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. + * @return defines the NetworkInterface resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -357,18 +333,19 @@ public SyncPoller, NetworkInterfaceInner> begi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, + private Response createWithResponse(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { - return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, Context.NONE); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -379,18 +356,19 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, + private Response createWithResponse(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, context); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -400,185 +378,118 @@ private Mono createAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource. + * @return the {@link PollerFlux} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body) { - return createAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkInterfaceInner> beginCreateAsync( + String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, + this.client.getContext()); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body, Context context) { - return createAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).block(); - } - - /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { + Response response + = createWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, Context.NONE); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName) { - return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner body) { + return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details along with {@link Response}. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context) { - return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).block(); + public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner body) { + return beginCreate(resourceGroupName, networkDeviceName, networkInterfaceName, body).getFinalResult(); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Interface resource details. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return getWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE).getValue(); + public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner body, Context context) { + return beginCreate(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).getFinalResult(); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -594,123 +505,67 @@ public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfacePatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, Context.NONE); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the NetworkInterface resource. + * @return defines the NetworkInterface resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginUpdateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfacePatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, context); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -718,18 +573,15 @@ private PollerFlux, NetworkInterfaceInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfaceInner> beginUpdateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); + this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, + this.client.getContext()); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -744,12 +596,13 @@ private PollerFlux, NetworkInterfaceInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, Context.NONE); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -765,13 +618,13 @@ public SyncPoller, NetworkInterfaceInner> begi @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -791,30 +644,6 @@ private Mono updateAsync(String resourceGroupName, String } /** - * Updates a NetworkInterface. - * - * Update certain properties of the Network Interface resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -829,12 +658,10 @@ private Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - return updateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + return beginUpdate(resourceGroupName, networkDeviceName, networkInterfaceName, body).getFinalResult(); } /** - * Updates a NetworkInterface. - * * Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -850,12 +677,10 @@ public NetworkInterfaceInner update(String resourceGroupName, String networkDevi @ServiceMethod(returns = ReturnType.SINGLE) public NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, Context context) { - return updateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).block(); + return beginUpdate(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).getFinalResult(); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -869,108 +694,55 @@ public NetworkInterfaceInner update(String resourceGroupName, String networkDevi @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, context); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -978,17 +750,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context) { - context = this.client.mergeContext(context); + String networkInterfaceName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context); + = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1002,12 +771,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1022,13 +790,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1046,29 +813,6 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam } /** - * Deletes a NetworkInterface. - * - * Delete the Network Interface resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - Context context) { - return beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1080,12 +824,10 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - deleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName).block(); + beginDelete(resourceGroupName, networkDeviceName, networkInterfaceName).getFinalResult(); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1099,12 +841,10 @@ public void delete(String resourceGroupName, String networkDeviceName, String ne @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - deleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).block(); + beginDelete(resourceGroupName, networkDeviceName, networkInterfaceName, context).getFinalResult(); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,81 +852,39 @@ public void delete(String resourceGroupName, String networkDeviceName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkInterface items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkDeviceSinglePageAsync(String resourceGroupName, String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByNetworkDevice(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.listByNetworkDevice(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetworkDeviceSinglePageAsync(String resourceGroupName, - String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByNetworkDevice(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + String networkDeviceName) { + return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName), + nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink)); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1194,18 +892,20 @@ private Mono> listByNetworkDeviceSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkInterface items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceSinglePage(String resourceGroupName, String networkDeviceName) { - return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName), - nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1214,18 +914,20 @@ private PagedFlux listByNetworkDeviceAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkInterface items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceSinglePage(String resourceGroupName, String networkDeviceName, Context context) { - return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName, context), - nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1233,17 +935,16 @@ private PagedFlux listByNetworkDeviceAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName) { - return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName)); + return new PagedIterable<>(() -> listByNetworkDeviceSinglePage(resourceGroupName, networkDeviceName), + nextLink -> listByNetworkDeviceNextSinglePage(nextLink)); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1252,17 +953,16 @@ public PagedIterable listByNetworkDevice(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context) { - return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName, context)); + return new PagedIterable<>(() -> listByNetworkDeviceSinglePage(resourceGroupName, networkDeviceName, context), + nextLink -> listByNetworkDeviceNextSinglePage(nextLink, context)); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1272,155 +972,89 @@ public PagedIterable listByNetworkDevice(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkDeviceName, - networkInterfaceName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, + networkInterfaceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, - context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, Context.NONE); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, UpdateAdministrativeState body) { - Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - networkDeviceName, networkInterfaceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, context); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String networkInterfaceName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - networkDeviceName, networkInterfaceName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + networkDeviceName, networkInterfaceName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1430,21 +1064,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1455,22 +1088,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, - context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, + networkInterfaceName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1480,10 +1111,10 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body) .last() @@ -1491,50 +1122,25 @@ private Mono updateAdministrativeSt } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the admin state of the network interface. - * - * Update the admin state of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body) + .getFinalResult(); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1545,13 +1151,13 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .block(); + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) + .getFinalResult(); } /** @@ -1561,17 +1167,11 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkInterface items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkDeviceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1581,6 +1181,24 @@ private Mono> listByNetworkDeviceNextSingle .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkInterface items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1589,22 +1207,14 @@ private Mono> listByNetworkDeviceNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkInterface items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetworkDeviceNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByNetworkDeviceNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNetworkDeviceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNetworkDeviceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java index a88ce1e5753b..f51d21de5b9e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,12 +10,12 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaces; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class NetworkInterfacesImpl implements NetworkInterfaces { private static final ClientLogger LOGGER = new ClientLogger(NetworkInterfacesImpl.class); @@ -34,12 +34,8 @@ public Response getWithResponse(String resourceGroupName, Stri String networkInterfaceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkInterfaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkInterfaceImpl(inner.getValue(), this.manager())); } public NetworkInterface get(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { @@ -74,23 +70,23 @@ public PagedIterable listByNetworkDevice(String resourceGroupN return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkInterfaceImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java new file mode 100644 index 000000000000..3fe5a586a646 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Collections; +import java.util.Map; + +public final class NetworkMonitorImpl implements NetworkMonitor, NetworkMonitor.Definition, NetworkMonitor.Update { + private NetworkMonitorInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BmpConfigurationProperties bmpConfiguration() { + return this.innerModel().bmpConfiguration(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkMonitorInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkMonitorName; + + private NetworkMonitorPatch updateBody; + + public NetworkMonitorImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkMonitor create() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .create(resourceGroupName, networkMonitorName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkMonitor create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .create(resourceGroupName, networkMonitorName, this.innerModel(), context); + return this; + } + + NetworkMonitorImpl(String name, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkMonitorInner(); + this.serviceManager = serviceManager; + this.networkMonitorName = name; + } + + public NetworkMonitorImpl update() { + this.updateBody = new NetworkMonitorPatch(); + return this; + } + + public NetworkMonitor apply() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .update(resourceGroupName, networkMonitorName, updateBody, Context.NONE); + return this; + } + + public NetworkMonitor apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .update(resourceGroupName, networkMonitorName, updateBody, context); + return this; + } + + NetworkMonitorImpl(NetworkMonitorInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkMonitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkMonitors"); + } + + public NetworkMonitor refresh() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE) + .getValue(); + return this; + } + + public NetworkMonitor refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context) + .getValue(); + return this; + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.networkMonitors().updateAdministrativeState(resourceGroupName, networkMonitorName, body); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + Context context) { + return serviceManager.networkMonitors() + .updateAdministrativeState(resourceGroupName, networkMonitorName, body, context); + } + + public NetworkMonitorImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkMonitorImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkMonitorImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NetworkMonitorImpl withBmpConfiguration(BmpConfigurationProperties bmpConfiguration) { + this.innerModel().withBmpConfiguration(bmpConfiguration); + return this; + } + + public NetworkMonitorImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); + return this; + } + + public NetworkMonitorImpl withBmpConfiguration(BmpConfigurationPatchProperties bmpConfiguration) { + this.updateBody.withBmpConfiguration(bmpConfiguration); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java new file mode 100644 index 000000000000..7f210bc14793 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java @@ -0,0 +1,1316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NetworkMonitorsClient. + */ +public final class NetworkMonitorsClientImpl implements NetworkMonitorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkMonitorsService service; + + /** + * The service client containing this operation class. + */ + private final ManagedNetworkFabricManagementClientImpl client; + + /** + * Initializes an instance of NetworkMonitorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkMonitorsClientImpl(ManagedNetworkFabricManagementClientImpl client) { + this.service + = RestProxy.create(NetworkMonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkMonitors to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkMonitors") + public interface NetworkMonitorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorPatch body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkMonitorName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkMonitorName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkMonitorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkMonitorName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, accept, context); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner getByResourceGroup(String resourceGroupName, String networkMonitorName) { + return getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE).getValue(); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, + Context.NONE); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkMonitorInner> beginCreateAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkMonitorName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkMonitorInner.class, NetworkMonitorInner.class, this.client.getContext()); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body) { + Response response = createWithResponse(resourceGroupName, networkMonitorName, body); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, Context.NONE); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkMonitorName, body, context); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, context); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner body) { + return beginCreateAsync(resourceGroupName, networkMonitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner body) { + return beginCreate(resourceGroupName, networkMonitorName, body).getFinalResult(); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner body, + Context context) { + return beginCreate(resourceGroupName, networkMonitorName, body, context).getFinalResult(); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, + Context.NONE); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkMonitorInner> beginUpdateAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkMonitorName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkMonitorInner.class, NetworkMonitorInner.class, this.client.getContext()); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body) { + Response response = updateWithResponse(resourceGroupName, networkMonitorName, body); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, Context.NONE); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch body, Context context) { + Response response = updateWithResponse(resourceGroupName, networkMonitorName, body, context); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, context); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch body) { + return beginUpdateAsync(resourceGroupName, networkMonitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch body) { + return beginUpdate(resourceGroupName, networkMonitorName, body).getFinalResult(); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch body, + Context context) { + return beginUpdate(resourceGroupName, networkMonitorName, body, context).getFinalResult(); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkMonitorName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkMonitorName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, Context.NONE); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkMonitorName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, context); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkMonitorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkMonitorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkMonitorName) { + Response response = deleteWithResponse(resourceGroupName, networkMonitorName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkMonitorName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, networkMonitorName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkMonitorName) { + return beginDeleteAsync(resourceGroupName, networkMonitorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkMonitorName) { + beginDelete(resourceGroupName, networkMonitorName).getFinalResult(); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkMonitorName, Context context) { + beginDelete(resourceGroupName, networkMonitorName, context).getFinalResult(); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, + Context.NONE); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body) { + Mono>> mono + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkMonitorName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkMonitorName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkMonitorName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkMonitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkMonitorName, body).getFinalResult(); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkMonitorName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java new file mode 100644 index 000000000000..32ffbadd2b16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitors; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +public final class NetworkMonitorsImpl implements NetworkMonitors { + private static final ClientLogger LOGGER = new ClientLogger(NetworkMonitorsImpl.class); + + private final NetworkMonitorsClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkMonitorsImpl(NetworkMonitorsClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkMonitorImpl(inner.getValue(), this.manager())); + } + + public NetworkMonitor getByResourceGroup(String resourceGroupName, String networkMonitorName) { + NetworkMonitorInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, networkMonitorName); + if (inner != null) { + return new NetworkMonitorImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkMonitorName) { + this.serviceClient().delete(resourceGroupName, networkMonitorName); + } + + public void delete(String resourceGroupName, String networkMonitorName, Context context) { + this.serviceClient().delete(resourceGroupName, networkMonitorName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + CommonPostActionResponseForDeviceUpdateInner inner + = this.serviceClient().updateAdministrativeState(resourceGroupName, networkMonitorName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner + = this.serviceClient().updateAdministrativeState(resourceGroupName, networkMonitorName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkMonitor getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + this.delete(resourceGroupName, networkMonitorName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + this.delete(resourceGroupName, networkMonitorName, context); + } + + private NetworkMonitorsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkMonitorImpl define(String name) { + return new NetworkMonitorImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java index 4828b7a2853b..35b2388917f1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,6 +8,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; @@ -46,6 +50,10 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -90,10 +98,18 @@ public List neighborGroupIds() { } } + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -215,7 +231,17 @@ public NetworkPacketBrokerImpl withTags(Map tags) { } } + public NetworkPacketBrokerImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public NetworkPacketBrokerImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java index bafe53a9dc9e..7e3ad4b83b02 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokersListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokersListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,83 +53,136 @@ public final class NetworkPacketBrokersClientImpl implements NetworkPacketBroker /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkPacketBrokersClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkPacketBrokersClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkPacketBrokersClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkPacketBrokersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkPacketBrokers to be used + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkPacketBrokers to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkPacketBrokers") public interface NetworkPacketBrokersService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkPacketBrokerName") String networkPacketBrokerName, - @BodyParam("application/json") NetworkPacketBrokerInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkPacketBrokerName") String networkPacketBrokerName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkPacketBrokerName") String networkPacketBrokerName, - @BodyParam("application/json") NetworkPacketBrokerPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkPacketBrokerName") String networkPacketBrokerName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") String e @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Packet Broker. - * - * Creates a Network Packet Broker. + * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -163,170 +230,91 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkPacketBrokerName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkPacketBrokerName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Packet Broker. - * - * Creates a Network Packet Broker. + * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkPacketBrokerName, body, accept, context); - } - - /** - * Create Network Packet Broker. - * - * Creates a Network Packet Broker. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkPacketBrokerInner> - beginCreateAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkPacketBrokerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Packet Broker. - * - * Creates a Network Packet Broker. + * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkPacketBrokerInner> beginCreateAsync( - String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkPacketBrokerName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkPacketBrokerName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, accept, context); } /** - * Create Network Packet Broker. - * - * Creates a Network Packet Broker. + * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + * @return the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkPacketBrokerInner> - beginCreate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { - return this.beginCreateAsync(resourceGroupName, networkPacketBrokerName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { + return getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); } /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkPacketBrokerInner> beginCreate( - String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkPacketBrokerName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkPacketBrokerName, NetworkPacketBrokerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -335,18 +323,19 @@ public SyncPoller, NetworkPacketBrokerInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkPacketBrokerName, + private Response createWithResponse(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { - return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + Context.NONE); } /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -356,18 +345,19 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkPacketBrokerName, + private Response createWithResponse(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + context); } /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -376,171 +366,111 @@ private Mono createAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body) { - return createAsync(resourceGroupName, networkPacketBrokerName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> + beginCreateAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, + this.client.getContext()); } /** - * Create Network Packet Broker. - * * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body, Context context) { - return createAsync(resourceGroupName, networkPacketBrokerName, body, context).block(); - } - - /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkPacketBrokerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> + beginCreate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + Response response = createWithResponse(resourceGroupName, networkPacketBrokerName, body); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, Context.NONE); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. + * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkPacketBrokerName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkPacketBrokerName, body, context); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. + * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String networkPacketBrokerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner body) { + return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. + * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response}. + * @return the NetworkPacketBroker resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkPacketBrokerName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName, context).block(); + public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner body) { + return beginCreate(resourceGroupName, networkPacketBrokerName, body).getFinalResult(); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this Network Packet Broker. + * Creates a Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the NetworkPacketBroker resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { - return getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); + public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner body, Context context) { + return beginCreate(resourceGroupName, networkPacketBrokerName, body, context).getFinalResult(); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -555,129 +485,80 @@ public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkPacketBrokerName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. * @param body Network Packet Broker properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkPacketBrokerName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + Context.NONE); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkPacketBrokerInner> - beginUpdateAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, body, + context); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. * @param body Network Packet Broker properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkPacketBrokerInner> beginUpdateAsync( - String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, NetworkPacketBrokerInner> + beginUpdateAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body, context); + = updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); + this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, + this.client.getContext()); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -691,12 +572,12 @@ private PollerFlux, NetworkPacketBrokerInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkPacketBrokerInner> beginUpdate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkPacketBrokerName, body); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, Context.NONE); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -711,12 +592,12 @@ private PollerFlux, NetworkPacketBrokerInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkPacketBrokerInner> beginUpdate( String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkPacketBrokerName, body, context); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -735,29 +616,6 @@ private Mono updateAsync(String resourceGroupName, Str } /** - * Updates the Network Packet Broker. - * - * API to update certain properties of the Network Packet Broker resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param body Network Packet Broker properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -771,12 +629,10 @@ private Mono updateAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { - return updateAsync(resourceGroupName, networkPacketBrokerName, body).block(); + return beginUpdate(resourceGroupName, networkPacketBrokerName, body).getFinalResult(); } /** - * Updates the Network Packet Broker. - * * API to update certain properties of the Network Packet Broker resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -791,12 +647,10 @@ public NetworkPacketBrokerInner update(String resourceGroupName, String networkP @ServiceMethod(returns = ReturnType.SINGLE) public NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { - return updateAsync(resourceGroupName, networkPacketBrokerName, body, context).block(); + return beginUpdate(resourceGroupName, networkPacketBrokerName, body, context).getFinalResult(); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -809,95 +663,51 @@ public NetworkPacketBrokerInner update(String resourceGroupName, String networkP @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkPacketBrokerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkPacketBrokerName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String networkPacketBrokerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkPacketBrokerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkPacketBrokerName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkPacketBrokerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, Context.NONE); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkPacketBrokerName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkPacketBrokerName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, context); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -905,17 +715,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkPacketBrokerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName, context); + String networkPacketBrokerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -927,12 +733,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName) { - return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkPacketBrokerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -946,12 +751,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkPacketBrokerName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -968,27 +772,6 @@ private Mono deleteAsync(String resourceGroupName, String networkPacketBro } /** - * Deletes a Network Packet Broker. - * - * Deletes Network Packet Broker. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkPacketBrokerName Name of the Network Packet Broker. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkPacketBrokerName, Context context) { - return beginDeleteAsync(resourceGroupName, networkPacketBrokerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -999,12 +782,10 @@ private Mono deleteAsync(String resourceGroupName, String networkPacketBro */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkPacketBrokerName) { - deleteAsync(resourceGroupName, networkPacketBrokerName).block(); + beginDelete(resourceGroupName, networkPacketBrokerName).getFinalResult(); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1016,99 +797,64 @@ public void delete(String resourceGroupName, String networkPacketBrokerName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkPacketBrokerName, Context context) { - deleteAsync(resourceGroupName, networkPacketBrokerName, context).block(); + beginDelete(resourceGroupName, networkPacketBrokerName, context).getFinalResult(); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1116,33 +862,34 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1150,131 +897,105 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1284,17 +1005,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1304,6 +1019,24 @@ private Mono> listByResourceGroupNextSin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1312,23 +1045,16 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1338,17 +1064,11 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1358,6 +1078,24 @@ private Mono> listBySubscriptionNextSing .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1366,22 +1104,14 @@ private Mono> listBySubscriptionNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkPacketBroker items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java index b1231ce6c0bf..0e790ba20650 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resou String networkPacketBrokerName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkPacketBrokerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkPacketBrokerImpl(inner.getValue(), this.manager())); } public NetworkPacketBroker getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java index 00dd126842d0..4e8d52a66c32 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,10 +8,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; import java.util.Collections; import java.util.List; import java.util.Map; @@ -67,10 +69,18 @@ public List networkDevices() { } } + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -99,7 +109,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkRackName; - private TagsUpdate updateBody; + private NetworkRackPatch updateBody; public NetworkRackImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -128,7 +138,7 @@ public NetworkRack create(Context context) { } public NetworkRackImpl update() { - this.updateBody = new TagsUpdate(); + this.updateBody = new NetworkRackPatch(); return this; } @@ -206,6 +216,6 @@ public NetworkRackImpl withAnnotation(String annotation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java index 1c39deca1322..a5daefccdb28 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacksListResult; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRacksListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,81 +53,136 @@ public final class NetworkRacksClientImpl implements NetworkRacksClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkRacksClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkRacksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkRacksClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkRacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkRacks to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkRacks to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkRacks") public interface NetworkRacksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkRackName") String networkRackName, @BodyParam("application/json") NetworkRackInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkRackName") String networkRackName, @BodyParam("application/json") TagsUpdate body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackPatch body, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -134,7 +190,15 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -142,187 +206,111 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Rack resource details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, - NetworkRackInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkRackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Rack resource details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, - NetworkRackInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkRackName, body, accept, context); - } - - /** - * Create Network Rack. - * - * Create Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Rack resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, - String networkRackName, NetworkRackInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkRackName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkRackName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Rack resource definition. + * @return network Rack resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkRackName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, accept, context); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Rack resource definition. + * @return network Rack resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body) { - return this.beginCreateAsync(resourceGroupName, networkRackName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName) { + return getByResourceGroupWithResponse(resourceGroupName, networkRackName, Context.NONE).getValue(); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Rack resource definition. + * @return the Network Rack resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkRackName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, + NetworkRackInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -331,18 +319,19 @@ public SyncPoller, NetworkRackInner> beginCreate(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkRackName, + private Response createWithResponse(String resourceGroupName, String networkRackName, NetworkRackInner body) { - return beginCreateAsync(resourceGroupName, networkRackName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, + Context.NONE); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -352,18 +341,18 @@ private Mono createAsync(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkRackName, NetworkRackInner body, - Context context) { - return beginCreateAsync(resourceGroupName, networkRackName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkRackName, + NetworkRackInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, context); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -372,167 +361,108 @@ private Mono createAsync(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body) { - return createAsync(resourceGroupName, networkRackName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, + String networkRackName, NetworkRackInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkRackName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, - Context context) { - return createAsync(resourceGroupName, networkRackName, body, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner body) { + Response response = createWithResponse(resourceGroupName, networkRackName, body); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, Context.NONE); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkRackName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkRackName, body, context); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, context); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkRackName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkRackName, accept, context); + private Mono createAsync(String resourceGroupName, String networkRackName, + NetworkRackInner body) { + return beginCreateAsync(resourceGroupName, networkRackName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details on successful completion of {@link Mono}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkRackName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body) { + return beginCreate(resourceGroupName, networkRackName, body).getFinalResult(); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details along with {@link Response}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName, context).block(); - } - - /** - * Gets a Network Rack. - * - * Get Network Rack resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName) { - return getByResourceGroupWithResponse(resourceGroupName, networkRackName, Context.NONE).getValue(); + return beginCreate(resourceGroupName, networkRackName, body, context).getFinalResult(); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -546,110 +476,62 @@ public NetworkRackInner getByResourceGroup(String resourceGroupName, String netw */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkRackName, - TagsUpdate body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + NetworkRackPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. * @param body Network Rack properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkRackName, - TagsUpdate body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkRackName, + NetworkRackPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkRackName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, + Context.NONE); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. * @param body Network Rack properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Rack resource definition. + * @return the Network Rack resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginUpdateAsync(String resourceGroupName, - String networkRackName, TagsUpdate body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkRackName, + NetworkRackPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, body, context); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. * @param body Network Rack properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -657,17 +539,13 @@ private PollerFlux, NetworkRackInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginUpdateAsync(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkRackName, body, context); + String networkRackName, NetworkRackPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, context); + NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -680,13 +558,13 @@ private PollerFlux, NetworkRackInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body) { - return this.beginUpdateAsync(resourceGroupName, networkRackName, body).getSyncPoller(); + String networkRackName, NetworkRackPatch body) { + Response response = updateWithResponse(resourceGroupName, networkRackName, body); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, Context.NONE); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -700,13 +578,13 @@ public SyncPoller, NetworkRackInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkRackName, body, context).getSyncPoller(); + String networkRackName, NetworkRackPatch body, Context context) { + Response response = updateWithResponse(resourceGroupName, networkRackName, body, context); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, context); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -718,35 +596,13 @@ public SyncPoller, NetworkRackInner> beginUpdate(St * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkRackName, TagsUpdate body) { + private Mono updateAsync(String resourceGroupName, String networkRackName, + NetworkRackPatch body) { return beginUpdateAsync(resourceGroupName, networkRackName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Rack. - * - * Update certain properties of the Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Rack resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkRackName, TagsUpdate body, - Context context) { - return beginUpdateAsync(resourceGroupName, networkRackName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -758,13 +614,11 @@ private Mono updateAsync(String resourceGroupName, String netw * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body) { - return updateAsync(resourceGroupName, networkRackName, body).block(); + public NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body) { + return beginUpdate(resourceGroupName, networkRackName, body).getFinalResult(); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -777,13 +631,12 @@ public NetworkRackInner update(String resourceGroupName, String networkRackName, * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { - return updateAsync(resourceGroupName, networkRackName, body, context).block(); + public NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body, + Context context) { + return beginUpdate(resourceGroupName, networkRackName, body, context).getFinalResult(); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -795,111 +648,63 @@ public NetworkRackInner update(String resourceGroupName, String networkRackName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkRackName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkRackName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkRackName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkRackName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, Context.NONE); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkRackName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkRackName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, context); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkRackName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkRackName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -911,12 +716,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName) { - return this.beginDeleteAsync(resourceGroupName, networkRackName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkRackName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -930,12 +734,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkRackName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkRackName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -952,27 +755,6 @@ private Mono deleteAsync(String resourceGroupName, String networkRackName) } /** - * Deletes a Network Rack. - * - * Delete Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkRackName, Context context) { - return beginDeleteAsync(resourceGroupName, networkRackName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -983,12 +765,10 @@ private Mono deleteAsync(String resourceGroupName, String networkRackName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkRackName) { - deleteAsync(resourceGroupName, networkRackName).block(); + beginDelete(resourceGroupName, networkRackName).getFinalResult(); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1000,99 +780,64 @@ public void delete(String resourceGroupName, String networkRackName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkRackName, Context context) { - deleteAsync(resourceGroupName, networkRackName, context).block(); + beginDelete(resourceGroupName, networkRackName, context).getFinalResult(); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1100,33 +845,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1134,131 +879,105 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1268,17 +987,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1288,6 +1001,24 @@ private Mono> listByResourceGroupNextSinglePageA .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1296,23 +1027,15 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1322,17 +1045,11 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1342,6 +1059,24 @@ private Mono> listBySubscriptionNextSinglePageAs .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1350,22 +1085,14 @@ private Mono> listBySubscriptionNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkRack items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java index 166063eeaee3..d0f6d3c4cd8d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGroup Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkRackName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkRackImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkRackImpl(inner.getValue(), this.manager())); } public NetworkRack getByResourceGroup(String resourceGroupName, String networkRackName) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java index d2e44758822a..ea5003b976e3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,16 +9,19 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import java.util.Collections; import java.util.List; import java.util.Map; @@ -53,6 +56,10 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -65,8 +72,17 @@ public String sourceTapRuleId() { return this.innerModel().sourceTapRuleId(); } - public List destinations() { - List inner = this.innerModel().destinations(); + public List networkFabricIds() { + List inner = this.innerModel().networkFabricIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List destinations() { + List inner = this.innerModel().destinations(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -78,6 +94,10 @@ public PollingType pollingType() { return this.innerModel().pollingType(); } + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -189,20 +209,20 @@ public NetworkTap refresh(Context context) { return this; } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.networkTaps().updateAdministrativeState(resourceGroupName, networkTapName, body); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.networkTaps().updateAdministrativeState(resourceGroupName, networkTapName, body, context); } - public CommonPostActionResponseForStateUpdate resync() { + public NetworkTapResyncResponse resync() { return serviceManager.networkTaps().resync(resourceGroupName, networkTapName); } - public CommonPostActionResponseForStateUpdate resync(Context context) { + public NetworkTapResyncResponse resync(Context context) { return serviceManager.networkTaps().resync(resourceGroupName, networkTapName, context); } @@ -221,7 +241,7 @@ public NetworkTapImpl withNetworkPacketBrokerId(String networkPacketBrokerId) { return this; } - public NetworkTapImpl withDestinations(List destinations) { + public NetworkTapImpl withDestinations(List destinations) { this.innerModel().withDestinations(destinations); return this; } @@ -236,6 +256,11 @@ public NetworkTapImpl withTags(Map tags) { } } + public NetworkTapImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + public NetworkTapImpl withPollingType(PollingType pollingType) { if (isInCreateMode()) { this.innerModel().withPollingType(pollingType); @@ -256,12 +281,17 @@ public NetworkTapImpl withAnnotation(String annotation) { } } - public NetworkTapImpl withDestinationsForUpdate(List destinations) { + public NetworkTapImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public NetworkTapImpl withDestinationsForUpdate(List destinations) { this.updateBody.withDestinations(destinations); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapResyncResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapResyncResponseImpl.java new file mode 100644 index 000000000000..383cbc1b4398 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapResyncResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapResyncResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkTapResyncResponseImpl implements NetworkTapResyncResponse { + private NetworkTapResyncResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkTapResyncResponseImpl(NetworkTapResyncResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkTapResyncResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java index 6916297dfd6d..23c01b30c13d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,13 +10,22 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; @@ -55,32 +64,16 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String networkTapId() { - return this.innerModel().networkTapId(); - } - - public PollingIntervalInSeconds pollingIntervalInSeconds() { - return this.innerModel().pollingIntervalInSeconds(); - } - - public OffsetDateTime lastSyncedTime() { - return this.innerModel().lastSyncedTime(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public String annotation() { + return this.innerModel().annotation(); } public ConfigurationType configurationType() { @@ -91,6 +84,10 @@ public String tapRulesUrl() { return this.innerModel().tapRulesUrl(); } + public IdentitySelector identitySelector() { + return this.innerModel().identitySelector(); + } + public List matchConfigurations() { List inner = this.innerModel().matchConfigurations(); if (inner != null) { @@ -109,8 +106,54 @@ public List dynamicMatchConfigurations() { } } - public String annotation() { - return this.innerModel().annotation(); + public String networkTapId() { + return this.innerModel().networkTapId(); + } + + public List networkTapIds() { + List inner = this.innerModel().networkTapIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Integer pollingIntervalInSeconds() { + return this.innerModel().pollingIntervalInSeconds(); + } + + public OffsetDateTime lastSyncedTime() { + return this.innerModel().lastSyncedTime(); + } + + public GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions() { + return this.innerModel().globalNetworkTapRuleActions(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + + public List networkFabricIds() { + List inner = this.innerModel().networkFabricIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Region region() { @@ -218,11 +261,11 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAd .updateAdministrativeState(resourceGroupName, networkTapRuleName, body, context); } - public CommonPostActionResponseForStateUpdate resync() { + public NetworkTapRuleResyncResponse resync() { return serviceManager.networkTapRules().resync(resourceGroupName, networkTapRuleName); } - public CommonPostActionResponseForStateUpdate resync(Context context) { + public NetworkTapRuleResyncResponse resync(Context context) { return serviceManager.networkTapRules().resync(resourceGroupName, networkTapRuleName, context); } @@ -244,6 +287,16 @@ public NetworkTapRuleImpl withRegion(String location) { return this; } + public NetworkTapRuleImpl withConfigurationType(ConfigurationType configurationType) { + if (isInCreateMode()) { + this.innerModel().withConfigurationType(configurationType); + return this; + } else { + this.updateBody.withConfigurationType(configurationType); + return this; + } + } + public NetworkTapRuleImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -254,17 +307,17 @@ public NetworkTapRuleImpl withTags(Map tags) { } } - public NetworkTapRuleImpl withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { - this.innerModel().withPollingIntervalInSeconds(pollingIntervalInSeconds); + public NetworkTapRuleImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public NetworkTapRuleImpl withConfigurationType(ConfigurationType configurationType) { + public NetworkTapRuleImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withConfigurationType(configurationType); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withConfigurationType(configurationType); + this.updateBody.withAnnotation(annotation); return this; } } @@ -279,38 +332,62 @@ public NetworkTapRuleImpl withTapRulesUrl(String tapRulesUrl) { } } + public NetworkTapRuleImpl withIdentitySelector(IdentitySelector identitySelector) { + this.innerModel().withIdentitySelector(identitySelector); + return this; + } + public NetworkTapRuleImpl withMatchConfigurations(List matchConfigurations) { - if (isInCreateMode()) { - this.innerModel().withMatchConfigurations(matchConfigurations); - return this; - } else { - this.updateBody.withMatchConfigurations(matchConfigurations); - return this; - } + this.innerModel().withMatchConfigurations(matchConfigurations); + return this; } public NetworkTapRuleImpl withDynamicMatchConfigurations(List dynamicMatchConfigurations) { - if (isInCreateMode()) { - this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); - return this; - } else { - this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); - return this; - } + this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; } - public NetworkTapRuleImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NetworkTapRuleImpl withPollingIntervalInSeconds(Integer pollingIntervalInSeconds) { + this.innerModel().withPollingIntervalInSeconds(pollingIntervalInSeconds); + return this; + } + + public NetworkTapRuleImpl + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions) { + this.innerModel().withGlobalNetworkTapRuleActions(globalNetworkTapRuleActions); + return this; + } + + public NetworkTapRuleImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public NetworkTapRuleImpl + withMatchConfigurationsForUpdate(List matchConfigurations) { + this.updateBody.withMatchConfigurations(matchConfigurations); + return this; + } + + public NetworkTapRuleImpl + withDynamicMatchConfigurationsForUpdate(List dynamicMatchConfigurations) { + this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + + public NetworkTapRuleImpl withIdentitySelector(IdentitySelectorPatch identitySelector) { + this.updateBody.withIdentitySelector(identitySelector); + return this; + } + + public NetworkTapRuleImpl + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions) { + this.updateBody.withGlobalNetworkTapRuleActions(globalNetworkTapRuleActions); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleResyncResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleResyncResponseImpl.java new file mode 100644 index 000000000000..e010fa29ae9b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleResyncResponseImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleResyncResponse; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkTapRuleResyncResponseImpl implements NetworkTapRuleResyncResponse { + private NetworkTapRuleResyncResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NetworkTapRuleResyncResponseImpl(NetworkTapRuleResyncResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NetworkTapRuleResyncResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java index de16c9e99125..95131098a7d5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,9 +37,10 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRulesListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulesListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -56,103 +58,185 @@ public final class NetworkTapRulesClientImpl implements NetworkTapRulesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkTapRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkTapRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkTapRulesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkTapRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkTapRules to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkTapRules to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkTapRules") public interface NetworkTapRulesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapRuleName") String networkTapRuleName, - @BodyParam("application/json") NetworkTapRuleInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRuleInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRuleInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapRuleName") String networkTapRuleName, - @BodyParam("application/json") NetworkTapRulePatch body, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRulePatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRulePatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapRuleName") String networkTapRuleName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); @@ -160,9 +244,9 @@ Mono>> resync(@HostParam("$host") String endpoint, @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +255,15 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -179,187 +271,111 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkTapRuleName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Tap Rule resource details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapRuleName, body, accept, context); - } - - /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapRuleInner> beginCreateAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapRuleName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapRuleInner.class, NetworkTapRuleInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + * @return network Tap Rule resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapRuleInner> beginCreateAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapRuleInner.class, NetworkTapRuleInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkTapRuleName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + * @return network Tap Rule resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body) { - return this.beginCreateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); } /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkTapRuleName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -368,18 +384,19 @@ public SyncPoller, NetworkTapRuleInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapRuleName, + private Response createWithResponse(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { - return beginCreateAsync(resourceGroupName, networkTapRuleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, + Context.NONE); } /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -389,18 +406,18 @@ private Mono createAsync(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapRuleName, + private Response createWithResponse(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkTapRuleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, context); } /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -409,167 +426,108 @@ private Mono createAsync(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { - return createAsync(resourceGroupName, networkTapRuleName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginCreateAsync(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapRuleName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkTapRuleInner.class, NetworkTapRuleInner.class, this.client.getContext()); } /** - * Create Network Tap Rule. - * * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, - Context context) { - return createAsync(resourceGroupName, networkTapRuleName, body, context).block(); - } - - /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkTapRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner body) { + Response response = createWithResponse(resourceGroupName, networkTapRuleName, body); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, Context.NONE); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapRuleName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkTapRuleName, body, context); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, context); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details on successful completion of {@link Mono}. + * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapRuleName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkTapRuleName, + NetworkTapRuleInner body) { + return beginCreateAsync(resourceGroupName, networkTapRuleName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details along with {@link Response}. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkTapRuleName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName, context).block(); + public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + return beginCreate(resourceGroupName, networkTapRuleName, body).getFinalResult(); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * Create Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Tap Rule resource details. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName) { - return getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); + public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, + Context context) { + return beginCreate(resourceGroupName, networkTapRuleName, body, context).getFinalResult(); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -584,109 +542,61 @@ public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String n @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Network Tap Rule properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapRuleName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, + Context.NONE); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + * @return the NetworkTapRule resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapRuleInner> beginUpdateAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapRuleName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapRuleInner.class, NetworkTapRuleInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, context); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Network Tap Rule properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -694,17 +604,13 @@ private PollerFlux, NetworkTapRuleInner> beginUp */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkTapRuleInner> beginUpdateAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + String networkTapRuleName, NetworkTapRulePatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapRuleName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapRuleInner.class, NetworkTapRuleInner.class, context); + NetworkTapRuleInner.class, NetworkTapRuleInner.class, this.client.getContext()); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -718,12 +624,12 @@ private PollerFlux, NetworkTapRuleInner> beginUp @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapRuleInner> beginUpdate(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { - return this.beginUpdateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkTapRuleName, body); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, Context.NONE); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -738,12 +644,12 @@ public SyncPoller, NetworkTapRuleInner> beginUpd @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapRuleInner> beginUpdate(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkTapRuleName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkTapRuleName, body, context); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, context); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -762,29 +668,6 @@ private Mono updateAsync(String resourceGroupName, String n } /** - * Updates a Network Tap Rule. - * - * Update certain properties of the Network Tap Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Network Tap Rule properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkTapRuleName, - NetworkTapRulePatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkTapRuleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -797,12 +680,10 @@ private Mono updateAsync(String resourceGroupName, String n */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { - return updateAsync(resourceGroupName, networkTapRuleName, body).block(); + return beginUpdate(resourceGroupName, networkTapRuleName, body).getFinalResult(); } /** - * Updates a Network Tap Rule. - * * Update certain properties of the Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -817,12 +698,10 @@ public NetworkTapRuleInner update(String resourceGroupName, String networkTapRul @ServiceMethod(returns = ReturnType.SINGLE) public NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { - return updateAsync(resourceGroupName, networkTapRuleName, body, context).block(); + return beginUpdate(resourceGroupName, networkTapRuleName, body, context).getFinalResult(); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -835,111 +714,64 @@ public NetworkTapRuleInner update(String resourceGroupName, String networkTapRul @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkTapRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapRuleName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkTapRuleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, Context.NONE); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapRuleName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapRuleName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, context); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapRuleName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapRuleName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapRuleName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -951,12 +783,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName) { - return this.beginDeleteAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapRuleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -970,49 +801,27 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Tap Rule. - * - * Delete Network Tap Rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkTapRuleName) { - return beginDeleteAsync(resourceGroupName, networkTapRuleName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkTapRuleName, Context context) { - return beginDeleteAsync(resourceGroupName, networkTapRuleName, context).last() + private Mono deleteAsync(String resourceGroupName, String networkTapRuleName) { + return beginDeleteAsync(resourceGroupName, networkTapRuleName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1023,12 +832,10 @@ private Mono deleteAsync(String resourceGroupName, String networkTapRuleNa */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapRuleName) { - deleteAsync(resourceGroupName, networkTapRuleName).block(); + beginDelete(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1040,99 +847,64 @@ public void delete(String resourceGroupName, String networkTapRuleName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapRuleName, Context context) { - deleteAsync(resourceGroupName, networkTapRuleName, context).block(); + beginDelete(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1140,33 +912,34 @@ private PagedFlux listByResourceGroupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1174,136 +947,108 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1312,143 +1057,87 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkTapRuleName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkTapRuleName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, + Context.NONE); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapRuleName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkTapRuleName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, context); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapRuleName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1457,19 +1146,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapRuleName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1479,20 +1171,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapRuleName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1501,7 +1195,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1511,29 +1205,6 @@ private Mono updateAdministrativeSt } /** - * Updates administrative state of Network Tap Rules. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkTapRuleName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1542,17 +1213,15 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapRuleName, body).getFinalResult(); } /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1562,17 +1231,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapRuleName, body, context).getFinalResult(); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1580,125 +1247,74 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resyncWithResponseAsync(String resourceGroupName, String networkTapRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, accept, context)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncWithResponseAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } + private Response resyncWithResponse(String resourceGroupName, String networkTapRuleName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapRuleName, accept, context); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, Context.NONE); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapRuleName) { - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapRuleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + private PollerFlux, NetworkTapRuleResyncResponseInner> + beginResyncAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkTapRuleResyncResponseInner.class, + NetworkTapRuleResyncResponseInner.class, this.client.getContext()); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1706,18 +1322,17 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, NetworkTapRuleResyncResponseInner> beginResync(String resourceGroupName, String networkTapRuleName) { - return this.beginResyncAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapRuleName); + return this.client.getLroResult(response, + NetworkTapRuleResyncResponseInner.class, NetworkTapRuleResyncResponseInner.class, Context.NONE); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1726,18 +1341,17 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, NetworkTapRuleResyncResponseInner> beginResync(String resourceGroupName, String networkTapRuleName, Context context) { - return this.beginResyncAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client.getLroResult(response, + NetworkTapRuleResyncResponseInner.class, NetworkTapRuleResyncResponseInner.class, context); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1745,38 +1359,15 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceGroupName, - String networkTapRuleName) { + private Mono resyncAsync(String resourceGroupName, String networkTapRuleName) { return beginResyncAsync(resourceGroupName, networkTapRuleName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resync the Network Tap Rule. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - return beginResyncAsync(resourceGroupName, networkTapRuleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1784,16 +1375,14 @@ private Mono resyncAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName) { - return resyncAsync(resourceGroupName, networkTapRuleName).block(); + public NetworkTapRuleResyncResponseInner resync(String resourceGroupName, String networkTapRuleName) { + return beginResync(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1802,17 +1391,15 @@ public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName, + public NetworkTapRuleResyncResponseInner resync(String resourceGroupName, String networkTapRuleName, Context context) { - return resyncAsync(resourceGroupName, networkTapRuleName, context).block(); + return beginResync(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1820,124 +1407,77 @@ public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String networkTapRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String networkTapRuleName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapRuleName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, Context.NONE); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1945,17 +1485,17 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, networkTapRuleName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1964,17 +1504,18 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1982,7 +1523,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1992,28 +1533,6 @@ private Mono validateConfigurationAsync(Stri } /** - * Validates the configuration of the Network Tap Rule. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapRuleName Name of the Network Tap Rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String networkTapRuleName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2021,17 +1540,15 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName) { - return validateConfigurationAsync(resourceGroupName, networkTapRuleName).block(); + return beginValidateConfiguration(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2040,12 +1557,12 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName, Context context) { - return validateConfigurationAsync(resourceGroupName, networkTapRuleName, context).block(); + return beginValidateConfiguration(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** @@ -2055,17 +1572,11 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2075,6 +1586,24 @@ private Mono> listByResourceGroupNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2083,23 +1612,15 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2109,17 +1630,11 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2129,6 +1644,24 @@ private Mono> listBySubscriptionNextSinglePag .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2137,22 +1670,14 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTapRule items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java index 5dfeb660ae76..cddc9b9f058d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -12,9 +12,11 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; @@ -36,12 +38,8 @@ public Response getByResourceGroupWithResponse(String resourceGr Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkTapRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkTapRuleImpl(inner.getValue(), this.manager())); } public NetworkTapRule getByResourceGroup(String resourceGroupName, String networkTapRuleName) { @@ -103,22 +101,20 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(String r } } - public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().resync(resourceGroupName, networkTapRuleName); + public NetworkTapRuleResyncResponse resync(String resourceGroupName, String networkTapRuleName) { + NetworkTapRuleResyncResponseInner inner = this.serviceClient().resync(resourceGroupName, networkTapRuleName); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkTapRuleResyncResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName, - Context context) { - CommonPostActionResponseForStateUpdateInner inner + public NetworkTapRuleResyncResponse resync(String resourceGroupName, String networkTapRuleName, Context context) { + NetworkTapRuleResyncResponseInner inner = this.serviceClient().resync(resourceGroupName, networkTapRuleName, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkTapRuleResyncResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java index b64c13d3650b..7fffbfc0772d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,16 +29,17 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapsListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -56,99 +57,168 @@ public final class NetworkTapsClientImpl implements NetworkTapsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkTapsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkTapsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkTapsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkTapsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkTaps to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkTaps to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkTaps") public interface NetworkTapsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapName") String networkTapName, @BodyParam("application/json") NetworkTapInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapName") String networkTapName, @BodyParam("application/json") NetworkTapPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkTapName") String networkTapName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -156,7 +226,15 @@ Mono>> resync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -164,183 +242,111 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkTapName, - NetworkTapInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkTapName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Tap resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkTapName, - NetworkTapInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapName, body, accept, context); - } - - /** - * Create Network Tap. - * - * Creates a Network Tap. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Tap resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapInner> beginCreateAsync(String resourceGroupName, - String networkTapName, NetworkTapInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapInner.class, NetworkTapInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapInner> beginCreateAsync(String resourceGroupName, - String networkTapName, NetworkTapInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkTapName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapInner.class, NetworkTapInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context); } /** - * Create Network Tap. - * - * Creates a Network Tap. + * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body) { - return this.beginCreateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); } /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkTapName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkTapName, + NetworkTapInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -349,17 +355,19 @@ public SyncPoller, NetworkTapInner> beginCreate(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition on successful completion of {@link Mono}. + * @return the Network Tap resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapName, NetworkTapInner body) { - return beginCreateAsync(resourceGroupName, networkTapName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkTapName, + NetworkTapInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, + Context.NONE); } /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -369,18 +377,18 @@ private Mono createAsync(String resourceGroupName, String netwo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition on successful completion of {@link Mono}. + * @return the Network Tap resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapName, NetworkTapInner body, - Context context) { - return beginCreateAsync(resourceGroupName, networkTapName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkTapName, + NetworkTapInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, context); } /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -389,165 +397,107 @@ private Mono createAsync(String resourceGroupName, String netwo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body) { - return createAsync(resourceGroupName, networkTapName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginCreateAsync(String resourceGroupName, + String networkTapName, NetworkTapInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkTapInner.class, NetworkTapInner.class, this.client.getContext()); } /** - * Create Network Tap. - * * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, - Context context) { - return createAsync(resourceGroupName, networkTapName, body, context).block(); - } - - /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkTapName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner body) { + Response response = createWithResponse(resourceGroupName, networkTapName, body); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, Context.NONE); } /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkTapName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner body, Context context) { + Response response = createWithResponse(resourceGroupName, networkTapName, body, context); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, context); } /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Tap resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkTapName, NetworkTapInner body) { + return beginCreateAsync(resourceGroupName, networkTapName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response}. + * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName, context).block(); + public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body) { + return beginCreate(resourceGroupName, networkTapName, body).getFinalResult(); } /** - * Gets a Network Tap. - * - * Retrieves details of this Network Tap. + * Creates a Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName) { - return getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); + public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, + Context context) { + return beginCreate(resourceGroupName, networkTapName, body, context).getFinalResult(); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -561,106 +511,62 @@ public NetworkTapInner getByResourceGroup(String resourceGroupName, String netwo @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkTapName, NetworkTapPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Network Tap properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Tap resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkTapName, - NetworkTapPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkTapName, + NetworkTapPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, + Context.NONE); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Network Tap properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + * @return the Network Tap resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkTapInner> beginUpdateAsync(String resourceGroupName, - String networkTapName, NetworkTapPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapInner.class, NetworkTapInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkTapName, + NetworkTapPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, context); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Network Tap properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -668,17 +574,13 @@ private PollerFlux, NetworkTapInner> beginUpdateAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkTapInner> beginUpdateAsync(String resourceGroupName, - String networkTapName, NetworkTapPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkTapName, body, context); + String networkTapName, NetworkTapPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapInner.class, NetworkTapInner.class, context); + NetworkTapInner.class, NetworkTapInner.class, this.client.getContext()); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -692,12 +594,12 @@ private PollerFlux, NetworkTapInner> beginUpdateAsyn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapInner> beginUpdate(String resourceGroupName, String networkTapName, NetworkTapPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkTapName, body); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, Context.NONE); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -712,12 +614,12 @@ public SyncPoller, NetworkTapInner> beginUpdate(Stri @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapInner> beginUpdate(String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkTapName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, networkTapName, body, context); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, context); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -735,29 +637,6 @@ private Mono updateAsync(String resourceGroupName, String netwo } /** - * Updates the Network Taps. - * - * API to update certain properties of the Network Tap resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. - * @param body Network Tap properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network Tap resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkTapName, NetworkTapPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, networkTapName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -770,12 +649,10 @@ private Mono updateAsync(String resourceGroupName, String netwo */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body) { - return updateAsync(resourceGroupName, networkTapName, body).block(); + return beginUpdate(resourceGroupName, networkTapName, body).getFinalResult(); } /** - * Updates the Network Taps. - * * API to update certain properties of the Network Tap resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -790,12 +667,10 @@ public NetworkTapInner update(String resourceGroupName, String networkTapName, N @ServiceMethod(returns = ReturnType.SINGLE) public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { - return updateAsync(resourceGroupName, networkTapName, body, context).block(); + return beginUpdate(resourceGroupName, networkTapName, body, context).getFinalResult(); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -807,109 +682,63 @@ public NetworkTapInner update(String resourceGroupName, String networkTapName, N */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkTapName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkTapName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkTapName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, Context.NONE); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkTapName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, context); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -921,12 +750,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName) { - return this.beginDeleteAsync(resourceGroupName, networkTapName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -940,12 +768,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -962,27 +789,6 @@ private Mono deleteAsync(String resourceGroupName, String networkTapName) } /** - * Deletes a Network Tap. - * - * Deletes Network Tap. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkTapName, Context context) { - return beginDeleteAsync(resourceGroupName, networkTapName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -993,12 +799,10 @@ private Mono deleteAsync(String resourceGroupName, String networkTapName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapName) { - deleteAsync(resourceGroupName, networkTapName).block(); + beginDelete(resourceGroupName, networkTapName).getFinalResult(); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1010,99 +814,64 @@ public void delete(String resourceGroupName, String networkTapName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapName, Context context) { - deleteAsync(resourceGroupName, networkTapName, context).block(); + beginDelete(resourceGroupName, networkTapName, context).getFinalResult(); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1110,33 +879,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1144,136 +913,108 @@ public PagedIterable listByResourceGroup(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1282,139 +1023,85 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkTapName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, + Context.NONE); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, context); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1423,19 +1110,19 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkTapName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1445,20 +1132,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1467,58 +1154,33 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates administrative state of Network Tap. - * - * Implements the operation to the underlying resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapName, body).getFinalResult(); } /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1528,17 +1190,15 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapName, body, context).getFinalResult(); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1546,122 +1206,72 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resyncWithResponseAsync(String resourceGroupName, String networkTapName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkTapName, accept, context)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncWithResponseAsync(String resourceGroupName, String networkTapName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkTapName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); - } + private Response resyncWithResponse(String resourceGroupName, String networkTapName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkTapName, accept, context); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, Context.NONE); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapName) { - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String networkTapName, Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + private PollerFlux, NetworkTapResyncResponseInner> + beginResyncAsync(String resourceGroupName, String networkTapName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkTapResyncResponseInner.class, NetworkTapResyncResponseInner.class, + this.client.getContext()); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1669,18 +1279,17 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, NetworkTapResyncResponseInner> beginResync(String resourceGroupName, String networkTapName) { - return this.beginResyncAsync(resourceGroupName, networkTapName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapName); + return this.client.getLroResult(response, + NetworkTapResyncResponseInner.class, NetworkTapResyncResponseInner.class, Context.NONE); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1689,18 +1298,17 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, NetworkTapResyncResponseInner> beginResync(String resourceGroupName, String networkTapName, Context context) { - return this.beginResyncAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapName, context); + return this.client.getLroResult(response, + NetworkTapResyncResponseInner.class, NetworkTapResyncResponseInner.class, context); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1708,69 +1316,64 @@ private Mono>> resyncWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceGroupName, - String networkTapName) { + private Mono resyncAsync(String resourceGroupName, String networkTapName) { return beginResyncAsync(resourceGroupName, networkTapName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceGroupName, - String networkTapName, Context context) { - return beginResyncAsync(resourceGroupName, networkTapName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public NetworkTapResyncResponseInner resync(String resourceGroupName, String networkTapName) { + return beginResync(resourceGroupName, networkTapName).getFinalResult(); } /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName) { - return resyncAsync(resourceGroupName, networkTapName).block(); + public NetworkTapResyncResponseInner resync(String resourceGroupName, String networkTapName, Context context) { + return beginResync(resourceGroupName, networkTapName, context).getFinalResult(); } /** - * Resync operation on the Network Tap. - * - * Implements the operation to the underlying resources. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkTapName Name of the Network Tap. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return paged collection of NetworkTap items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName, - Context context) { - return resyncAsync(resourceGroupName, networkTapName, context).block(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1780,24 +1383,15 @@ public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1808,23 +1402,15 @@ private Mono> listByResourceGroupNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1834,17 +1420,11 @@ private Mono> listByResourceGroupNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1854,6 +1434,24 @@ private Mono> listBySubscriptionNextSinglePageAsy .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1862,22 +1460,14 @@ private Mono> listBySubscriptionNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of NetworkTap items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java index 58e7d635bb73..c16ac295913f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,14 +10,14 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapResyncResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTaps; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class NetworkTapsImpl implements NetworkTaps { private static final ClientLogger LOGGER = new ClientLogger(NetworkTapsImpl.class); @@ -36,12 +36,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupN Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkTapName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkTapImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkTapImpl(inner.getValue(), this.manager())); } public NetworkTap getByResourceGroup(String resourceGroupName, String networkTapName) { @@ -81,44 +77,41 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkTapImpl(inner1, this.manager())); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body) { - CommonPostActionResponseForDeviceUpdateInner inner + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body) { + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapName, body); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String networkTapName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body, Context context) { + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapName, body, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().resync(resourceGroupName, networkTapName); + public NetworkTapResyncResponse resync(String resourceGroupName, String networkTapName) { + NetworkTapResyncResponseInner inner = this.serviceClient().resync(resourceGroupName, networkTapName); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkTapResyncResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName, - Context context) { - CommonPostActionResponseForStateUpdateInner inner - = this.serviceClient().resync(resourceGroupName, networkTapName, context); + public NetworkTapResyncResponse resync(String resourceGroupName, String networkTapName, Context context) { + NetworkTapResyncResponseInner inner = this.serviceClient().resync(resourceGroupName, networkTapName, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NetworkTapResyncResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java index b61941a1bc25..3d13dc476437 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,20 +9,31 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class NetworkToNetworkInterconnectImpl implements NetworkToNetworkInterconnect, NetworkToNetworkInterconnect.Definition, NetworkToNetworkInterconnect.Update { @@ -62,7 +73,7 @@ public Layer2Configuration layer2Configuration() { return this.innerModel().layer2Configuration(); } - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3Configuration optionBLayer3Configuration() { return this.innerModel().optionBLayer3Configuration(); } @@ -70,6 +81,10 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { return this.innerModel().npbStaticRouteConfiguration(); } + public NniStaticRouteConfiguration staticRouteConfiguration() { + return this.innerModel().staticRouteConfiguration(); + } + public ImportRoutePolicyInformation importRoutePolicy() { return this.innerModel().importRoutePolicy(); } @@ -86,6 +101,18 @@ public String ingressAclId() { return this.innerModel().ingressAclId(); } + public MicroBfdState microBfdState() { + return this.innerModel().microBfdState(); + } + + public ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration() { + return this.innerModel().conditionalDefaultRouteConfiguration(); + } + + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -192,32 +219,45 @@ public NetworkToNetworkInterconnect refresh(Context context) { return this; } - public CommonPostActionResponseForStateUpdate + public UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { return serviceManager.networkToNetworkInterconnects() .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); } - public CommonPostActionResponseForStateUpdate - updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context) { + public UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + Context context) { return serviceManager.networkToNetworkInterconnects() .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.networkToNetworkInterconnects() .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.networkToNetworkInterconnects() .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); } + public NniUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(NniUpdateBfdAdministrativeStateRequest body) { + return serviceManager.networkToNetworkInterconnects() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + } + + public NniUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(NniUpdateBfdAdministrativeStateRequest body, Context context) { + return serviceManager.networkToNetworkInterconnects() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, + context); + } + public NetworkToNetworkInterconnectImpl withUseOptionB(BooleanEnumProperty useOptionB) { this.innerModel().withUseOptionB(useOptionB); return this; @@ -234,50 +274,36 @@ public NetworkToNetworkInterconnectImpl withIsManagementType(IsManagementType is } public NetworkToNetworkInterconnectImpl withLayer2Configuration(Layer2Configuration layer2Configuration) { - if (isInCreateMode()) { - this.innerModel().withLayer2Configuration(layer2Configuration); - return this; - } else { - this.updateBody.withLayer2Configuration(layer2Configuration); - return this; - } + this.innerModel().withLayer2Configuration(layer2Configuration); + return this; } - public NetworkToNetworkInterconnectImpl withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectImpl + withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { this.innerModel().withOptionBLayer3Configuration(optionBLayer3Configuration); return this; } public NetworkToNetworkInterconnectImpl withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration) { - if (isInCreateMode()) { - this.innerModel().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); - return this; - } else { - this.updateBody.withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); - return this; - } + this.innerModel().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } + + public NetworkToNetworkInterconnectImpl + withStaticRouteConfiguration(NniStaticRouteConfiguration staticRouteConfiguration) { + this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); + return this; } public NetworkToNetworkInterconnectImpl withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicy(importRoutePolicy); - return this; - } else { - this.updateBody.withImportRoutePolicy(importRoutePolicy); - return this; - } + this.innerModel().withImportRoutePolicy(importRoutePolicy); + return this; } public NetworkToNetworkInterconnectImpl withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicy(exportRoutePolicy); - return this; - } else { - this.updateBody.withExportRoutePolicy(exportRoutePolicy); - return this; - } + this.innerModel().withExportRoutePolicy(exportRoutePolicy); + return this; } public NetworkToNetworkInterconnectImpl withEgressAclId(String egressAclId) { @@ -300,13 +326,56 @@ public NetworkToNetworkInterconnectImpl withIngressAclId(String ingressAclId) { } } + public NetworkToNetworkInterconnectImpl withMicroBfdState(MicroBfdState microBfdState) { + if (isInCreateMode()) { + this.innerModel().withMicroBfdState(microBfdState); + return this; + } else { + this.updateBody.withMicroBfdState(microBfdState); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withConditionalDefaultRouteConfiguration( + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration) { + this.innerModel().withConditionalDefaultRouteConfiguration(conditionalDefaultRouteConfiguration); + return this; + } + + public NetworkToNetworkInterconnectImpl withLayer2Configuration(Layer2ConfigurationPatch layer2Configuration) { + this.updateBody.withLayer2Configuration(layer2Configuration); + return this; + } + public NetworkToNetworkInterconnectImpl - withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { + withOptionBLayer3Configuration(OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration) { this.updateBody.withOptionBLayer3Configuration(optionBLayer3Configuration); return this; } + public NetworkToNetworkInterconnectImpl + withNpbStaticRouteConfiguration(NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration) { + this.updateBody.withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } + + public NetworkToNetworkInterconnectImpl + withStaticRouteConfiguration(NniStaticRoutePatchConfiguration staticRouteConfiguration) { + this.updateBody.withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + + public NetworkToNetworkInterconnectImpl withImportRoutePolicy(ImportRoutePolicyInformationPatch importRoutePolicy) { + this.updateBody.withImportRoutePolicy(importRoutePolicy); + return this; + } + + public NetworkToNetworkInterconnectImpl withExportRoutePolicy(ExportRoutePolicyInformationPatch exportRoutePolicy) { + this.updateBody.withExportRoutePolicy(exportRoutePolicy); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java index 2455ae3448e7..4a818fae8067 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,18 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectsList; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,124 +58,222 @@ public final class NetworkToNetworkInterconnectsClientImpl implements NetworkToN /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of NetworkToNetworkInterconnectsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkToNetworkInterconnectsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkToNetworkInterconnectsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(NetworkToNetworkInterconnectsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkToNetworkInterconnects - * to be used by the proxy service to perform REST calls. + * The interface defining all the services for ManagedNetworkFabricManagementClientNetworkToNetworkInterconnects to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientNetworkToNetworkInterconnects") public interface NetworkToNetworkInterconnectsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") NetworkToNetworkInterconnectInner body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectInner body, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") NetworkToNetworkInterconnectPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectPatch body, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, - @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkFabric(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByNetworkFabric(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkFabricSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateNpbStaticRouteBfdAdministrativeState(@HostParam("$host") String endpoint, + Mono>> updateNpbStaticRouteBfdAdministrativeState( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateNpbStaticRouteBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NniUpdateBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NniUpdateBfdAdministrativeStateRequest body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNetworkFabricNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkFabricNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -180,192 +281,98 @@ Mono> listByNetworkFabricNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, - body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, body, accept, context); - } - - /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, accept, context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return getWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, Context.NONE) + .getValue(); } /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body, Context context) { - return this - .beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -375,18 +382,19 @@ public SyncPoller, NetworkToNetwor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, + private Response createWithResponse(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { - return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); } /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -397,19 +405,19 @@ private Mono createAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, + private Response createWithResponse(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context); } /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -419,189 +427,123 @@ private Mono createAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { - return createAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkToNetworkInterconnectInner> + beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, + NetworkToNetworkInterconnectInner.class, this.client.getContext()); } /** - * Configuration used to setup CE-PE connectivity. - * * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { - return createAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .block(); - } - - /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner body) { + Response response + = createWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, Context.NONE); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName) { - return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { + return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, Context context) { - return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) - .block(); + public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { + return beginCreate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .getFinalResult(); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName) { - return getWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, Context.NONE) - .getValue(); + public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { + return beginCreate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .getFinalResult(); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -617,124 +559,67 @@ public NetworkToNetworkInterconnectInner get(String resourceGroupName, String ne @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, - body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Network to Network Interconnect properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Network to Network Interconnect properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginUpdateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Network to Network Interconnect properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -743,18 +628,15 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkToNetworkInterconnectInner> beginUpdateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context); + NetworkToNetworkInterconnectPatch body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, context); + NetworkToNetworkInterconnectInner.class, this.client.getContext()); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -770,13 +652,13 @@ private Mono>> updateWithResponseAsync(String resource public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, Context.NONE); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -793,14 +675,13 @@ public SyncPoller, NetworkToNetwor public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - return this - .beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, context); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -820,31 +701,6 @@ private Mono updateAsync(String resourceGroup } /** - * Updates a Network To NetworkInterconnects. - * - * Update certain properties of the Network To NetworkInterconnects resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Network to Network Interconnect properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -859,12 +715,11 @@ private Mono updateAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { - return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).block(); + return beginUpdate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .getFinalResult(); } /** - * Updates a Network To NetworkInterconnects. - * * Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -880,13 +735,11 @@ public NetworkToNetworkInterconnectInner update(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .block(); + return beginUpdate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .getFinalResult(); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -900,108 +753,58 @@ public NetworkToNetworkInterconnectInner update(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + Context.NONE); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + context); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1009,17 +812,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context) { - context = this.client.mergeContext(context); + String networkToNetworkInterconnectName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + = deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1033,13 +833,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1054,13 +853,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1079,29 +877,6 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricNam } /** - * Deletes a NetworkToNetworkInterconnects. - * - * Implements NetworkToNetworkInterconnects DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1113,12 +888,10 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).block(); + beginDelete(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).getFinalResult(); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1132,12 +905,10 @@ public void delete(String resourceGroupName, String networkFabricName, String ne @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).block(); + beginDelete(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).getFinalResult(); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1145,83 +916,22 @@ public void delete(String resourceGroupName, String networkFabricName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkFabricSinglePageAsync(String resourceGroupName, String networkFabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByNetworkFabric(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.listByNetworkFabric(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * - * Implements Network To Network Interconnects list by Network Fabric GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the Network Fabric. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByNetworkFabricSinglePageAsync(String resourceGroupName, String networkFabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByNetworkFabric(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1229,7 +939,7 @@ public void delete(String resourceGroupName, String networkFabricName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNetworkFabricAsync(String resourceGroupName, @@ -1239,8 +949,27 @@ private PagedFlux listByNetworkFabricAsync(St } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Implements Network To Network Interconnects list by Network Fabric GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricSinglePage(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + Response res + = service.listByNetworkFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1249,18 +978,20 @@ private PagedFlux listByNetworkFabricAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedFlux}. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkFabricAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricSinglePage(String resourceGroupName, String networkFabricName, Context context) { - return new PagedFlux<>(() -> listByNetworkFabricSinglePageAsync(resourceGroupName, networkFabricName, context), - nextLink -> listByNetworkFabricNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByNetworkFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1268,17 +999,16 @@ private PagedFlux listByNetworkFabricAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName) { - return new PagedIterable<>(listByNetworkFabricAsync(resourceGroupName, networkFabricName)); + return new PagedIterable<>(() -> listByNetworkFabricSinglePage(resourceGroupName, networkFabricName), + nextLink -> listByNetworkFabricNextSinglePage(nextLink)); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1287,17 +1017,16 @@ public PagedIterable listByNetworkFabric(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName, Context context) { - return new PagedIterable<>(listByNetworkFabricAsync(resourceGroupName, networkFabricName, context)); + return new PagedIterable<>(() -> listByNetworkFabricSinglePage(resourceGroupName, networkFabricName, context), + nextLink -> listByNetworkFabricNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1307,157 +1036,91 @@ public PagedIterable listByNetworkFabric(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateNpbStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, - networkToNetworkInterconnectName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateNpbStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateNpbStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, - networkToNetworkInterconnectName, body, accept, context); + return service.updateNpbStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - Mono>> mono = updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateNpbStaticRouteBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateNpbStaticRouteBfdAdministrativeStateSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String networkToNetworkInterconnectName, UpdateAdministrativeState body) { Mono>> mono = updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1467,22 +1130,20 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return this - .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body) - .getSyncPoller(); + Response response = updateNpbStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1493,22 +1154,20 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context) - .getSyncPoller(); + Response response = updateNpbStaticRouteBfdAdministrativeStateWithResponse(resourceGroupName, + networkFabricName, networkToNetworkInterconnectName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1518,10 +1177,10 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateNpbStaticRouteBfdAdministrativeStateAsync( + private Mono updateNpbStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { return beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, @@ -1529,76 +1188,70 @@ private Mono updateNpbStaticRouteBf } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateNpbStaticRouteBfdAdministrativeStateAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - UpdateAdministrativeState body, Context context) { - return beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + public UpdateAdministrativeStateResponseInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + return beginUpdateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - UpdateAdministrativeState body) { - return updateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body).block(); + public UpdateAdministrativeStateResponseInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + Context context) { + return beginUpdateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - UpdateAdministrativeState body, Context context) { - return updateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context).block(); + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1608,48 +1261,19 @@ public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdmini * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, - networkToNetworkInterconnectName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1660,48 +1284,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); - } - if (networkToNetworkInterconnectName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkToNetworkInterconnectName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, body, - accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1711,24 +1307,43 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); + } + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1739,25 +1354,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkFabricName, + public SyncPoller, UpdateAdministrativeStateResponseInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - networkFabricName, networkToNetworkInterconnectName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1767,22 +1377,35 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body).getFinalResult(); + } + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1793,22 +1416,17 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1818,18 +1436,45 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body).last().flatMap(this.client::getLroFinalResultOrError); + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, + NniUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, + NniUpdateBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); + } + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1840,19 +1485,96 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context); + } + + /** + * Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NniUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + networkFabricName, networkToNetworkInterconnectName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), NniUpdateBfdAdministrativeStateResponseInner.class, + NniUpdateBfdAdministrativeStateResponseInner.class, this.client.getContext()); + } + + /** + * Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NniUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body); + return this.client + .getLroResult( + response, NniUpdateBfdAdministrativeStateResponseInner.class, + NniUpdateBfdAdministrativeStateResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NniUpdateBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body, context); + return this.client + .getLroResult( + response, NniUpdateBfdAdministrativeStateResponseInner.class, + NniUpdateBfdAdministrativeStateResponseInner.class, context); + } + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1862,18 +1584,37 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body).block(); + private Mono updateBfdAdministrativeStateAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NniUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NniUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, + NniUpdateBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body).getFinalResult(); + } + + /** * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1884,14 +1625,14 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + public NniUpdateBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body, context).block(); + return beginUpdateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body, context).getFinalResult(); } /** @@ -1901,19 +1642,12 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkFabricNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1923,6 +1657,24 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNetworkFabricNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1931,23 +1683,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of NetworkToNetworkInterconnect items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByNetworkFabricNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByNetworkFabricNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNetworkFabricNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNetworkFabricNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java index b5e0f7c5134d..89952d4163e2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,12 +10,15 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnects; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; public final class NetworkToNetworkInterconnectsImpl implements NetworkToNetworkInterconnects { private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectsImpl.class); @@ -34,12 +37,8 @@ public Response getWithResponse(String resourceGro String networkToNetworkInterconnectName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkToNetworkInterconnectImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkToNetworkInterconnectImpl(inner.getValue(), this.manager())); } public NetworkToNetworkInterconnect get(String resourceGroupName, String networkFabricName, @@ -78,50 +77,75 @@ public PagedIterable listByNetworkFabric(String re inner1 -> new NetworkToNetworkInterconnectImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + UpdateAdministrativeStateResponseInner inner = this.serviceClient() .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, + NniUpdateBfdAdministrativeStateRequest body) { + NniUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + if (inner != null) { + return new NniUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, + Context context) { + NniUpdateBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, + context); + if (inner != null) { + return new NniUpdateBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniUpdateBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniUpdateBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..34f290743235 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniUpdateBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NniUpdateBfdAdministrativeStateResponseImpl implements NniUpdateBfdAdministrativeStateResponse { + private NniUpdateBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + NniUpdateBfdAdministrativeStateResponseImpl(NniUpdateBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public NniUpdateBfdAdministrativeStateResponseProperties properties() { + return this.innerModel().properties(); + } + + public NniUpdateBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java index ffc5461f2b78..0f382a5bdbf2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationStatusResultImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationStatusResultImpl.java new file mode 100644 index 000000000000..2aacd615ca40 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationStatusResultImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + OperationStatusResultImpl(OperationStatusResultInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java index 0801f14c64aa..b3c094c49351 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner; -import com.azure.resourcemanager.managednetworkfabric.models.OperationListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + OperationsClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiOperations to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientOperations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ManagedNetworkFabric/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.ManagedNetworkFabric/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +81,18 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,10 +101,6 @@ Mono> listNext(@PathParam(value = "nextLink", enco */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -101,59 +111,54 @@ private Mono> listSinglePageAsync() { } /** - * Returns list of all operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -162,11 +167,11 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +182,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -192,13 +197,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -206,6 +204,24 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,22 +230,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java index 1aeb4170a5ee..3d0b5a871e71 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java index b5006248fb18..d3a16a3e44fe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java index ab525542b1f5..07bf89d7e8d3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,16 +29,17 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePoliciesListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePoliciesListResult; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; @@ -57,101 +58,185 @@ public final class RoutePoliciesClientImpl implements RoutePoliciesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final ManagedNetworkFabricManagementClientImpl client; /** * Initializes an instance of RoutePoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - RoutePoliciesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + RoutePoliciesClientImpl(ManagedNetworkFabricManagementClientImpl client) { this.service = RestProxy.create(RoutePoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiRoutePolicies to be used by the + * The interface defining all the services for ManagedNetworkFabricManagementClientRoutePolicies to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "ManagedNetworkFabricManagementClientRoutePolicies") public interface RoutePoliciesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("routePolicyName") String routePolicyName, @BodyParam("application/json") RoutePolicyInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyInner body, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("routePolicyName") String routePolicyName, @BodyParam("application/json") RoutePolicyPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyPatch body, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyPatch body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("routePolicyName") String routePolicyName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); @@ -159,9 +244,9 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> commitConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); @@ -170,7 +255,15 @@ Mono>> commitConfiguration(@HostParam("$host") String @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -178,185 +271,110 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String routePolicyName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, body, accept, context); - } - - /** - * Create Route Policy. - * - * Implements Route Policy PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the RoutePolicy resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, routePolicyName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String routePolicyName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, routePolicyName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body) { - return this.beginCreateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName) { + return getByResourceGroupWithResponse(resourceGroupName, routePolicyName, Context.NONE).getValue(); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, routePolicyName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, + RoutePolicyInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -365,18 +383,19 @@ public SyncPoller, RoutePolicyInner> beginCreate(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String routePolicyName, + private Response createWithResponse(String resourceGroupName, String routePolicyName, RoutePolicyInner body) { - return beginCreateAsync(resourceGroupName, routePolicyName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, + Context.NONE); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -386,18 +405,18 @@ private Mono createAsync(String resourceGroupName, String rout * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String routePolicyName, RoutePolicyInner body, - Context context) { - return beginCreateAsync(resourceGroupName, routePolicyName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, context); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -406,167 +425,108 @@ private Mono createAsync(String resourceGroupName, String rout * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition. + * @return the {@link PollerFlux} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body) { - return createAsync(resourceGroupName, routePolicyName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, + String routePolicyName, RoutePolicyInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, routePolicyName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, - Context context) { - return createAsync(resourceGroupName, routePolicyName, body, context).block(); - } - - /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String routePolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner body) { + Response response = createWithResponse(resourceGroupName, routePolicyName, body); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, Context.NONE); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String routePolicyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner body, Context context) { + Response response = createWithResponse(resourceGroupName, routePolicyName, body, context); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, context); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the RoutePolicy resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String routePolicyName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String routePolicyName, + RoutePolicyInner body) { + return beginCreateAsync(resourceGroupName, routePolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response}. + * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName, context).block(); + public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body) { + return beginCreate(resourceGroupName, routePolicyName, body).getFinalResult(); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName) { - return getByResourceGroupWithResponse(resourceGroupName, routePolicyName, Context.NONE).getValue(); + public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, + Context context) { + return beginCreate(resourceGroupName, routePolicyName, body, context).getFinalResult(); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -580,108 +540,61 @@ public RoutePolicyInner getByResourceGroup(String resourceGroupName, String rout @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String routePolicyName, RoutePolicyPatch body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Route Policy properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyPatch body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyPatch body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, + Context.NONE); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Route Policy properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginUpdateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, routePolicyName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyPatch body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, context); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Route Policy properties to update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -689,17 +602,13 @@ private PollerFlux, RoutePolicyInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RoutePolicyInner> beginUpdateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, routePolicyName, body, context); + String routePolicyName, RoutePolicyPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, routePolicyName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, context); + RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -713,12 +622,12 @@ private PollerFlux, RoutePolicyInner> beginUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, String routePolicyName, RoutePolicyPatch body) { - return this.beginUpdateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, routePolicyName, body); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, Context.NONE); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -733,12 +642,12 @@ public SyncPoller, RoutePolicyInner> beginUpdate(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, routePolicyName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, routePolicyName, body, context); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, context); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -757,29 +666,6 @@ private Mono updateAsync(String resourceGroupName, String rout } /** - * Updates a Route Policy. - * - * API to update certain properties of the Route Policy resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the RoutePolicy resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, routePolicyName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -792,12 +678,10 @@ private Mono updateAsync(String resourceGroupName, String rout */ @ServiceMethod(returns = ReturnType.SINGLE) public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body) { - return updateAsync(resourceGroupName, routePolicyName, body).block(); + return beginUpdate(resourceGroupName, routePolicyName, body).getFinalResult(); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -812,12 +696,10 @@ public RoutePolicyInner update(String resourceGroupName, String routePolicyName, @ServiceMethod(returns = ReturnType.SINGLE) public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, Context context) { - return updateAsync(resourceGroupName, routePolicyName, body, context).block(); + return beginUpdate(resourceGroupName, routePolicyName, body, context).getFinalResult(); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -829,111 +711,63 @@ public RoutePolicyInner update(String resourceGroupName, String routePolicyName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String routePolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String routePolicyName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String routePolicyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, Context.NONE); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String routePolicyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, context); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -945,12 +779,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName) { - return this.beginDeleteAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, routePolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +797,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName, Context context) { - return this.beginDeleteAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, routePolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -986,27 +818,6 @@ private Mono deleteAsync(String resourceGroupName, String routePolicyName) } /** - * Deletes a Route Policy. - * - * Implements Route Policy DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String routePolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, routePolicyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1017,12 +828,10 @@ private Mono deleteAsync(String resourceGroupName, String routePolicyName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String routePolicyName) { - deleteAsync(resourceGroupName, routePolicyName).block(); + beginDelete(resourceGroupName, routePolicyName).getFinalResult(); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1034,99 +843,64 @@ public void delete(String resourceGroupName, String routePolicyName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String routePolicyName, Context context) { - deleteAsync(resourceGroupName, routePolicyName, context).block(); + beginDelete(resourceGroupName, routePolicyName, context).getFinalResult(); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedFlux}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1134,33 +908,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedFlux}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1168,136 +942,108 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedFlux}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedFlux}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1306,141 +1052,85 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, routePolicyName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, + Context.NONE); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String routePolicyName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, context); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. * @param body Request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + private PollerFlux, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String routePolicyName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), UpdateAdministrativeStateResponseInner.class, + UpdateAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1449,19 +1139,19 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, routePolicyName, body); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1471,20 +1161,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + public SyncPoller, UpdateAdministrativeStateResponseInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, routePolicyName, body, context); + return this.client.getLroResult( + response, UpdateAdministrativeStateResponseInner.class, UpdateAdministrativeStateResponseInner.class, + context); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1493,39 +1183,16 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, + private Mono updateAdministrativeStateAsync(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Executes enable operation to the underlying resources. - * - * Updated the admin state for this Route Policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1534,17 +1201,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, routePolicyName, body).getFinalResult(); } /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1554,12 +1219,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + public UpdateAdministrativeStateResponseInner updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, routePolicyName, body, context).getFinalResult(); } /** @@ -1570,33 +1235,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String routePolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1605,36 +1253,16 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String routePolicyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, String routePolicyName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, Context.NONE); } /** @@ -1642,19 +1270,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context); } /** @@ -1662,21 +1289,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1687,12 +1312,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String routePolicyName) { - return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, routePolicyName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1704,12 +1331,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, routePolicyName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1720,7 +1349,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1729,24 +1358,6 @@ private Mono validateConfigurationAsync(Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validates the configuration of the resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String routePolicyName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, routePolicyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Validates the configuration of the resources. * @@ -1755,11 +1366,11 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName) { - return validateConfigurationAsync(resourceGroupName, routePolicyName).block(); + return beginValidateConfiguration(resourceGroupName, routePolicyName).getFinalResult(); } /** @@ -1771,17 +1382,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return validateConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + return beginValidateConfiguration(resourceGroupName, routePolicyName, context).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1789,128 +1398,77 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, String routePolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String routePolicyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (routePolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, String routePolicyName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1918,18 +1476,20 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName) { - return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, routePolicyName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1938,18 +1498,20 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, routePolicyName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1957,7 +1519,7 @@ private Mono>> commitConfigurationWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -1967,28 +1529,6 @@ private Mono commitConfigurationAsy } /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String routePolicyName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, routePolicyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1996,17 +1536,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName) { - return commitConfigurationAsync(resourceGroupName, routePolicyName).block(); + return beginCommitConfiguration(resourceGroupName, routePolicyName).getFinalResult(); } /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2015,12 +1553,12 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return commitConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + return beginCommitConfiguration(resourceGroupName, routePolicyName, context).getFinalResult(); } /** @@ -2030,17 +1568,11 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2050,6 +1582,24 @@ private Mono> listByResourceGroupNextSinglePageA .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2058,23 +1608,15 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2084,17 +1626,11 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2104,6 +1640,24 @@ private Mono> listBySubscriptionNextSinglePageAs .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2112,22 +1666,14 @@ private Mono> listBySubscriptionNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of RoutePolicy items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java index 9792a1f9219a..561c0c754a14 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,15 +10,15 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicies; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class RoutePoliciesImpl implements RoutePolicies { @@ -38,12 +38,8 @@ public Response getByResourceGroupWithResponse(String resourceGroup Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, routePolicyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RoutePolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RoutePolicyImpl(inner.getValue(), this.manager())); } public RoutePolicy getByResourceGroup(String resourceGroupName, String routePolicyName) { @@ -83,23 +79,23 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new RoutePolicyImpl(inner1, this.manager())); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body) { - CommonPostActionResponseForDeviceUpdateInner inner + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body) { + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, routePolicyName, body); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String routePolicyName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForDeviceUpdateInner inner + public UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body, Context context) { + UpdateAdministrativeStateResponseInner inner = this.serviceClient().updateAdministrativeState(resourceGroupName, routePolicyName, body, context); if (inner != null) { - return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + return new UpdateAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java index 4906b5f3ebe0..8ddfb71e4cfc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,15 +10,17 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; import java.util.List; @@ -58,6 +60,23 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String annotation() { + return this.innerModel().annotation(); + } + + public CommunityActionTypes defaultAction() { + return this.innerModel().defaultAction(); + } + + public List statements() { + List inner = this.innerModel().statements(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String networkFabricId() { return this.innerModel().networkFabricId(); } @@ -66,6 +85,10 @@ public AddressFamilyType addressFamilyType() { return this.innerModel().addressFamilyType(); } + public LastOperationProperties lastOperation() { + return this.innerModel().lastOperation(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -78,23 +101,6 @@ public AdministrativeState administrativeState() { return this.innerModel().administrativeState(); } - public CommunityActionTypes defaultAction() { - return this.innerModel().defaultAction(); - } - - public List statements() { - List inner = this.innerModel().statements(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String annotation() { - return this.innerModel().annotation(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -190,11 +196,11 @@ public RoutePolicy refresh(Context context) { return this; } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager.routePolicies().updateAdministrativeState(resourceGroupName, routePolicyName, body); } - public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + public UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context) { return serviceManager.routePolicies() .updateAdministrativeState(resourceGroupName, routePolicyName, body, context); @@ -226,6 +232,11 @@ public RoutePolicyImpl withRegion(String location) { return this; } + public RoutePolicyImpl withStatements(List statements) { + this.innerModel().withStatements(statements); + return this; + } + public RoutePolicyImpl withNetworkFabricId(String networkFabricId) { this.innerModel().withNetworkFabricId(networkFabricId); return this; @@ -241,8 +252,8 @@ public RoutePolicyImpl withTags(Map tags) { } } - public RoutePolicyImpl withAddressFamilyType(AddressFamilyType addressFamilyType) { - this.innerModel().withAddressFamilyType(addressFamilyType); + public RoutePolicyImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); return this; } @@ -256,22 +267,17 @@ public RoutePolicyImpl withDefaultAction(CommunityActionTypes defaultAction) { } } - public RoutePolicyImpl withStatements(List statements) { - if (isInCreateMode()) { - this.innerModel().withStatements(statements); - return this; - } else { - this.updateBody.withStatements(statements); - return this; - } + public RoutePolicyImpl withAddressFamilyType(AddressFamilyType addressFamilyType) { + this.innerModel().withAddressFamilyType(addressFamilyType); + return this; } - public RoutePolicyImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public RoutePolicyImpl withStatementsForUpdate(List statements) { + this.updateBody.withStatements(statements); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/UpdateAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/UpdateAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..05d63bd79c43 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/UpdateAdministrativeStateResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class UpdateAdministrativeStateResponseImpl implements UpdateAdministrativeStateResponse { + private UpdateAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + UpdateAdministrativeStateResponseImpl(UpdateAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public UpdateAdministrativeStateResponseProperties properties() { + return this.innerModel().properties(); + } + + public UpdateAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java index 03ceb17730e0..7a00c6a2489a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -20,6 +20,10 @@ public final class ValidateConfigurationResponseImpl implements ValidateConfigur this.serviceManager = serviceManager; } + public ManagementError error() { + return this.innerModel().error(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -28,10 +32,6 @@ public String url() { return this.innerModel().url(); } - public ManagementError error() { - return this.innerModel().error(); - } - public ValidateConfigurationResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationOperationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationOperationResponseImpl.java new file mode 100644 index 000000000000..6ae36f6bb1e5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationOperationResponseImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.OperationStatusResult; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ViewDeviceConfigurationOperationResponseImpl implements ViewDeviceConfigurationOperationResponse { + private ViewDeviceConfigurationOperationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + ViewDeviceConfigurationOperationResponseImpl(ViewDeviceConfigurationOperationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public ViewDeviceConfigurationResponseProperties properties() { + return this.innerModel().properties(); + } + + public ViewDeviceConfigurationOperationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListsListResult.java index b9c860048ba3..f5441aa56526 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Access Control Lists. + * Paged collection of AccessControlList items. */ -@Fluent +@Immutable public final class AccessControlListsListResult implements JsonSerializable { /* - * List of Access Control List resources. + * The AccessControlList items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of AccessControlListsListResult class. */ - public AccessControlListsListResult() { + private AccessControlListsListResult() { } /** - * Get the value property: List of Access Control List resources. + * Get the value property: The AccessControlList items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Access Control List resources. - * - * @param value the value value to set. - * @return the AccessControlListsListResult object itself. - */ - public AccessControlListsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the AccessControlListsListResult object itself. - */ - public AccessControlListsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AccessControlListsListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AccessControlListsListResult. */ public static AccessControlListsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworksList.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworksList.java index 29b298af1db6..88610b214a5d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworksList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of External Networks. + * Paged collection of ExternalNetwork items. */ -@Fluent +@Immutable public final class ExternalNetworksList implements JsonSerializable { /* - * List of External Network resources. + * The ExternalNetwork items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ExternalNetworksList class. */ - public ExternalNetworksList() { + private ExternalNetworksList() { } /** - * Get the value property: List of External Network resources. + * Get the value property: The ExternalNetwork items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of External Network resources. - * - * @param value the value value to set. - * @return the ExternalNetworksList object itself. - */ - public ExternalNetworksList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the ExternalNetworksList object itself. - */ - public ExternalNetworksList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExternalNetworksList if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ExternalNetworksList. */ public static ExternalNetworksList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworksList.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworksList.java index 568d980598ce..65c733dca4fa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworksList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Internal Networks. + * Paged collection of InternalNetwork items. */ -@Fluent +@Immutable public final class InternalNetworksList implements JsonSerializable { /* - * List of Internal Network resources. + * The InternalNetwork items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of InternalNetworksList class. */ - public InternalNetworksList() { + private InternalNetworksList() { } /** - * Get the value property: List of Internal Network resources. + * Get the value property: The InternalNetwork items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Internal Network resources. - * - * @param value the value value to set. - * @return the InternalNetworksList object itself. - */ - public InternalNetworksList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the InternalNetworksList object itself. - */ - public InternalNetworksList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InternalNetworksList if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the InternalNetworksList. */ public static InternalNetworksList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRulesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRulesListResult.java index 316cd6ef05db..45c14fd6670f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRulesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Internet Gateway Rules. + * Paged collection of InternetGatewayRule items. */ -@Fluent +@Immutable public final class InternetGatewayRulesListResult implements JsonSerializable { /* - * List of Internet Gateway Rule resources. + * The InternetGatewayRule items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of InternetGatewayRulesListResult class. */ - public InternetGatewayRulesListResult() { + private InternetGatewayRulesListResult() { } /** - * Get the value property: List of Internet Gateway Rule resources. + * Get the value property: The InternetGatewayRule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Internet Gateway Rule resources. - * - * @param value the value value to set. - * @return the InternetGatewayRulesListResult object itself. - */ - public InternetGatewayRulesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the InternetGatewayRulesListResult object itself. - */ - public InternetGatewayRulesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InternetGatewayRulesListResult if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the InternetGatewayRulesListResult. */ public static InternetGatewayRulesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewaysListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewaysListResult.java index 73e53efb122d..e2293441bd69 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewaysListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of InternetGateways. + * Paged collection of InternetGateway items. */ -@Fluent +@Immutable public final class InternetGatewaysListResult implements JsonSerializable { /* - * Displays list of Internet Gateway resources. + * The InternetGateway items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of InternetGatewaysListResult class. */ - public InternetGatewaysListResult() { + private InternetGatewaysListResult() { } /** - * Get the value property: Displays list of Internet Gateway resources. + * Get the value property: The InternetGateway items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Displays list of Internet Gateway resources. - * - * @param value the value value to set. - * @return the InternetGatewaysListResult object itself. - */ - public InternetGatewaysListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the InternetGatewaysListResult object itself. - */ - public InternetGatewaysListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InternetGatewaysListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the InternetGatewaysListResult. */ public static InternetGatewaysListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunitiesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunitiesListResult.java index 1fd982657815..cc8297d1653f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunitiesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of IP Communities. + * Paged collection of IpCommunity items. */ -@Fluent +@Immutable public final class IpCommunitiesListResult implements JsonSerializable { /* - * List of IP Community resources. + * The IpCommunity items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of IpCommunitiesListResult class. */ - public IpCommunitiesListResult() { + private IpCommunitiesListResult() { } /** - * Get the value property: List of IP Community resources. + * Get the value property: The IpCommunity items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of IP Community resources. - * - * @param value the value value to set. - * @return the IpCommunitiesListResult object itself. - */ - public IpCommunitiesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the IpCommunitiesListResult object itself. - */ - public IpCommunitiesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpCommunitiesListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpCommunitiesListResult. */ public static IpCommunitiesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java index 6af8cade3c43..6c818eba64b0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of IP Extended Communities. + * The response of a IpExtendedCommunity list operation. */ -@Fluent +@Immutable public final class IpExtendedCommunityListResult implements JsonSerializable { /* - * List of IP Extended Communities resources. + * The IpExtendedCommunity items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of IpExtendedCommunityListResult class. */ - public IpExtendedCommunityListResult() { + private IpExtendedCommunityListResult() { } /** - * Get the value property: List of IP Extended Communities resources. + * Get the value property: The IpExtendedCommunity items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of IP Extended Communities resources. - * - * @param value the value value to set. - * @return the IpExtendedCommunityListResult object itself. - */ - public IpExtendedCommunityListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the IpExtendedCommunityListResult object itself. - */ - public IpExtendedCommunityListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpExtendedCommunityListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpExtendedCommunityListResult. */ public static IpExtendedCommunityListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixesListResult.java index a55b13a645ef..4c0551ed7ab6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of IP Prefixes. + * Paged collection of IpPrefix items. */ -@Fluent +@Immutable public final class IpPrefixesListResult implements JsonSerializable { /* - * List of IP Prefix resources. + * The IpPrefix items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of IpPrefixesListResult class. */ - public IpPrefixesListResult() { + private IpPrefixesListResult() { } /** - * Get the value property: List of IP Prefix resources. + * Get the value property: The IpPrefix items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of IP Prefix resources. - * - * @param value the value value to set. - * @return the IpPrefixesListResult object itself. - */ - public IpPrefixesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the IpPrefixesListResult object itself. - */ - public IpPrefixesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpPrefixesListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpPrefixesListResult. */ public static IpPrefixesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainsListResult.java index 86965bf23ec8..6cf9d8e219d9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of L2 Isolation Domains. + * Paged collection of L2IsolationDomain items. */ -@Fluent +@Immutable public final class L2IsolationDomainsListResult implements JsonSerializable { /* - * Displays list of L2 Isolation Domain resources. + * The L2IsolationDomain items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of L2IsolationDomainsListResult class. */ - public L2IsolationDomainsListResult() { + private L2IsolationDomainsListResult() { } /** - * Get the value property: Displays list of L2 Isolation Domain resources. + * Get the value property: The L2IsolationDomain items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Displays list of L2 Isolation Domain resources. - * - * @param value the value value to set. - * @return the L2IsolationDomainsListResult object itself. - */ - public L2IsolationDomainsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the L2IsolationDomainsListResult object itself. - */ - public L2IsolationDomainsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of L2IsolationDomainsListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the L2IsolationDomainsListResult. */ public static L2IsolationDomainsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainsListResult.java index 395e2da83e65..6cfe6906526a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of L3 Isolation Domains. + * Paged collection of L3IsolationDomain items. */ -@Fluent +@Immutable public final class L3IsolationDomainsListResult implements JsonSerializable { /* - * List of L3 Isolation Domain resources. + * The L3IsolationDomain items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of L3IsolationDomainsListResult class. */ - public L3IsolationDomainsListResult() { + private L3IsolationDomainsListResult() { } /** - * Get the value property: List of L3 Isolation Domain resources. + * Get the value property: The L3IsolationDomain items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of L3 Isolation Domain resources. - * - * @param value the value value to set. - * @return the L3IsolationDomainsListResult object itself. - */ - public L3IsolationDomainsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the L3IsolationDomainsListResult object itself. - */ - public L3IsolationDomainsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of L3IsolationDomainsListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the L3IsolationDomainsListResult. */ public static L3IsolationDomainsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupsListResult.java index 0a76f545c561..c5912619507e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Neighbor Group. + * Paged collection of NeighborGroup items. */ -@Fluent +@Immutable public final class NeighborGroupsListResult implements JsonSerializable { /* - * List of Neighbor Group resources. + * The NeighborGroup items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NeighborGroupsListResult class. */ - public NeighborGroupsListResult() { + private NeighborGroupsListResult() { } /** - * Get the value property: List of Neighbor Group resources. + * Get the value property: The NeighborGroup items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Neighbor Group resources. - * - * @param value the value value to set. - * @return the NeighborGroupsListResult object itself. - */ - public NeighborGroupsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NeighborGroupsListResult object itself. - */ - public NeighborGroupsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NeighborGroupsListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NeighborGroupsListResult. */ public static NeighborGroupsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapDeviceListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapDeviceListResult.java new file mode 100644 index 000000000000..89d7e3c28d28 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapDeviceListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkBootstrapDevice list operation. + */ +@Immutable +public final class NetworkBootstrapDeviceListResult implements JsonSerializable { + /* + * The NetworkBootstrapDevice items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkBootstrapDeviceListResult class. + */ + private NetworkBootstrapDeviceListResult() { + } + + /** + * Get the value property: The NetworkBootstrapDevice items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDeviceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDeviceListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapDeviceListResult. + */ + public static NetworkBootstrapDeviceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDeviceListResult deserializedNetworkBootstrapDeviceListResult + = new NetworkBootstrapDeviceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkBootstrapDeviceInner.fromJson(reader1)); + deserializedNetworkBootstrapDeviceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkBootstrapDeviceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDeviceListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapInterfaceListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapInterfaceListResult.java new file mode 100644 index 000000000000..da45769be329 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapInterfaceListResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkBootstrapInterface list operation. + */ +@Immutable +public final class NetworkBootstrapInterfaceListResult + implements JsonSerializable { + /* + * The NetworkBootstrapInterface items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkBootstrapInterfaceListResult class. + */ + private NetworkBootstrapInterfaceListResult() { + } + + /** + * Get the value property: The NetworkBootstrapInterface items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapInterfaceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapInterfaceListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkBootstrapInterfaceListResult. + */ + public static NetworkBootstrapInterfaceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapInterfaceListResult deserializedNetworkBootstrapInterfaceListResult + = new NetworkBootstrapInterfaceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkBootstrapInterfaceInner.fromJson(reader1)); + deserializedNetworkBootstrapInterfaceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkBootstrapInterfaceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapInterfaceListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkusListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkusListResult.java index 2bb0e025682d..03b0de6cd103 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkusListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network Device SKUs. + * Paged collection of NetworkDeviceSku items. */ -@Fluent +@Immutable public final class NetworkDeviceSkusListResult implements JsonSerializable { /* - * List of Network Device SKU resources. + * The NetworkDeviceSku items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkDeviceSkusListResult class. */ - public NetworkDeviceSkusListResult() { + private NetworkDeviceSkusListResult() { } /** - * Get the value property: List of Network Device SKU resources. + * Get the value property: The NetworkDeviceSku items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Network Device SKU resources. - * - * @param value the value value to set. - * @return the NetworkDeviceSkusListResult object itself. - */ - public NetworkDeviceSkusListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkDeviceSkusListResult object itself. - */ - public NetworkDeviceSkusListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkDeviceSkusListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkDeviceSkusListResult. */ public static NetworkDeviceSkusListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDevicesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDevicesListResult.java index 35fd5bf70494..e20d6ff9bfee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDevicesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of NetworkDevices. + * Paged collection of NetworkDevice items. */ -@Fluent +@Immutable public final class NetworkDevicesListResult implements JsonSerializable { /* - * List of NetworkDevice resources. + * The NetworkDevice items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkDevicesListResult class. */ - public NetworkDevicesListResult() { + private NetworkDevicesListResult() { } /** - * Get the value property: List of NetworkDevice resources. + * Get the value property: The NetworkDevice items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkDevice resources. - * - * @param value the value value to set. - * @return the NetworkDevicesListResult object itself. - */ - public NetworkDevicesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkDevicesListResult object itself. - */ - public NetworkDevicesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkDevicesListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkDevicesListResult. */ public static NetworkDevicesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllersListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllersListResult.java index 690a61bea3ee..ad4d6b2fbc51 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllersListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network Fabric Controllers. + * Paged collection of NetworkFabricController items. */ -@Fluent +@Immutable public final class NetworkFabricControllersListResult implements JsonSerializable { /* - * List of Network Fabric Controller resources. + * The NetworkFabricController items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkFabricControllersListResult class. */ - public NetworkFabricControllersListResult() { + private NetworkFabricControllersListResult() { } /** - * Get the value property: List of Network Fabric Controller resources. + * Get the value property: The NetworkFabricController items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Network Fabric Controller resources. - * - * @param value the value value to set. - * @return the NetworkFabricControllersListResult object itself. - */ - public NetworkFabricControllersListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkFabricControllersListResult object itself. - */ - public NetworkFabricControllersListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkFabricControllersListResult if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkFabricControllersListResult. */ public static NetworkFabricControllersListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkusListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkusListResult.java index 221fa8a19552..143bb64655f4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkusListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network Fabric SKUs. + * Paged collection of NetworkFabricSku items. */ -@Fluent +@Immutable public final class NetworkFabricSkusListResult implements JsonSerializable { /* - * List of Network Fabric SKU resources. + * The NetworkFabricSku items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkFabricSkusListResult class. */ - public NetworkFabricSkusListResult() { + private NetworkFabricSkusListResult() { } /** - * Get the value property: List of Network Fabric SKU resources. + * Get the value property: The NetworkFabricSku items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Network Fabric SKU resources. - * - * @param value the value value to set. - * @return the NetworkFabricSkusListResult object itself. - */ - public NetworkFabricSkusListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkFabricSkusListResult object itself. - */ - public NetworkFabricSkusListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkFabricSkusListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkFabricSkusListResult. */ public static NetworkFabricSkusListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricsListResult.java index 609cdbd62d29..66650a756348 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network Fabrics. + * Paged collection of NetworkFabric items. */ -@Fluent +@Immutable public final class NetworkFabricsListResult implements JsonSerializable { /* - * List of Network Fabric resources. + * The NetworkFabric items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkFabricsListResult class. */ - public NetworkFabricsListResult() { + private NetworkFabricsListResult() { } /** - * Get the value property: List of Network Fabric resources. + * Get the value property: The NetworkFabric items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Network Fabric resources. - * - * @param value the value value to set. - * @return the NetworkFabricsListResult object itself. - */ - public NetworkFabricsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkFabricsListResult object itself. - */ - public NetworkFabricsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkFabricsListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkFabricsListResult. */ public static NetworkFabricsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfacesList.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfacesList.java index e30a59e8bcd0..4e27add0357a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfacesList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of NetworkInterfaces. + * Paged collection of NetworkInterface items. */ -@Fluent +@Immutable public final class NetworkInterfacesList implements JsonSerializable { /* - * List of NetworkInterfaces resources. + * The NetworkInterface items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkInterfacesList class. */ - public NetworkInterfacesList() { + private NetworkInterfacesList() { } /** - * Get the value property: List of NetworkInterfaces resources. + * Get the value property: The NetworkInterface items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkInterfaces resources. - * - * @param value the value value to set. - * @return the NetworkInterfacesList object itself. - */ - public NetworkInterfacesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkInterfacesList object itself. - */ - public NetworkInterfacesList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkInterfacesList if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkInterfacesList. */ public static NetworkInterfacesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java new file mode 100644 index 000000000000..6076d36cc0a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkMonitor list operation. + */ +@Immutable +public final class NetworkMonitorListResult implements JsonSerializable { + /* + * The NetworkMonitor items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkMonitorListResult class. + */ + private NetworkMonitorListResult() { + } + + /** + * Get the value property: The NetworkMonitor items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkMonitorListResult. + */ + public static NetworkMonitorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorListResult deserializedNetworkMonitorListResult = new NetworkMonitorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkMonitorInner.fromJson(reader1)); + deserializedNetworkMonitorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkMonitorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokersListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokersListResult.java index ed471419ab21..652feb32fa77 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokersListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of NetworkPacketBrokers. + * Paged collection of NetworkPacketBroker items. */ -@Fluent +@Immutable public final class NetworkPacketBrokersListResult implements JsonSerializable { /* - * List of NetworkPacketBroker resources. + * The NetworkPacketBroker items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkPacketBrokersListResult class. */ - public NetworkPacketBrokersListResult() { + private NetworkPacketBrokersListResult() { } /** - * Get the value property: List of NetworkPacketBroker resources. + * Get the value property: The NetworkPacketBroker items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkPacketBroker resources. - * - * @param value the value value to set. - * @return the NetworkPacketBrokersListResult object itself. - */ - public NetworkPacketBrokersListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkPacketBrokersListResult object itself. - */ - public NetworkPacketBrokersListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkPacketBrokersListResult if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkPacketBrokersListResult. */ public static NetworkPacketBrokersListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRacksListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRacksListResult.java index a5dd0a1485cb..17d6eb402c19 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRacksListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network Racks. + * Paged collection of NetworkRack items. */ -@Fluent +@Immutable public final class NetworkRacksListResult implements JsonSerializable { /* - * List of Network Rack resources. + * The NetworkRack items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkRacksListResult class. */ - public NetworkRacksListResult() { + private NetworkRacksListResult() { } /** - * Get the value property: List of Network Rack resources. + * Get the value property: The NetworkRack items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Network Rack resources. - * - * @param value the value value to set. - * @return the NetworkRacksListResult object itself. - */ - public NetworkRacksListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkRacksListResult object itself. - */ - public NetworkRacksListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkRacksListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkRacksListResult. */ public static NetworkRacksListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRulesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRulesListResult.java index c4e4432ab9ff..d6b8b7ad588b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRulesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of NetworkTapRules. + * Paged collection of NetworkTapRule items. */ -@Fluent +@Immutable public final class NetworkTapRulesListResult implements JsonSerializable { /* - * List of NetworkTapRule resources. + * The NetworkTapRule items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkTapRulesListResult class. */ - public NetworkTapRulesListResult() { + private NetworkTapRulesListResult() { } /** - * Get the value property: List of NetworkTapRule resources. + * Get the value property: The NetworkTapRule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkTapRule resources. - * - * @param value the value value to set. - * @return the NetworkTapRulesListResult object itself. - */ - public NetworkTapRulesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkTapRulesListResult object itself. - */ - public NetworkTapRulesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkTapRulesListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkTapRulesListResult. */ public static NetworkTapRulesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapsListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapsListResult.java index 656ac0c3456b..03f505f0edaa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of NetworkTaps. + * Paged collection of NetworkTap items. */ -@Fluent +@Immutable public final class NetworkTapsListResult implements JsonSerializable { /* - * List of NetworkTap resources. + * The NetworkTap items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkTapsListResult class. */ - public NetworkTapsListResult() { + private NetworkTapsListResult() { } /** - * Get the value property: List of NetworkTap resources. + * Get the value property: The NetworkTap items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkTap resources. - * - * @param value the value value to set. - * @return the NetworkTapsListResult object itself. - */ - public NetworkTapsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkTapsListResult object itself. - */ - public NetworkTapsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkTapsListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkTapsListResult. */ public static NetworkTapsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectsList.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectsList.java index b9609f484dff..8f5c9335a6da 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of Network To Network Interconnects. + * Paged collection of NetworkToNetworkInterconnect items. */ -@Fluent +@Immutable public final class NetworkToNetworkInterconnectsList implements JsonSerializable { /* - * List of NetworkToNetworkInterconnects resources. + * The NetworkToNetworkInterconnect items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkToNetworkInterconnectsList class. */ - public NetworkToNetworkInterconnectsList() { + private NetworkToNetworkInterconnectsList() { } /** - * Get the value property: List of NetworkToNetworkInterconnects resources. + * Get the value property: The NetworkToNetworkInterconnect items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of NetworkToNetworkInterconnects resources. - * - * @param value the value value to set. - * @return the NetworkToNetworkInterconnectsList object itself. - */ - public NetworkToNetworkInterconnectsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the NetworkToNetworkInterconnectsList object itself. - */ - public NetworkToNetworkInterconnectsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkToNetworkInterconnectsList if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectsList. */ public static NetworkToNetworkInterconnectsList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java similarity index 78% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java index 7d07f0bd3c34..877e09f402ef 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -20,23 +20,23 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,23 +53,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePoliciesListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePoliciesListResult.java index e894b9ed5140..926a19b12eb8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePoliciesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of RoutePolicies. + * Paged collection of RoutePolicy items. */ -@Fluent +@Immutable public final class RoutePoliciesListResult implements JsonSerializable { /* - * List of RoutePolicy resources. + * The RoutePolicy items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of RoutePoliciesListResult class. */ - public RoutePoliciesListResult() { + private RoutePoliciesListResult() { } /** - * Get the value property: List of RoutePolicy resources. + * Get the value property: The RoutePolicy items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of RoutePolicy resources. - * - * @param value the value value to set. - * @return the RoutePoliciesListResult object itself. - */ - public RoutePoliciesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Url to follow for getting next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the RoutePoliciesListResult object itself. - */ - public RoutePoliciesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RoutePoliciesListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the RoutePoliciesListResult. */ public static RoutePoliciesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java index 828b83b30751..fbc1576d674a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureNetworkFabricManagementServiceApi. + * Package containing the implementations for ManagedNetworkFabric. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.implementation; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java index 04e3d0af93bb..53f509efaf72 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -59,32 +59,11 @@ public interface AccessControlList { SystemData systemData(); /** - * Gets the lastSyncedTime property: The last synced timestamp. - * - * @return the lastSyncedTime value. - */ - OffsetDateTime lastSyncedTime(); - - /** - * Gets the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - ConfigurationState configurationState(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @return the annotation value. */ - AdministrativeState administrativeState(); + String annotation(); /** * Gets the configurationType property: Input method to configure Access Control List. @@ -123,11 +102,74 @@ public interface AccessControlList { List dynamicMatchConfigurations(); /** - * Gets the annotation property: Switch configuration description. + * Gets the lastSyncedTime property: The last synced timestamp. * - * @return the annotation value. + * @return the lastSyncedTime value. */ - String annotation(); + OffsetDateTime lastSyncedTime(); + + /** + * Gets the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + AclType aclType(); + + /** + * Gets the deviceRole property: Device Role. + * + * @return the deviceRole value. + */ + DeviceRole deviceRole(); + + /** + * Gets the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + GlobalAccessControlListActionProperties globalAccessControlListActions(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + List networkFabricIds(); + + /** + * Gets the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @return the controlPlaneAclConfiguration value. + */ + List controlPlaneAclConfiguration(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); /** * Gets the region of the resource. @@ -161,7 +203,7 @@ public interface AccessControlList { * The entirety of the AccessControlList definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithConfigurationType, DefinitionStages.WithCreate { } /** @@ -205,16 +247,31 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithConfigurationType withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the AccessControlList definition allowing to specify configurationType. + */ + interface WithConfigurationType { + /** + * Specifies the configurationType property: Input method to configure Access Control List.. + * + * @param configurationType Input method to configure Access Control List. + * @return the next definition stage. + */ + WithCreate withConfigurationType(ConfigurationType configurationType); } /** * The stage of the AccessControlList definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithConfigurationType, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation, DefinitionStages.WithAclsUrl, DefinitionStages.WithDefaultAction, DefinitionStages.WithMatchConfigurations, - DefinitionStages.WithDynamicMatchConfigurations, DefinitionStages.WithAnnotation { + DefinitionStages.WithDynamicMatchConfigurations, DefinitionStages.WithAclType, + DefinitionStages.WithDeviceRole, DefinitionStages.WithGlobalAccessControlListActions, + DefinitionStages.WithControlPlaneAclConfiguration { /** * Executes the create request. * @@ -245,16 +302,16 @@ interface WithTags { } /** - * The stage of the AccessControlList definition allowing to specify configurationType. + * The stage of the AccessControlList definition allowing to specify annotation. */ - interface WithConfigurationType { + interface WithAnnotation { /** - * Specifies the configurationType property: Input method to configure Access Control List.. + * Specifies the annotation property: Switch configuration description.. * - * @param configurationType Input method to configure Access Control List. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withConfigurationType(ConfigurationType configurationType); + WithCreate withAnnotation(String annotation); } /** @@ -312,16 +369,56 @@ interface WithDynamicMatchConfigurations { } /** - * The stage of the AccessControlList definition allowing to specify annotation. + * The stage of the AccessControlList definition allowing to specify aclType. */ - interface WithAnnotation { + interface WithAclType { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the aclType property: Access Control List (ACL) Type. * - * @param annotation Switch configuration description. + * @param aclType Access Control List (ACL) Type. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withAclType(AclType aclType); + } + + /** + * The stage of the AccessControlList definition allowing to specify deviceRole. + */ + interface WithDeviceRole { + /** + * Specifies the deviceRole property: Device Role. + * + * @param deviceRole Device Role. + * @return the next definition stage. + */ + WithCreate withDeviceRole(DeviceRole deviceRole); + } + + /** + * The stage of the AccessControlList definition allowing to specify globalAccessControlListActions. + */ + interface WithGlobalAccessControlListActions { + /** + * Specifies the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions Global Access Control List (ACL) actions. + * @return the next definition stage. + */ + WithCreate withGlobalAccessControlListActions( + GlobalAccessControlListActionProperties globalAccessControlListActions); + } + + /** + * The stage of the AccessControlList definition allowing to specify controlPlaneAclConfiguration. + */ + interface WithControlPlaneAclConfiguration { + /** + * Specifies the controlPlaneAclConfiguration property: Access Control List (ACL) configurations.. + * + * @param controlPlaneAclConfiguration Access Control List (ACL) configurations. + * @return the next definition stage. + */ + WithCreate withControlPlaneAclConfiguration(List controlPlaneAclConfiguration); } } @@ -335,9 +432,11 @@ interface WithAnnotation { /** * The template for AccessControlList update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithAnnotation, UpdateStages.WithConfigurationType, - UpdateStages.WithAclsUrl, UpdateStages.WithDefaultAction, UpdateStages.WithMatchConfigurations, - UpdateStages.WithDynamicMatchConfigurations { + interface Update extends UpdateStages.WithTags, UpdateStages.WithConfigurationType, UpdateStages.WithAclsUrl, + UpdateStages.WithDefaultAction, UpdateStages.WithMatchConfigurations, + UpdateStages.WithDynamicMatchConfigurations, UpdateStages.WithControlPlaneAclConfiguration, + UpdateStages.WithAclType, UpdateStages.WithDeviceRole, UpdateStages.WithGlobalAccessControlListActions, + UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -363,7 +462,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -371,19 +470,6 @@ interface WithTags { Update withTags(Map tags); } - /** - * The stage of the AccessControlList update allowing to specify annotation. - */ - interface WithAnnotation { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - Update withAnnotation(String annotation); - } - /** * The stage of the AccessControlList update allowing to specify configurationType. */ @@ -435,7 +521,7 @@ interface WithMatchConfigurations { * @param matchConfigurations List of match configurations. * @return the next definition stage. */ - Update withMatchConfigurations(List matchConfigurations); + Update withMatchConfigurationsForUpdate(List matchConfigurations); } /** @@ -448,7 +534,75 @@ interface WithDynamicMatchConfigurations { * @param dynamicMatchConfigurations List of dynamic match configurations. * @return the next definition stage. */ - Update withDynamicMatchConfigurations(List dynamicMatchConfigurations); + Update withDynamicMatchConfigurationsForUpdate( + List dynamicMatchConfigurations); + } + + /** + * The stage of the AccessControlList update allowing to specify controlPlaneAclConfiguration. + */ + interface WithControlPlaneAclConfiguration { + /** + * Specifies the controlPlaneAclConfiguration property: Access Control List (ACL) configurations.. + * + * @param controlPlaneAclConfiguration Access Control List (ACL) configurations. + * @return the next definition stage. + */ + Update withControlPlaneAclConfigurationForUpdate( + List controlPlaneAclConfiguration); + } + + /** + * The stage of the AccessControlList update allowing to specify aclType. + */ + interface WithAclType { + /** + * Specifies the aclType property: Access Control List (ACL) Type. + * + * @param aclType Access Control List (ACL) Type. + * @return the next definition stage. + */ + Update withAclType(AclType aclType); + } + + /** + * The stage of the AccessControlList update allowing to specify deviceRole. + */ + interface WithDeviceRole { + /** + * Specifies the deviceRole property: Device Role. + * + * @param deviceRole Device Role. + * @return the next definition stage. + */ + Update withDeviceRole(DeviceRole deviceRole); + } + + /** + * The stage of the AccessControlList update allowing to specify globalAccessControlListActions. + */ + interface WithGlobalAccessControlListActions { + /** + * Specifies the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions Global Access Control List (ACL) actions. + * @return the next definition stage. + */ + Update withGlobalAccessControlListActions( + GlobalAccessControlListActionPatchProperties globalAccessControlListActions); + } + + /** + * The stage of the AccessControlList update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); } } @@ -468,21 +622,17 @@ interface WithDynamicMatchConfigurations { AccessControlList refresh(Context context); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -490,55 +640,47 @@ interface WithDynamicMatchConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate resync(); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate resync(Context context); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java index 2beedacacc40..28195e4640db 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -26,6 +26,16 @@ public final class AccessControlListAction implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private AclActionType type; + + /* + * Name of the counter block to get match count information. + */ + private String counterName; + + /* + * Remark comment + */ + private String remarkComment; + + /* + * Police rate configuration + */ + private PoliceRateConfigurationProperties policeRateConfiguration; + + /** + * Creates an instance of AccessControlListActionPatch class. + */ + public AccessControlListActionPatch() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public AclActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch withType(AclActionType type) { + this.type = type; + return this; + } + + /** + * Get the counterName property: Name of the counter block to get match count information. + * + * @return the counterName value. + */ + public String counterName() { + return this.counterName; + } + + /** + * Set the counterName property: Name of the counter block to get match count information. + * + * @param counterName the counterName value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch withCounterName(String counterName) { + this.counterName = counterName; + return this; + } + + /** + * Get the remarkComment property: Remark comment. + * + * @return the remarkComment value. + */ + public String remarkComment() { + return this.remarkComment; + } + + /** + * Set the remarkComment property: Remark comment. + * + * @param remarkComment the remarkComment value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch withRemarkComment(String remarkComment) { + this.remarkComment = remarkComment; + return this; + } + + /** + * Get the policeRateConfiguration property: Police rate configuration. + * + * @return the policeRateConfiguration value. + */ + public PoliceRateConfigurationProperties policeRateConfiguration() { + return this.policeRateConfiguration; + } + + /** + * Set the policeRateConfiguration property: Police rate configuration. + * + * @param policeRateConfiguration the policeRateConfiguration value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch + withPoliceRateConfiguration(PoliceRateConfigurationProperties policeRateConfiguration) { + this.policeRateConfiguration = policeRateConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("counterName", this.counterName); + jsonWriter.writeStringField("remarkComment", this.remarkComment); + jsonWriter.writeJsonField("policeRateConfiguration", this.policeRateConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListActionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListActionPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListActionPatch. + */ + public static AccessControlListActionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListActionPatch deserializedAccessControlListActionPatch = new AccessControlListActionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAccessControlListActionPatch.type = AclActionType.fromString(reader.getString()); + } else if ("counterName".equals(fieldName)) { + deserializedAccessControlListActionPatch.counterName = reader.getString(); + } else if ("remarkComment".equals(fieldName)) { + deserializedAccessControlListActionPatch.remarkComment = reader.getString(); + } else if ("policeRateConfiguration".equals(fieldName)) { + deserializedAccessControlListActionPatch.policeRateConfiguration + = PoliceRateConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListActionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java index 0e999bad8582..4582744ccb1a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -41,11 +41,21 @@ public final class AccessControlListMatchCondition extends CommonMatchConditions */ private List dscpMarkings; + /* + * Protocol neighbors that need to be matched. + */ + private List protocolNeighbors; + /* * Defines the port condition that needs to be matched. */ private AccessControlListPortCondition portCondition; + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationProperties icmpConfiguration; + /** * Creates an instance of AccessControlListMatchCondition class. */ @@ -152,6 +162,26 @@ public AccessControlListMatchCondition withDscpMarkings(List dscpMarking return this; } + /** + * Get the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @return the protocolNeighbors value. + */ + public List protocolNeighbors() { + return this.protocolNeighbors; + } + + /** + * Set the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @param protocolNeighbors the protocolNeighbors value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withProtocolNeighbors(List protocolNeighbors) { + this.protocolNeighbors = protocolNeighbors; + return this; + } + /** * Get the portCondition property: Defines the port condition that needs to be matched. * @@ -172,6 +202,26 @@ public AccessControlListMatchCondition withPortCondition(AccessControlListPortCo return this; } + /** + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. + */ + public IcmpConfigurationProperties icmpConfiguration() { + return this.icmpConfiguration; + } + + /** + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withIcmpConfiguration(IcmpConfigurationProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; + } + /** * {@inheritDoc} */ @@ -199,24 +249,6 @@ public AccessControlListMatchCondition withIpCondition(IpMatchCondition ipCondit return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (portCondition() != null) { - portCondition().validate(); - } - if (vlanMatchCondition() != null) { - vlanMatchCondition().validate(); - } - if (ipCondition() != null) { - ipCondition().validate(); - } - } - /** * {@inheritDoc} */ @@ -231,7 +263,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("ipLengths", this.ipLengths, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ttlValues", this.ttlValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("dscpMarkings", this.dscpMarkings, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("protocolNeighbors", this.protocolNeighbors, + (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); return jsonWriter.writeEndObject(); } @@ -274,9 +309,15 @@ public static AccessControlListMatchCondition fromJson(JsonReader jsonReader) th } else if ("dscpMarkings".equals(fieldName)) { List dscpMarkings = reader.readArray(reader1 -> reader1.getString()); deserializedAccessControlListMatchCondition.dscpMarkings = dscpMarkings; + } else if ("protocolNeighbors".equals(fieldName)) { + List protocolNeighbors = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchCondition.protocolNeighbors = protocolNeighbors; } else if ("portCondition".equals(fieldName)) { deserializedAccessControlListMatchCondition.portCondition = AccessControlListPortCondition.fromJson(reader); + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedAccessControlListMatchCondition.icmpConfiguration + = IcmpConfigurationProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java new file mode 100644 index 000000000000..4f44b262ae4d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match condition that is supported to filter the traffic. + */ +@Fluent +public final class AccessControlListMatchConditionPatch extends CommonMatchConditionsPatch { + /* + * List of ether type values that need to be matched. + */ + private List etherTypes; + + /* + * List of IP fragment packets that need to be matched. + */ + private List fragments; + + /* + * List of IP Lengths that need to be matched. + */ + private List ipLengths; + + /* + * List of TTL [Time To Live] values that need to be matched. + */ + private List ttlValues; + + /* + * List of DSCP Markings that need to be matched. + */ + private List dscpMarkings; + + /* + * Defines the port condition that needs to be matched. + */ + private AccessControlListPortConditionPatch portCondition; + + /* + * Protocol neighbors that need to be matched. + */ + private List protocolNeighbors; + + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationPatchProperties icmpConfiguration; + + /** + * Creates an instance of AccessControlListMatchConditionPatch class. + */ + public AccessControlListMatchConditionPatch() { + } + + /** + * Get the etherTypes property: List of ether type values that need to be matched. + * + * @return the etherTypes value. + */ + public List etherTypes() { + return this.etherTypes; + } + + /** + * Set the etherTypes property: List of ether type values that need to be matched. + * + * @param etherTypes the etherTypes value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withEtherTypes(List etherTypes) { + this.etherTypes = etherTypes; + return this; + } + + /** + * Get the fragments property: List of IP fragment packets that need to be matched. + * + * @return the fragments value. + */ + public List fragments() { + return this.fragments; + } + + /** + * Set the fragments property: List of IP fragment packets that need to be matched. + * + * @param fragments the fragments value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withFragments(List fragments) { + this.fragments = fragments; + return this; + } + + /** + * Get the ipLengths property: List of IP Lengths that need to be matched. + * + * @return the ipLengths value. + */ + public List ipLengths() { + return this.ipLengths; + } + + /** + * Set the ipLengths property: List of IP Lengths that need to be matched. + * + * @param ipLengths the ipLengths value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withIpLengths(List ipLengths) { + this.ipLengths = ipLengths; + return this; + } + + /** + * Get the ttlValues property: List of TTL [Time To Live] values that need to be matched. + * + * @return the ttlValues value. + */ + public List ttlValues() { + return this.ttlValues; + } + + /** + * Set the ttlValues property: List of TTL [Time To Live] values that need to be matched. + * + * @param ttlValues the ttlValues value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withTtlValues(List ttlValues) { + this.ttlValues = ttlValues; + return this; + } + + /** + * Get the dscpMarkings property: List of DSCP Markings that need to be matched. + * + * @return the dscpMarkings value. + */ + public List dscpMarkings() { + return this.dscpMarkings; + } + + /** + * Set the dscpMarkings property: List of DSCP Markings that need to be matched. + * + * @param dscpMarkings the dscpMarkings value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withDscpMarkings(List dscpMarkings) { + this.dscpMarkings = dscpMarkings; + return this; + } + + /** + * Get the portCondition property: Defines the port condition that needs to be matched. + * + * @return the portCondition value. + */ + public AccessControlListPortConditionPatch portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Defines the port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withPortCondition(AccessControlListPortConditionPatch portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * Get the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @return the protocolNeighbors value. + */ + public List protocolNeighbors() { + return this.protocolNeighbors; + } + + /** + * Set the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @param protocolNeighbors the protocolNeighbors value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withProtocolNeighbors(List protocolNeighbors) { + this.protocolNeighbors = protocolNeighbors; + return this; + } + + /** + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. + */ + public IcmpConfigurationPatchProperties icmpConfiguration() { + return this.icmpConfiguration; + } + + /** + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch + withIcmpConfiguration(IcmpConfigurationPatchProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListMatchConditionPatch withProtocolTypes(List protocolTypes) { + super.withProtocolTypes(protocolTypes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListMatchConditionPatch withVlanMatchCondition(VlanMatchConditionPatch vlanMatchCondition) { + super.withVlanMatchCondition(vlanMatchCondition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListMatchConditionPatch withIpCondition(IpMatchConditionPatch ipCondition) { + super.withIpCondition(ipCondition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("protocolTypes", protocolTypes(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", vlanMatchCondition()); + jsonWriter.writeJsonField("ipCondition", ipCondition()); + jsonWriter.writeArrayField("etherTypes", this.etherTypes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("fragments", this.fragments, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipLengths", this.ipLengths, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ttlValues", this.ttlValues, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("dscpMarkings", this.dscpMarkings, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeArrayField("protocolNeighbors", this.protocolNeighbors, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListMatchConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListMatchConditionPatch. + */ + public static AccessControlListMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListMatchConditionPatch deserializedAccessControlListMatchConditionPatch + = new AccessControlListMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.withProtocolTypes(protocolTypes); + } else if ("vlanMatchCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch + .withVlanMatchCondition(VlanMatchConditionPatch.fromJson(reader)); + } else if ("ipCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch + .withIpCondition(IpMatchConditionPatch.fromJson(reader)); + } else if ("etherTypes".equals(fieldName)) { + List etherTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.etherTypes = etherTypes; + } else if ("fragments".equals(fieldName)) { + List fragments = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.fragments = fragments; + } else if ("ipLengths".equals(fieldName)) { + List ipLengths = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.ipLengths = ipLengths; + } else if ("ttlValues".equals(fieldName)) { + List ttlValues = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.ttlValues = ttlValues; + } else if ("dscpMarkings".equals(fieldName)) { + List dscpMarkings = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.dscpMarkings = dscpMarkings; + } else if ("portCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.portCondition + = AccessControlListPortConditionPatch.fromJson(reader); + } else if ("protocolNeighbors".equals(fieldName)) { + List protocolNeighbors = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.protocolNeighbors = protocolNeighbors; + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.icmpConfiguration + = IcmpConfigurationPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java index 769b65cc777f..6c0716492810 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -150,20 +150,6 @@ public AccessControlListMatchConfiguration withActions(List e.validate()); - } - if (actions() != null) { - actions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java new file mode 100644 index 000000000000..e3eede78b2d6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match configuration that are supported to filter the traffic. + */ +@Fluent +public final class AccessControlListMatchConfigurationPatch + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration. + */ + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + private IpAddressType ipAddressType; + + /* + * List of the match conditions. + */ + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + private List actions; + + /** + * Creates an instance of AccessControlListMatchConfigurationPatch class. + */ + public AccessControlListMatchConfigurationPatch() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConditions property: List of the match conditions. + * + * @return the matchConditions value. + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set the matchConditions property: List of the match conditions. + * + * @param matchConditions the matchConditions value to set. + * @return the AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch + withMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get the actions property: List of actions that need to be performed for the matched conditions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions that need to be performed for the matched conditions. + * + * @param actions the actions value to set. + * @return the AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConditions", this.matchConditions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListMatchConfigurationPatch if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListMatchConfigurationPatch. + */ + public static AccessControlListMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListMatchConfigurationPatch deserializedAccessControlListMatchConfigurationPatch + = new AccessControlListMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.matchConfigurationName = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("ipAddressType".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.ipAddressType + = IpAddressType.fromString(reader.getString()); + } else if ("matchConditions".equals(fieldName)) { + List matchConditions + = reader.readArray(reader1 -> AccessControlListMatchConditionPatch.fromJson(reader1)); + deserializedAccessControlListMatchConfigurationPatch.matchConditions = matchConditions; + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> AccessControlListActionPatch.fromJson(reader1)); + deserializedAccessControlListMatchConfigurationPatch.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListMatchConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java index 8879316f3e3e..909f27fb7e91 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,29 +47,6 @@ public AccessControlListPatch withTags(Map tags) { return this; } - /** - * Get the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); - } - - /** - * Set the annotation property: Switch configuration description. - * - * @param annotation the annotation value to set. - * @return the AccessControlListPatch object itself. - */ - public AccessControlListPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - /** * Get the configurationType property: Input method to configure Access Control List. * @@ -146,7 +123,7 @@ public AccessControlListPatch withDefaultAction(CommunityActionTypes defaultActi * * @return the matchConfigurations value. */ - public List matchConfigurations() { + public List matchConfigurations() { return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); } @@ -157,7 +134,7 @@ public List matchConfigurations() { * @return the AccessControlListPatch object itself. */ public AccessControlListPatch - withMatchConfigurations(List matchConfigurations) { + withMatchConfigurations(List matchConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListPatchProperties(); } @@ -170,7 +147,7 @@ public List matchConfigurations() { * * @return the dynamicMatchConfigurations value. */ - public List dynamicMatchConfigurations() { + public List dynamicMatchConfigurations() { return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); } @@ -181,7 +158,7 @@ public List dynamicMatchConfigurations() { * @return the AccessControlListPatch object itself. */ public AccessControlListPatch - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + withDynamicMatchConfigurations(List dynamicMatchConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListPatchProperties(); } @@ -190,15 +167,120 @@ public List dynamicMatchConfigurations() { } /** - * Validates the instance. + * Get the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the controlPlaneAclConfiguration value. */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public List controlPlaneAclConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAclConfiguration(); + } + + /** + * Set the controlPlaneAclConfiguration property: Access Control List (ACL) configurations. + * + * @param controlPlaneAclConfiguration the controlPlaneAclConfiguration value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch + withControlPlaneAclConfiguration(List controlPlaneAclConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withControlPlaneAclConfiguration(controlPlaneAclConfiguration); + return this; + } + + /** + * Get the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + public AclType aclType() { + return this.innerProperties() == null ? null : this.innerProperties().aclType(); + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch withAclType(AclType aclType) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withAclType(aclType); + return this; + } + + /** + * Get the deviceRole property: Device Role. + * + * @return the deviceRole value. + */ + public DeviceRole deviceRole() { + return this.innerProperties() == null ? null : this.innerProperties().deviceRole(); + } + + /** + * Set the deviceRole property: Device Role. + * + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch withDeviceRole(DeviceRole deviceRole) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); } + this.innerProperties().withDeviceRole(deviceRole); + return this; + } + + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionPatchProperties globalAccessControlListActions() { + return this.innerProperties() == null ? null : this.innerProperties().globalAccessControlListActions(); + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch withGlobalAccessControlListActions( + GlobalAccessControlListActionPatchProperties globalAccessControlListActions) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withGlobalAccessControlListActions(globalAccessControlListActions); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java deleted file mode 100644 index a8b908c2ce8c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Access Control List Patch Properties defines the patchable resource properties. - */ -@Fluent -public class AccessControlListPatchableProperties implements JsonSerializable { - /* - * Input method to configure Access Control List. - */ - private ConfigurationType configurationType; - - /* - * Access Control List file URL. - */ - private String aclsUrl; - - /* - * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. - */ - private CommunityActionTypes defaultAction; - - /* - * List of match configurations. - */ - private List matchConfigurations; - - /* - * List of dynamic match configurations. - */ - private List dynamicMatchConfigurations; - - /** - * Creates an instance of AccessControlListPatchableProperties class. - */ - public AccessControlListPatchableProperties() { - } - - /** - * Get the configurationType property: Input method to configure Access Control List. - * - * @return the configurationType value. - */ - public ConfigurationType configurationType() { - return this.configurationType; - } - - /** - * Set the configurationType property: Input method to configure Access Control List. - * - * @param configurationType the configurationType value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties withConfigurationType(ConfigurationType configurationType) { - this.configurationType = configurationType; - return this; - } - - /** - * Get the aclsUrl property: Access Control List file URL. - * - * @return the aclsUrl value. - */ - public String aclsUrl() { - return this.aclsUrl; - } - - /** - * Set the aclsUrl property: Access Control List file URL. - * - * @param aclsUrl the aclsUrl value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties withAclsUrl(String aclsUrl) { - this.aclsUrl = aclsUrl; - return this; - } - - /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.defaultAction; - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties withDefaultAction(CommunityActionTypes defaultAction) { - this.defaultAction = defaultAction; - return this; - } - - /** - * Get the matchConfigurations property: List of match configurations. - * - * @return the matchConfigurations value. - */ - public List matchConfigurations() { - return this.matchConfigurations; - } - - /** - * Set the matchConfigurations property: List of match configurations. - * - * @param matchConfigurations the matchConfigurations value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties - withMatchConfigurations(List matchConfigurations) { - this.matchConfigurations = matchConfigurations; - return this; - } - - /** - * Get the dynamicMatchConfigurations property: List of dynamic match configurations. - * - * @return the dynamicMatchConfigurations value. - */ - public List dynamicMatchConfigurations() { - return this.dynamicMatchConfigurations; - } - - /** - * Set the dynamicMatchConfigurations property: List of dynamic match configurations. - * - * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { - this.dynamicMatchConfigurations = dynamicMatchConfigurations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("configurationType", - this.configurationType == null ? null : this.configurationType.toString()); - jsonWriter.writeStringField("aclsUrl", this.aclsUrl); - jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); - jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessControlListPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessControlListPatchableProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessControlListPatchableProperties. - */ - public static AccessControlListPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessControlListPatchableProperties deserializedAccessControlListPatchableProperties - = new AccessControlListPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("configurationType".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("aclsUrl".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.aclsUrl = reader.getString(); - } else if ("defaultAction".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.defaultAction - = CommunityActionTypes.fromString(reader.getString()); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> AccessControlListMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchableProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchableProperties.dynamicMatchConfigurations - = dynamicMatchConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedAccessControlListPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java index 294e12d3eefe..d15593383e33 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -89,22 +88,6 @@ public AccessControlListPortCondition withPortGroupNames(List portGroupN return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (layer4Protocol() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property layer4Protocol in model AccessControlListPortCondition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListPortCondition.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java new file mode 100644 index 000000000000..9c6eae093947 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the port condition that needs to be matched. + */ +@Fluent +public final class AccessControlListPortConditionPatch extends PortConditionPatch { + /* + * List of protocol flags that need to be matched. Example: established | initial | . List of + * eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg + */ + private List flags; + + /** + * Creates an instance of AccessControlListPortConditionPatch class. + */ + public AccessControlListPortConditionPatch() { + } + + /** + * Get the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. + * + * @return the flags value. + */ + public List flags() { + return this.flags; + } + + /** + * Set the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. + * + * @param flags the flags value to set. + * @return the AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch withFlags(List flags) { + this.flags = flags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListPortConditionPatch withPortType(PortType portType) { + super.withPortType(portType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListPortConditionPatch withLayer4Protocol(Layer4Protocol layer4Protocol) { + super.withLayer4Protocol(layer4Protocol); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListPortConditionPatch withPorts(List ports) { + super.withPorts(ports); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessControlListPortConditionPatch withPortGroupNames(List portGroupNames) { + super.withPortGroupNames(portGroupNames); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("portType", portType() == null ? null : portType().toString()); + jsonWriter.writeStringField("layer4Protocol", layer4Protocol() == null ? null : layer4Protocol().toString()); + jsonWriter.writeArrayField("ports", ports(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("portGroupNames", portGroupNames(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("flags", this.flags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListPortConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListPortConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListPortConditionPatch. + */ + public static AccessControlListPortConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListPortConditionPatch deserializedAccessControlListPortConditionPatch + = new AccessControlListPortConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portType".equals(fieldName)) { + deserializedAccessControlListPortConditionPatch + .withPortType(PortType.fromString(reader.getString())); + } else if ("layer4Protocol".equals(fieldName)) { + deserializedAccessControlListPortConditionPatch + .withLayer4Protocol(Layer4Protocol.fromString(reader.getString())); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.withPorts(ports); + } else if ("portGroupNames".equals(fieldName)) { + List portGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.withPortGroupNames(portGroupNames); + } else if ("flags".equals(fieldName)) { + List flags = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.flags = flags; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListPortConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java index 454ce1ff5e4d..0c3187703938 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface AccessControlLists { /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN AccessControlList getByResourceGroup(String resourceGroupName, String accessControlListName); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(String resourceGroupName, String accessControlListName); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String accessControlListName, Context context); /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List AccessControlLists by resource group. - * * Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Access Control Lists as paginated response with {@link PagedIterable}. + * @return paged collection of AccessControlList items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String accessControlListName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String accessControlListName, + UpdateAdministrativeState body); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,14 +128,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String accessControlListName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String accessControlListName, + UpdateAdministrativeState body, Context context); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,13 +141,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String accessControlListName); /** - * Resync operation on the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,14 +154,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String accessControlListName, Context context); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -193,13 +167,11 @@ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String accessControlListName); /** - * Validates the configuration of the Access Control Lists. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,14 +180,12 @@ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String accessControlListName, Context context); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param id the resource ID. @@ -227,8 +197,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St AccessControlList getById(String id); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param id the resource ID. @@ -241,8 +209,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St Response getByIdWithResponse(String id, Context context); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param id the resource ID. @@ -253,8 +219,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St void deleteById(String id); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java index d17e8b2c95a2..290abc5c953b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,20 +12,30 @@ */ public final class AclActionType extends ExpandableStringEnum { /** - * Static value Drop for AclActionType. + * AclActionType Drop. */ public static final AclActionType DROP = fromString("Drop"); /** - * Static value Count for AclActionType. + * AclActionType Count. */ public static final AclActionType COUNT = fromString("Count"); /** - * Static value Log for AclActionType. + * AclActionType Log. */ public static final AclActionType LOG = fromString("Log"); + /** + * AclActionType Remark. + */ + public static final AclActionType REMARK = fromString("Remark"); + + /** + * AclActionType PoliceRate. + */ + public static final AclActionType POLICE_RATE = fromString("PoliceRate"); + /** * Creates a new instance of AclActionType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java new file mode 100644 index 000000000000..11cc07a27fda --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Access Control List (ACL) Type. + */ +public final class AclType extends ExpandableStringEnum { + /** + * AclType Control Plane Traffic Policy. + */ + public static final AclType CP = fromString("ControlPlaneTrafficPolicy"); + + /** + * AclType Tenant. + */ + public static final AclType TENANT = fromString("Tenant"); + + /** + * AclType Management. + */ + public static final AclType MANAGEMENT = fromString("Management"); + + /** + * Control Plane Access Control List (ACL). + */ + public static final AclType CONTROL_PLANE_ACL = fromString("ControlPlaneAcl"); + + /** + * Creates a new instance of AclType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AclType() { + } + + /** + * Creates or finds a AclType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AclType. + */ + public static AclType fromString(String name) { + return fromString(name, AclType.class); + } + + /** + * Gets known AclType values. + * + * @return known AclType values. + */ + public static Collection values() { + return values(AclType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java index 914757a13d90..d0b7e9938ad6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Action extends ExpandableStringEnum { /** - * Static value Allow for Action. + * Action Allow. */ public static final Action ALLOW = fromString("Allow"); /** - * Static value Deny for Action. + * Action Deny. */ public static final Action DENY = fromString("Deny"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java new file mode 100644 index 000000000000..058504a52b96 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IP Community Properties. + */ +@Fluent +public final class ActionIpCommunityPatchProperties implements JsonSerializable { + /* + * List of IP Community IDs. + */ + private IpCommunityIdList add; + + /* + * List of IP Community IDs. + */ + private IpCommunityIdList delete; + + /* + * List of IP Community IDs. + */ + private IpCommunityIdList set; + + /** + * Creates an instance of ActionIpCommunityPatchProperties class. + */ + public ActionIpCommunityPatchProperties() { + } + + /** + * Get the add property: List of IP Community IDs. + * + * @return the add value. + */ + public IpCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Community IDs. + * + * @param add the add value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withAdd(IpCommunityIdList add) { + this.add = add; + return this; + } + + /** + * Get the delete property: List of IP Community IDs. + * + * @return the delete value. + */ + public IpCommunityIdList delete() { + return this.delete; + } + + /** + * Set the delete property: List of IP Community IDs. + * + * @param delete the delete value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withDelete(IpCommunityIdList delete) { + this.delete = delete; + return this; + } + + /** + * Get the set property: List of IP Community IDs. + * + * @return the set value. + */ + public IpCommunityIdList set() { + return this.set; + } + + /** + * Set the set property: List of IP Community IDs. + * + * @param set the set value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withSet(IpCommunityIdList set) { + this.set = set; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("add", this.add); + jsonWriter.writeJsonField("delete", this.delete); + jsonWriter.writeJsonField("set", this.set); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionIpCommunityPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionIpCommunityPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionIpCommunityPatchProperties. + */ + public static ActionIpCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionIpCommunityPatchProperties deserializedActionIpCommunityPatchProperties + = new ActionIpCommunityPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("add".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.add = IpCommunityIdList.fromJson(reader); + } else if ("delete".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.delete = IpCommunityIdList.fromJson(reader); + } else if ("set".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.set = IpCommunityIdList.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionIpCommunityPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java index 8fbd22dd2e43..f8eb70bc34d1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,12 @@ * IP Community Properties. */ @Fluent -public final class ActionIpCommunityProperties extends IpCommunityAddOperationProperties { +public final class ActionIpCommunityProperties implements JsonSerializable { + /* + * List of IP Community IDs. + */ + private IpCommunityIdList add; + /* * List of IP Community IDs. */ @@ -31,6 +37,26 @@ public final class ActionIpCommunityProperties extends IpCommunityAddOperationPr public ActionIpCommunityProperties() { } + /** + * Get the add property: List of IP Community IDs. + * + * @return the add value. + */ + public IpCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Community IDs. + * + * @param add the add value to set. + * @return the ActionIpCommunityProperties object itself. + */ + public ActionIpCommunityProperties withAdd(IpCommunityIdList add) { + this.add = add; + return this; + } + /** * Get the delete property: List of IP Community IDs. * @@ -71,40 +97,13 @@ public ActionIpCommunityProperties withSet(IpCommunityIdList set) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ActionIpCommunityProperties withAdd(IpCommunityIdList add) { - super.withAdd(add); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (delete() != null) { - delete().validate(); - } - if (set() != null) { - set().validate(); - } - if (add() != null) { - add().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", add()); + jsonWriter.writeJsonField("add", this.add); jsonWriter.writeJsonField("delete", this.delete); jsonWriter.writeJsonField("set", this.set); return jsonWriter.writeEndObject(); @@ -126,7 +125,7 @@ public static ActionIpCommunityProperties fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("add".equals(fieldName)) { - deserializedActionIpCommunityProperties.withAdd(IpCommunityIdList.fromJson(reader)); + deserializedActionIpCommunityProperties.add = IpCommunityIdList.fromJson(reader); } else if ("delete".equals(fieldName)) { deserializedActionIpCommunityProperties.delete = IpCommunityIdList.fromJson(reader); } else if ("set".equals(fieldName)) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java new file mode 100644 index 000000000000..d8b218a7f13b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IP Extended Community Properties. + */ +@Fluent +public final class ActionIpExtendedCommunityPatchProperties + implements JsonSerializable { + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList add; + + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList delete; + + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList set; + + /** + * Creates an instance of ActionIpExtendedCommunityPatchProperties class. + */ + public ActionIpExtendedCommunityPatchProperties() { + } + + /** + * Get the add property: List of IP Extended Community IDs. + * + * @return the add value. + */ + public IpExtendedCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Extended Community IDs. + * + * @param add the add value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withAdd(IpExtendedCommunityIdList add) { + this.add = add; + return this; + } + + /** + * Get the delete property: List of IP Extended Community IDs. + * + * @return the delete value. + */ + public IpExtendedCommunityIdList delete() { + return this.delete; + } + + /** + * Set the delete property: List of IP Extended Community IDs. + * + * @param delete the delete value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withDelete(IpExtendedCommunityIdList delete) { + this.delete = delete; + return this; + } + + /** + * Get the set property: List of IP Extended Community IDs. + * + * @return the set value. + */ + public IpExtendedCommunityIdList set() { + return this.set; + } + + /** + * Set the set property: List of IP Extended Community IDs. + * + * @param set the set value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withSet(IpExtendedCommunityIdList set) { + this.set = set; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("add", this.add); + jsonWriter.writeJsonField("delete", this.delete); + jsonWriter.writeJsonField("set", this.set); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionIpExtendedCommunityPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionIpExtendedCommunityPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionIpExtendedCommunityPatchProperties. + */ + public static ActionIpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionIpExtendedCommunityPatchProperties deserializedActionIpExtendedCommunityPatchProperties + = new ActionIpExtendedCommunityPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("add".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.add + = IpExtendedCommunityIdList.fromJson(reader); + } else if ("delete".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.delete + = IpExtendedCommunityIdList.fromJson(reader); + } else if ("set".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.set + = IpExtendedCommunityIdList.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionIpExtendedCommunityPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java index b222a7dd0197..37fbaacf48b6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,13 @@ * IP Extended Community Properties. */ @Fluent -public final class ActionIpExtendedCommunityProperties extends IpExtendedCommunityAddOperationProperties { +public final class ActionIpExtendedCommunityProperties + implements JsonSerializable { + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList add; + /* * List of IP Extended Community IDs. */ @@ -31,6 +38,26 @@ public final class ActionIpExtendedCommunityProperties extends IpExtendedCommuni public ActionIpExtendedCommunityProperties() { } + /** + * Get the add property: List of IP Extended Community IDs. + * + * @return the add value. + */ + public IpExtendedCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Extended Community IDs. + * + * @param add the add value to set. + * @return the ActionIpExtendedCommunityProperties object itself. + */ + public ActionIpExtendedCommunityProperties withAdd(IpExtendedCommunityIdList add) { + this.add = add; + return this; + } + /** * Get the delete property: List of IP Extended Community IDs. * @@ -71,40 +98,13 @@ public ActionIpExtendedCommunityProperties withSet(IpExtendedCommunityIdList set return this; } - /** - * {@inheritDoc} - */ - @Override - public ActionIpExtendedCommunityProperties withAdd(IpExtendedCommunityIdList add) { - super.withAdd(add); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (delete() != null) { - delete().validate(); - } - if (set() != null) { - set().validate(); - } - if (add() != null) { - add().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", add()); + jsonWriter.writeJsonField("add", this.add); jsonWriter.writeJsonField("delete", this.delete); jsonWriter.writeJsonField("set", this.set); return jsonWriter.writeEndObject(); @@ -127,7 +127,7 @@ public static ActionIpExtendedCommunityProperties fromJson(JsonReader jsonReader reader.nextToken(); if ("add".equals(fieldName)) { - deserializedActionIpExtendedCommunityProperties.withAdd(IpExtendedCommunityIdList.fromJson(reader)); + deserializedActionIpExtendedCommunityProperties.add = IpExtendedCommunityIdList.fromJson(reader); } else if ("delete".equals(fieldName)) { deserializedActionIpExtendedCommunityProperties.delete = IpExtendedCommunityIdList.fromJson(reader); } else if ("set".equals(fieldName)) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java index d030601d0d28..1e6df33906f3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java index d8989b8dee09..655e4abe5fc2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class AddressFamilyType extends ExpandableStringEnum { /** - * Static value IPv4 for AddressFamilyType. + * AddressType-IPv4. */ public static final AddressFamilyType IPV4 = fromString("IPv4"); /** - * Static value IPv6 for AddressFamilyType. + * AddressType-IPv6. */ public static final AddressFamilyType IPV6 = fromString("IPv6"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java index 39464f4bf748..627427fd3a7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,25 +12,35 @@ */ public final class AdministrativeState extends ExpandableStringEnum { /** - * Static value Enabled for AdministrativeState. + * Enabled Administrative State. */ public static final AdministrativeState ENABLED = fromString("Enabled"); /** - * Static value Disabled for AdministrativeState. + * Disabled Administrative State. */ public static final AdministrativeState DISABLED = fromString("Disabled"); /** - * Static value MAT for AdministrativeState. + * MAT(Manual Action Taken) Administrative State. */ public static final AdministrativeState MAT = fromString("MAT"); /** - * Static value RMA for AdministrativeState. + * RMA(Return Material Authorization) Administrative State. */ public static final AdministrativeState RMA = fromString("RMA"); + /** + * UnderMaintenance Administrative State. + */ + public static final AdministrativeState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + + /** + * EnabledDegraded Administrative State. + */ + public static final AdministrativeState ENABLED_DEGRADED = fromString("EnabledDegraded"); + /** * Creates a new instance of AdministrativeState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java index fc558df4de4a..2b055aaba204 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,20 +47,6 @@ public AggregateRoute withPrefix(String prefix) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model AggregateRoute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AggregateRoute.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java index 9799caa3db62..a12645b0ea37 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,20 +73,6 @@ public AggregateRouteConfiguration withIpv6Routes(List ipv6Route return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java new file mode 100644 index 000000000000..be2b7244b64f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * List of IPv4 and IPv6 aggregate routes. + */ +@Fluent +public final class AggregateRoutePatchConfiguration implements JsonSerializable { + /* + * List of IPv4 Route prefixes. + */ + private List ipv4Routes; + + /* + * List of Ipv6Routes prefixes. + */ + private List ipv6Routes; + + /** + * Creates an instance of AggregateRoutePatchConfiguration class. + */ + public AggregateRoutePatchConfiguration() { + } + + /** + * Get the ipv4Routes property: List of IPv4 Route prefixes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Route prefixes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the AggregateRoutePatchConfiguration object itself. + */ + public AggregateRoutePatchConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of Ipv6Routes prefixes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of Ipv6Routes prefixes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the AggregateRoutePatchConfiguration object itself. + */ + public AggregateRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AggregateRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AggregateRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AggregateRoutePatchConfiguration. + */ + public static AggregateRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AggregateRoutePatchConfiguration deserializedAggregateRoutePatchConfiguration + = new AggregateRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes = reader.readArray(reader1 -> AggregateRoute.fromJson(reader1)); + deserializedAggregateRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes = reader.readArray(reader1 -> AggregateRoute.fromJson(reader1)); + deserializedAggregateRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedAggregateRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java index 2c86538a0868..b73d4127965a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class AllowASOverride extends ExpandableStringEnum { /** - * Static value Enable for AllowASOverride. + * AllowASOverride-Enable. */ public static final AllowASOverride ENABLE = fromString("Enable"); /** - * Static value Disable for AllowASOverride. + * AllowASOverride-Disable. */ public static final AllowASOverride DISABLE = fromString("Disable"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java index 8d1a66bf865d..c50a58aa4798 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Switch configuration entries require a description to discern between configuration groups. + * Switch configuration entries require a description to discern between configuration group. */ @Fluent public class AnnotationResource implements JsonSerializable { @@ -47,14 +47,6 @@ public AnnotationResource withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffOperationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffOperationResponse.java new file mode 100644 index 000000000000..80d172160c10 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffOperationResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of ArmConfigurationDiffOperationResponse. + */ +public interface ArmConfigurationDiffOperationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Arm Configuration Diff Response Properties. + * + * @return the properties value. + */ + ArmConfigurationDiffResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner object. + * + * @return the inner object. + */ + ArmConfigurationDiffOperationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponseProperties.java new file mode 100644 index 000000000000..93f2f08e1e4c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponseProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Arm Configuration Diff Response Properties. + */ +@Immutable +public final class ArmConfigurationDiffResponseProperties + implements JsonSerializable { + /* + * Storage URL to the diff file. + */ + private String configurationDiffUrl; + + /** + * Creates an instance of ArmConfigurationDiffResponseProperties class. + */ + private ArmConfigurationDiffResponseProperties() { + } + + /** + * Get the configurationDiffUrl property: Storage URL to the diff file. + * + * @return the configurationDiffUrl value. + */ + public String configurationDiffUrl() { + return this.configurationDiffUrl; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationDiffUrl", this.configurationDiffUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArmConfigurationDiffResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArmConfigurationDiffResponseProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ArmConfigurationDiffResponseProperties. + */ + public static ArmConfigurationDiffResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArmConfigurationDiffResponseProperties deserializedArmConfigurationDiffResponseProperties + = new ArmConfigurationDiffResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationDiffUrl".equals(fieldName)) { + deserializedArmConfigurationDiffResponseProperties.configurationDiffUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArmConfigurationDiffResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverPatchProperties.java new file mode 100644 index 000000000000..c6139fb74155 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverPatchProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Authorized Transceiver Patch Properties. + */ +@Fluent +public final class AuthorizedTransceiverPatchProperties + implements JsonSerializable { + /* + * Vendor of the transceiver. + */ + private String vendor; + + /* + * Key that must be configured on the fabric. + */ + private String key; + + /** + * Creates an instance of AuthorizedTransceiverPatchProperties class. + */ + public AuthorizedTransceiverPatchProperties() { + } + + /** + * Get the vendor property: Vendor of the transceiver. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Vendor of the transceiver. + * + * @param vendor the vendor value to set. + * @return the AuthorizedTransceiverPatchProperties object itself. + */ + public AuthorizedTransceiverPatchProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the key property: Key that must be configured on the fabric. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Key that must be configured on the fabric. + * + * @param key the key value to set. + * @return the AuthorizedTransceiverPatchProperties object itself. + */ + public AuthorizedTransceiverPatchProperties withKey(String key) { + this.key = key; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vendor", this.vendor); + jsonWriter.writeStringField("key", this.key); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthorizedTransceiverPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizedTransceiverPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthorizedTransceiverPatchProperties. + */ + public static AuthorizedTransceiverPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizedTransceiverPatchProperties deserializedAuthorizedTransceiverPatchProperties + = new AuthorizedTransceiverPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vendor".equals(fieldName)) { + deserializedAuthorizedTransceiverPatchProperties.vendor = reader.getString(); + } else if ("key".equals(fieldName)) { + deserializedAuthorizedTransceiverPatchProperties.key = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizedTransceiverPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverProperties.java new file mode 100644 index 000000000000..2bf9687dee84 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Authorized Transceiver Properties. + */ +@Fluent +public final class AuthorizedTransceiverProperties implements JsonSerializable { + /* + * Vendor of the transceiver. + */ + private String vendor; + + /* + * Key that must be configured on the fabric. + */ + private String key; + + /** + * Creates an instance of AuthorizedTransceiverProperties class. + */ + public AuthorizedTransceiverProperties() { + } + + /** + * Get the vendor property: Vendor of the transceiver. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Vendor of the transceiver. + * + * @param vendor the vendor value to set. + * @return the AuthorizedTransceiverProperties object itself. + */ + public AuthorizedTransceiverProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the key property: Key that must be configured on the fabric. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Key that must be configured on the fabric. + * + * @param key the key value to set. + * @return the AuthorizedTransceiverProperties object itself. + */ + public AuthorizedTransceiverProperties withKey(String key) { + this.key = key; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vendor", this.vendor); + jsonWriter.writeStringField("key", this.key); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthorizedTransceiverProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizedTransceiverProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthorizedTransceiverProperties. + */ + public static AuthorizedTransceiverProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizedTransceiverProperties deserializedAuthorizedTransceiverProperties + = new AuthorizedTransceiverProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vendor".equals(fieldName)) { + deserializedAuthorizedTransceiverProperties.vendor = reader.getString(); + } else if ("key".equals(fieldName)) { + deserializedAuthorizedTransceiverProperties.key = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizedTransceiverProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java index 5416efcd2d61..dcd8430fe018 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class BfdAdministrativeState extends ExpandableStringEnum { /** - * Static value Enabled for BfdAdministrativeState. + * Represents the enabled state of BFD administrative state. */ public static final BfdAdministrativeState ENABLED = fromString("Enabled"); /** - * Static value Disabled for BfdAdministrativeState. + * Represents the disabled state of BFD administrative state. */ public static final BfdAdministrativeState DISABLED = fromString("Disabled"); /** - * Static value MAT for BfdAdministrativeState. + * Represents the MAT(Manual Action Taken) state of BFD administrative state. */ public static final BfdAdministrativeState MAT = fromString("MAT"); /** - * Static value RMA for BfdAdministrativeState. + * Represents the RMA(Return Material Authorization) state of BFD administrative state. */ public static final BfdAdministrativeState RMA = fromString("RMA"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java index 982071f6502b..d1ffc4439048 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -86,14 +86,6 @@ public BfdConfiguration withMultiplier(Integer multiplier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java new file mode 100644 index 000000000000..4cdf748e3083 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BFD configuration properties. + */ +@Fluent +public final class BfdPatchConfiguration implements JsonSerializable { + /* + * Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + */ + private BfdAdministrativeState administrativeState; + + /* + * Interval in milliseconds. Example: 300. + */ + private Integer intervalInMilliSeconds; + + /* + * Multiplier for the Bfd Configuration. Example: 5. + */ + private Integer multiplier; + + /** + * Creates an instance of BfdPatchConfiguration class. + */ + public BfdPatchConfiguration() { + } + + /** + * Get the administrativeState property: Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. + * + * @return the intervalInMilliSeconds value. + */ + public Integer intervalInMilliSeconds() { + return this.intervalInMilliSeconds; + } + + /** + * Set the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. + * + * @param intervalInMilliSeconds the intervalInMilliSeconds value to set. + * @return the BfdPatchConfiguration object itself. + */ + public BfdPatchConfiguration withIntervalInMilliSeconds(Integer intervalInMilliSeconds) { + this.intervalInMilliSeconds = intervalInMilliSeconds; + return this; + } + + /** + * Get the multiplier property: Multiplier for the Bfd Configuration. Example: 5. + * + * @return the multiplier value. + */ + public Integer multiplier() { + return this.multiplier; + } + + /** + * Set the multiplier property: Multiplier for the Bfd Configuration. Example: 5. + * + * @param multiplier the multiplier value to set. + * @return the BfdPatchConfiguration object itself. + */ + public BfdPatchConfiguration withMultiplier(Integer multiplier) { + this.multiplier = multiplier; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("intervalInMilliSeconds", this.intervalInMilliSeconds); + jsonWriter.writeNumberField("multiplier", this.multiplier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BfdPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BfdPatchConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BfdPatchConfiguration. + */ + public static BfdPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BfdPatchConfiguration deserializedBfdPatchConfiguration = new BfdPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administrativeState".equals(fieldName)) { + deserializedBfdPatchConfiguration.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("intervalInMilliSeconds".equals(fieldName)) { + deserializedBfdPatchConfiguration.intervalInMilliSeconds = reader.getNullable(JsonReader::getInt); + } else if ("multiplier".equals(fieldName)) { + deserializedBfdPatchConfiguration.multiplier = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBfdPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java new file mode 100644 index 000000000000..2709f4a004af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Border Gateway Protocol (BGP) Administrative State values. + */ +public final class BgpAdministrativeState extends ExpandableStringEnum { + /** + * BgpAdministrativeState-Enabled. + */ + public static final BgpAdministrativeState ENABLED = fromString("Enabled"); + + /** + * BgpAdministrativeState-Disabled. + */ + public static final BgpAdministrativeState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BgpAdministrativeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BgpAdministrativeState() { + } + + /** + * Creates or finds a BgpAdministrativeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BgpAdministrativeState. + */ + public static BgpAdministrativeState fromString(String name) { + return fromString(name, BgpAdministrativeState.class); + } + + /** + * Gets known BgpAdministrativeState values. + * + * @return known BgpAdministrativeState values. + */ + public static Collection values() { + return values(BgpAdministrativeState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java index faae15d1fc80..b4ece2070941 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,7 +15,7 @@ * BGP configuration properties. */ @Fluent -public class BgpConfiguration extends AnnotationResource { +public final class BgpConfiguration extends AnnotationResource { /* * BFD configuration properties */ @@ -45,7 +45,7 @@ public class BgpConfiguration extends AnnotationResource { /* * Peer ASN. Example: 65047. */ - private Long peerAsn; + private long peerAsn; /* * List of BGP IPv4 Listen Range prefixes. @@ -67,6 +67,21 @@ public class BgpConfiguration extends AnnotationResource { */ private List ipv6NeighborAddress; + /* + * InternalNetwork BMP Configuration + */ + private InternalNetworkBmpProperties bmpConfiguration; + + /* + * V4 over V6 bgp session. + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * v6 over v4 bgp session. + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + /** * Creates an instance of BgpConfiguration class. */ @@ -164,23 +179,12 @@ public Long fabricAsn() { return this.fabricAsn; } - /** - * Set the fabricAsn property: ASN of Network Fabric. Example: 65048. - * - * @param fabricAsn the fabricAsn value to set. - * @return the BgpConfiguration object itself. - */ - BgpConfiguration withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; - } - /** * Get the peerAsn property: Peer ASN. Example: 65047. * * @return the peerAsn value. */ - public Long peerAsn() { + public long peerAsn() { return this.peerAsn; } @@ -190,7 +194,7 @@ public Long peerAsn() { * @param peerAsn the peerAsn value to set. * @return the BgpConfiguration object itself. */ - public BgpConfiguration withPeerAsn(Long peerAsn) { + public BgpConfiguration withPeerAsn(long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -276,30 +280,72 @@ public BgpConfiguration withIpv6NeighborAddress(List ipv6Neighb } /** - * {@inheritDoc} + * Get the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @return the bmpConfiguration value. */ - @Override - public BgpConfiguration withAnnotation(String annotation) { - super.withAnnotation(annotation); + public InternalNetworkBmpProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withBmpConfiguration(InternalNetworkBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @return the v4OverV6BgpSession value. + */ + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; return this; } /** - * Validates the instance. + * Get the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @return the v6OverV4BgpSession value. + */ + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: v6 over v4 bgp session. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4NeighborAddress() != null) { - ipv4NeighborAddress().forEach(e -> e.validate()); - } - if (ipv6NeighborAddress() != null) { - ipv6NeighborAddress().forEach(e -> e.validate()); - } + public BgpConfiguration withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; } /** @@ -309,13 +355,13 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeLongField("peerASN", this.peerAsn); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("defaultRouteOriginate", this.defaultRouteOriginate == null ? null : this.defaultRouteOriginate.toString()); jsonWriter.writeNumberField("allowAS", this.allowAS); jsonWriter.writeStringField("allowASOverride", this.allowASOverride == null ? null : this.allowASOverride.toString()); - jsonWriter.writeNumberField("peerASN", this.peerAsn); jsonWriter.writeArrayField("ipv4ListenRangePrefixes", this.ipv4ListenRangePrefixes, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipv6ListenRangePrefixes", this.ipv6ListenRangePrefixes, @@ -324,6 +370,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("ipv6NeighborAddress", this.ipv6NeighborAddress, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); return jsonWriter.writeEndObject(); } @@ -333,6 +384,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BgpConfiguration if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BgpConfiguration. */ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOException { @@ -344,6 +396,8 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio if ("annotation".equals(fieldName)) { deserializedBgpConfiguration.withAnnotation(reader.getString()); + } else if ("peerASN".equals(fieldName)) { + deserializedBgpConfiguration.peerAsn = reader.getLong(); } else if ("bfdConfiguration".equals(fieldName)) { deserializedBgpConfiguration.bfdConfiguration = BfdConfiguration.fromJson(reader); } else if ("defaultRouteOriginate".equals(fieldName)) { @@ -355,8 +409,6 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio deserializedBgpConfiguration.allowASOverride = AllowASOverride.fromString(reader.getString()); } else if ("fabricASN".equals(fieldName)) { deserializedBgpConfiguration.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedBgpConfiguration.peerAsn = reader.getNullable(JsonReader::getLong); } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); deserializedBgpConfiguration.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; @@ -371,6 +423,14 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio List ipv6NeighborAddress = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); deserializedBgpConfiguration.ipv6NeighborAddress = ipv6NeighborAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedBgpConfiguration.bmpConfiguration = InternalNetworkBmpProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedBgpConfiguration.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedBgpConfiguration.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java new file mode 100644 index 000000000000..ccb67c02e1f7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BGP configuration properties. + */ +@Fluent +public final class BgpPatchConfiguration extends AnnotationResource { + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * Originate a defaultRoute. Ex: "True" | "False". + */ + private BooleanEnumProperty defaultRouteOriginate; + + /* + * Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is + * disable, Possible values are 1-10, default is 2. + */ + private Integer allowAS; + + /* + * Enable Or Disable state. + */ + private AllowASOverride allowASOverride; + + /* + * ASN of Network Fabric. Example: 65048. + */ + private Long fabricAsn; + + /* + * Peer ASN. Example: 65047. + */ + private Long peerAsn; + + /* + * List of BGP IPv4 Listen Range prefixes. + */ + private List ipv4ListenRangePrefixes; + + /* + * List of BGP IPv6 Listen Ranges prefixes. + */ + private List ipv6ListenRangePrefixes; + + /* + * List with stringified IPv4 Neighbor Addresses. + */ + private List ipv4NeighborAddress; + + /* + * List with stringified IPv6 Neighbor Address. + */ + private List ipv6NeighborAddress; + + /* + * InternalNetwork BMP Configuration + */ + private InternalNetworkBmpPatchProperties bmpConfiguration; + + /* + * V4 over V6 bgp session. + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * v6 over v4 bgp session. + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /** + * Creates an instance of BgpPatchConfiguration class. + */ + public BgpPatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the defaultRouteOriginate property: Originate a defaultRoute. Ex: "True" | "False". + * + * @return the defaultRouteOriginate value. + */ + public BooleanEnumProperty defaultRouteOriginate() { + return this.defaultRouteOriginate; + } + + /** + * Set the defaultRouteOriginate property: Originate a defaultRoute. Ex: "True" | "False". + * + * @param defaultRouteOriginate the defaultRouteOriginate value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withDefaultRouteOriginate(BooleanEnumProperty defaultRouteOriginate) { + this.defaultRouteOriginate = defaultRouteOriginate; + return this; + } + + /** + * Get the allowAS property: Allows for routes to be received and processed even if the router detects its own ASN + * in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + * + * @return the allowAS value. + */ + public Integer allowAS() { + return this.allowAS; + } + + /** + * Set the allowAS property: Allows for routes to be received and processed even if the router detects its own ASN + * in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + * + * @param allowAS the allowAS value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withAllowAS(Integer allowAS) { + this.allowAS = allowAS; + return this; + } + + /** + * Get the allowASOverride property: Enable Or Disable state. + * + * @return the allowASOverride value. + */ + public AllowASOverride allowASOverride() { + return this.allowASOverride; + } + + /** + * Set the allowASOverride property: Enable Or Disable state. + * + * @param allowASOverride the allowASOverride value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withAllowASOverride(AllowASOverride allowASOverride) { + this.allowASOverride = allowASOverride; + return this; + } + + /** + * Get the fabricAsn property: ASN of Network Fabric. Example: 65048. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Get the peerAsn property: Peer ASN. Example: 65047. + * + * @return the peerAsn value. + */ + public Long peerAsn() { + return this.peerAsn; + } + + /** + * Set the peerAsn property: Peer ASN. Example: 65047. + * + * @param peerAsn the peerAsn value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withPeerAsn(Long peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. + * + * @return the ipv4ListenRangePrefixes value. + */ + public List ipv4ListenRangePrefixes() { + return this.ipv4ListenRangePrefixes; + } + + /** + * Set the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. + * + * @param ipv4ListenRangePrefixes the ipv4ListenRangePrefixes value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv4ListenRangePrefixes(List ipv4ListenRangePrefixes) { + this.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; + return this; + } + + /** + * Get the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. + * + * @return the ipv6ListenRangePrefixes value. + */ + public List ipv6ListenRangePrefixes() { + return this.ipv6ListenRangePrefixes; + } + + /** + * Set the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. + * + * @param ipv6ListenRangePrefixes the ipv6ListenRangePrefixes value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv6ListenRangePrefixes(List ipv6ListenRangePrefixes) { + this.ipv6ListenRangePrefixes = ipv6ListenRangePrefixes; + return this; + } + + /** + * Get the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. + * + * @return the ipv4NeighborAddress value. + */ + public List ipv4NeighborAddress() { + return this.ipv4NeighborAddress; + } + + /** + * Set the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. + * + * @param ipv4NeighborAddress the ipv4NeighborAddress value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv4NeighborAddress(List ipv4NeighborAddress) { + this.ipv4NeighborAddress = ipv4NeighborAddress; + return this; + } + + /** + * Get the ipv6NeighborAddress property: List with stringified IPv6 Neighbor Address. + * + * @return the ipv6NeighborAddress value. + */ + public List ipv6NeighborAddress() { + return this.ipv6NeighborAddress; + } + + /** + * Set the ipv6NeighborAddress property: List with stringified IPv6 Neighbor Address. + * + * @param ipv6NeighborAddress the ipv6NeighborAddress value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv6NeighborAddress(List ipv6NeighborAddress) { + this.ipv6NeighborAddress = ipv6NeighborAddress; + return this; + } + + /** + * Get the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @return the bmpConfiguration value. + */ + public InternalNetworkBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withBmpConfiguration(InternalNetworkBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @return the v4OverV6BgpSession value. + */ + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; + return this; + } + + /** + * Get the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @return the v6OverV4BgpSession value. + */ + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public BgpPatchConfiguration withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeStringField("defaultRouteOriginate", + this.defaultRouteOriginate == null ? null : this.defaultRouteOriginate.toString()); + jsonWriter.writeNumberField("allowAS", this.allowAS); + jsonWriter.writeStringField("allowASOverride", + this.allowASOverride == null ? null : this.allowASOverride.toString()); + jsonWriter.writeNumberField("peerASN", this.peerAsn); + jsonWriter.writeArrayField("ipv4ListenRangePrefixes", this.ipv4ListenRangePrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv6ListenRangePrefixes", this.ipv6ListenRangePrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv4NeighborAddress", this.ipv4NeighborAddress, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6NeighborAddress", this.ipv6NeighborAddress, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BgpPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BgpPatchConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BgpPatchConfiguration. + */ + public static BgpPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BgpPatchConfiguration deserializedBgpPatchConfiguration = new BgpPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedBgpPatchConfiguration.withAnnotation(reader.getString()); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedBgpPatchConfiguration.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else if ("defaultRouteOriginate".equals(fieldName)) { + deserializedBgpPatchConfiguration.defaultRouteOriginate + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("allowAS".equals(fieldName)) { + deserializedBgpPatchConfiguration.allowAS = reader.getNullable(JsonReader::getInt); + } else if ("allowASOverride".equals(fieldName)) { + deserializedBgpPatchConfiguration.allowASOverride = AllowASOverride.fromString(reader.getString()); + } else if ("fabricASN".equals(fieldName)) { + deserializedBgpPatchConfiguration.fabricAsn = reader.getNullable(JsonReader::getLong); + } else if ("peerASN".equals(fieldName)) { + deserializedBgpPatchConfiguration.peerAsn = reader.getNullable(JsonReader::getLong); + } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { + List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedBgpPatchConfiguration.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; + } else if ("ipv6ListenRangePrefixes".equals(fieldName)) { + List ipv6ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedBgpPatchConfiguration.ipv6ListenRangePrefixes = ipv6ListenRangePrefixes; + } else if ("ipv4NeighborAddress".equals(fieldName)) { + List ipv4NeighborAddress + = reader.readArray(reader1 -> NeighborAddressPatch.fromJson(reader1)); + deserializedBgpPatchConfiguration.ipv4NeighborAddress = ipv4NeighborAddress; + } else if ("ipv6NeighborAddress".equals(fieldName)) { + List ipv6NeighborAddress + = reader.readArray(reader1 -> NeighborAddressPatch.fromJson(reader1)); + deserializedBgpPatchConfiguration.ipv6NeighborAddress = ipv6NeighborAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedBgpPatchConfiguration.bmpConfiguration + = InternalNetworkBmpPatchProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedBgpPatchConfiguration.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedBgpPatchConfiguration.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBgpPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java new file mode 100644 index 000000000000..6dca9cbff157 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Bit rate in bits per second. + */ +@Fluent +public final class BitRate implements JsonSerializable { + /* + * Bitrate. + */ + private Long rate; + + /* + * Bitrate unit. + */ + private BitRateUnit unit; + + /** + * Creates an instance of BitRate class. + */ + public BitRate() { + } + + /** + * Get the rate property: Bitrate. + * + * @return the rate value. + */ + public Long rate() { + return this.rate; + } + + /** + * Set the rate property: Bitrate. + * + * @param rate the rate value to set. + * @return the BitRate object itself. + */ + public BitRate withRate(Long rate) { + this.rate = rate; + return this; + } + + /** + * Get the unit property: Bitrate unit. + * + * @return the unit value. + */ + public BitRateUnit unit() { + return this.unit; + } + + /** + * Set the unit property: Bitrate unit. + * + * @param unit the unit value to set. + * @return the BitRate object itself. + */ + public BitRate withUnit(BitRateUnit unit) { + this.unit = unit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("rate", this.rate); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BitRate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BitRate if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the BitRate. + */ + public static BitRate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BitRate deserializedBitRate = new BitRate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rate".equals(fieldName)) { + deserializedBitRate.rate = reader.getNullable(JsonReader::getLong); + } else if ("unit".equals(fieldName)) { + deserializedBitRate.unit = BitRateUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBitRate; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java new file mode 100644 index 000000000000..47b17e503194 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Bit rate unit. + */ +public final class BitRateUnit extends ExpandableStringEnum { + /** + * Bit rate unit in bits per second. + */ + public static final BitRateUnit BPS = fromString("bps"); + + /** + * Bit rate unit in kilobits per second. + */ + public static final BitRateUnit KBPS = fromString("Kbps"); + + /** + * Bit rate unit in megabits per second. + */ + public static final BitRateUnit MBPS = fromString("Mbps"); + + /** + * Bit rate unit in gigabits per second. + */ + public static final BitRateUnit GBPS = fromString("Gbps"); + + /** + * Bit rate unit in packets per second. + */ + public static final BitRateUnit PPS = fromString("Pps"); + + /** + * Creates a new instance of BitRateUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BitRateUnit() { + } + + /** + * Creates or finds a BitRateUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding BitRateUnit. + */ + public static BitRateUnit fromString(String name) { + return fromString(name, BitRateUnit.class); + } + + /** + * Gets known BitRateUnit values. + * + * @return known BitRateUnit values. + */ + public static Collection values() { + return values(BitRateUnit.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java new file mode 100644 index 000000000000..fae0d59df482 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BMP Configuration patch properties. + */ +@Fluent +public final class BmpConfigurationPatchProperties implements JsonSerializable { + /* + * Enabling a station. Either True/False. + */ + private StationConfigurationState stationConfigurationState; + + /* + * Scope resource ARM Identifier. + */ + private String scopeResourceId; + + /* + * Name of the station. + */ + private String stationName; + + /* + * IP Address of the station. + */ + private String stationIp; + + /* + * Port of the station. Default value is 5000. + */ + private Integer stationPort; + + /* + * Station Connection Mode. + */ + private StationConnectionMode stationConnectionMode; + + /* + * Station Connection Properties. + */ + private StationConnectionPatchProperties stationConnectionProperties; + + /* + * Network of the station + */ + private String stationNetwork; + + /* + * The List of Network ID's that need to be monitored. + */ + private List monitoredNetworks; + + /* + * Export Policy for the BMP Configuration. + */ + private BmpExportPolicy exportPolicy; + + /* + * Export Policy configuration properties for the BMP. + */ + private BmpExportPolicyPatchProperties exportPolicyConfiguration; + + /* + * Monitored Address Families for the BMP Configuration. + */ + private List monitoredAddressFamilies; + + /** + * Creates an instance of BmpConfigurationPatchProperties class. + */ + public BmpConfigurationPatchProperties() { + } + + /** + * Get the stationConfigurationState property: Enabling a station. Either True/False. + * + * @return the stationConfigurationState value. + */ + public StationConfigurationState stationConfigurationState() { + return this.stationConfigurationState; + } + + /** + * Set the stationConfigurationState property: Enabling a station. Either True/False. + * + * @param stationConfigurationState the stationConfigurationState value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withStationConfigurationState(StationConfigurationState stationConfigurationState) { + this.stationConfigurationState = stationConfigurationState; + return this; + } + + /** + * Get the scopeResourceId property: Scope resource ARM Identifier. + * + * @return the scopeResourceId value. + */ + public String scopeResourceId() { + return this.scopeResourceId; + } + + /** + * Set the scopeResourceId property: Scope resource ARM Identifier. + * + * @param scopeResourceId the scopeResourceId value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withScopeResourceId(String scopeResourceId) { + this.scopeResourceId = scopeResourceId; + return this; + } + + /** + * Get the stationName property: Name of the station. + * + * @return the stationName value. + */ + public String stationName() { + return this.stationName; + } + + /** + * Set the stationName property: Name of the station. + * + * @param stationName the stationName value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationName(String stationName) { + this.stationName = stationName; + return this; + } + + /** + * Get the stationIp property: IP Address of the station. + * + * @return the stationIp value. + */ + public String stationIp() { + return this.stationIp; + } + + /** + * Set the stationIp property: IP Address of the station. + * + * @param stationIp the stationIp value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationIp(String stationIp) { + this.stationIp = stationIp; + return this; + } + + /** + * Get the stationPort property: Port of the station. Default value is 5000. + * + * @return the stationPort value. + */ + public Integer stationPort() { + return this.stationPort; + } + + /** + * Set the stationPort property: Port of the station. Default value is 5000. + * + * @param stationPort the stationPort value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationPort(Integer stationPort) { + this.stationPort = stationPort; + return this; + } + + /** + * Get the stationConnectionMode property: Station Connection Mode. + * + * @return the stationConnectionMode value. + */ + public StationConnectionMode stationConnectionMode() { + return this.stationConnectionMode; + } + + /** + * Set the stationConnectionMode property: Station Connection Mode. + * + * @param stationConnectionMode the stationConnectionMode value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationConnectionMode(StationConnectionMode stationConnectionMode) { + this.stationConnectionMode = stationConnectionMode; + return this; + } + + /** + * Get the stationConnectionProperties property: Station Connection Properties. + * + * @return the stationConnectionProperties value. + */ + public StationConnectionPatchProperties stationConnectionProperties() { + return this.stationConnectionProperties; + } + + /** + * Set the stationConnectionProperties property: Station Connection Properties. + * + * @param stationConnectionProperties the stationConnectionProperties value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withStationConnectionProperties(StationConnectionPatchProperties stationConnectionProperties) { + this.stationConnectionProperties = stationConnectionProperties; + return this; + } + + /** + * Get the stationNetwork property: Network of the station. + * + * @return the stationNetwork value. + */ + public String stationNetwork() { + return this.stationNetwork; + } + + /** + * Set the stationNetwork property: Network of the station. + * + * @param stationNetwork the stationNetwork value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationNetwork(String stationNetwork) { + this.stationNetwork = stationNetwork; + return this; + } + + /** + * Get the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @return the monitoredNetworks value. + */ + public List monitoredNetworks() { + return this.monitoredNetworks; + } + + /** + * Set the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @param monitoredNetworks the monitoredNetworks value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withMonitoredNetworks(List monitoredNetworks) { + this.monitoredNetworks = monitoredNetworks; + return this; + } + + /** + * Get the exportPolicy property: Export Policy for the BMP Configuration. + * + * @return the exportPolicy value. + */ + public BmpExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Export Policy for the BMP Configuration. + * + * @param exportPolicy the exportPolicy value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withExportPolicy(BmpExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the exportPolicyConfiguration property: Export Policy configuration properties for the BMP. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyPatchProperties exportPolicyConfiguration() { + return this.exportPolicyConfiguration; + } + + /** + * Set the exportPolicyConfiguration property: Export Policy configuration properties for the BMP. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withExportPolicyConfiguration(BmpExportPolicyPatchProperties exportPolicyConfiguration) { + this.exportPolicyConfiguration = exportPolicyConfiguration; + return this; + } + + /** + * Get the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @return the monitoredAddressFamilies value. + */ + public List monitoredAddressFamilies() { + return this.monitoredAddressFamilies; + } + + /** + * Set the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @param monitoredAddressFamilies the monitoredAddressFamilies value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withMonitoredAddressFamilies(List monitoredAddressFamilies) { + this.monitoredAddressFamilies = monitoredAddressFamilies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("stationConfigurationState", + this.stationConfigurationState == null ? null : this.stationConfigurationState.toString()); + jsonWriter.writeStringField("scopeResourceId", this.scopeResourceId); + jsonWriter.writeStringField("stationName", this.stationName); + jsonWriter.writeStringField("stationIp", this.stationIp); + jsonWriter.writeNumberField("stationPort", this.stationPort); + jsonWriter.writeStringField("stationConnectionMode", + this.stationConnectionMode == null ? null : this.stationConnectionMode.toString()); + jsonWriter.writeJsonField("stationConnectionProperties", this.stationConnectionProperties); + jsonWriter.writeStringField("stationNetwork", this.stationNetwork); + jsonWriter.writeArrayField("monitoredNetworks", this.monitoredNetworks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("exportPolicy", this.exportPolicy == null ? null : this.exportPolicy.toString()); + jsonWriter.writeJsonField("exportPolicyConfiguration", this.exportPolicyConfiguration); + jsonWriter.writeArrayField("monitoredAddressFamilies", this.monitoredAddressFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpConfigurationPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpConfigurationPatchProperties. + */ + public static BmpConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpConfigurationPatchProperties deserializedBmpConfigurationPatchProperties + = new BmpConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("stationConfigurationState".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConfigurationState + = StationConfigurationState.fromString(reader.getString()); + } else if ("scopeResourceId".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.scopeResourceId = reader.getString(); + } else if ("stationName".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationName = reader.getString(); + } else if ("stationIp".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationIp = reader.getString(); + } else if ("stationPort".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationPort = reader.getNullable(JsonReader::getInt); + } else if ("stationConnectionMode".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConnectionMode + = StationConnectionMode.fromString(reader.getString()); + } else if ("stationConnectionProperties".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConnectionProperties + = StationConnectionPatchProperties.fromJson(reader); + } else if ("stationNetwork".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationNetwork = reader.getString(); + } else if ("monitoredNetworks".equals(fieldName)) { + List monitoredNetworks = reader.readArray(reader1 -> reader1.getString()); + deserializedBmpConfigurationPatchProperties.monitoredNetworks = monitoredNetworks; + } else if ("exportPolicy".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.exportPolicy + = BmpExportPolicy.fromString(reader.getString()); + } else if ("exportPolicyConfiguration".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.exportPolicyConfiguration + = BmpExportPolicyPatchProperties.fromJson(reader); + } else if ("monitoredAddressFamilies".equals(fieldName)) { + List monitoredAddressFamilies + = reader.readArray(reader1 -> BmpMonitoredAddressFamily.fromString(reader1.getString())); + deserializedBmpConfigurationPatchProperties.monitoredAddressFamilies = monitoredAddressFamilies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java new file mode 100644 index 000000000000..ecb86bbf6e6c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BGP Monitoring Protocol (BMP) Configuration properties. + */ +@Fluent +public final class BmpConfigurationProperties implements JsonSerializable { + /* + * Enabling a station. Either True/False. + */ + private StationConfigurationState stationConfigurationState; + + /* + * Scope resource ARM Identifier. + */ + private String scopeResourceId; + + /* + * Name of the station. + */ + private String stationName; + + /* + * IP Address of the station. + */ + private String stationIp; + + /* + * Port of the station. Default value is 5000. + */ + private Integer stationPort; + + /* + * Station Connection Mode. + */ + private StationConnectionMode stationConnectionMode; + + /* + * Station Connection Properties. + */ + private StationConnectionProperties stationConnectionProperties; + + /* + * Network of the station + */ + private String stationNetwork; + + /* + * The List of Network ID's that need to be monitored. + */ + private List monitoredNetworks; + + /* + * Export Policy for the BMP Configuration. + */ + private BmpExportPolicy exportPolicy; + + /* + * Export Policy configuration properties for the BMP. + */ + private BmpExportPolicyProperties exportPolicyConfiguration; + + /* + * Monitored Address Families for the BMP Configuration. + */ + private List monitoredAddressFamilies; + + /** + * Creates an instance of BmpConfigurationProperties class. + */ + public BmpConfigurationProperties() { + } + + /** + * Get the stationConfigurationState property: Enabling a station. Either True/False. + * + * @return the stationConfigurationState value. + */ + public StationConfigurationState stationConfigurationState() { + return this.stationConfigurationState; + } + + /** + * Set the stationConfigurationState property: Enabling a station. Either True/False. + * + * @param stationConfigurationState the stationConfigurationState value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withStationConfigurationState(StationConfigurationState stationConfigurationState) { + this.stationConfigurationState = stationConfigurationState; + return this; + } + + /** + * Get the scopeResourceId property: Scope resource ARM Identifier. + * + * @return the scopeResourceId value. + */ + public String scopeResourceId() { + return this.scopeResourceId; + } + + /** + * Set the scopeResourceId property: Scope resource ARM Identifier. + * + * @param scopeResourceId the scopeResourceId value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withScopeResourceId(String scopeResourceId) { + this.scopeResourceId = scopeResourceId; + return this; + } + + /** + * Get the stationName property: Name of the station. + * + * @return the stationName value. + */ + public String stationName() { + return this.stationName; + } + + /** + * Set the stationName property: Name of the station. + * + * @param stationName the stationName value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationName(String stationName) { + this.stationName = stationName; + return this; + } + + /** + * Get the stationIp property: IP Address of the station. + * + * @return the stationIp value. + */ + public String stationIp() { + return this.stationIp; + } + + /** + * Set the stationIp property: IP Address of the station. + * + * @param stationIp the stationIp value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationIp(String stationIp) { + this.stationIp = stationIp; + return this; + } + + /** + * Get the stationPort property: Port of the station. Default value is 5000. + * + * @return the stationPort value. + */ + public Integer stationPort() { + return this.stationPort; + } + + /** + * Set the stationPort property: Port of the station. Default value is 5000. + * + * @param stationPort the stationPort value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationPort(Integer stationPort) { + this.stationPort = stationPort; + return this; + } + + /** + * Get the stationConnectionMode property: Station Connection Mode. + * + * @return the stationConnectionMode value. + */ + public StationConnectionMode stationConnectionMode() { + return this.stationConnectionMode; + } + + /** + * Set the stationConnectionMode property: Station Connection Mode. + * + * @param stationConnectionMode the stationConnectionMode value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationConnectionMode(StationConnectionMode stationConnectionMode) { + this.stationConnectionMode = stationConnectionMode; + return this; + } + + /** + * Get the stationConnectionProperties property: Station Connection Properties. + * + * @return the stationConnectionProperties value. + */ + public StationConnectionProperties stationConnectionProperties() { + return this.stationConnectionProperties; + } + + /** + * Set the stationConnectionProperties property: Station Connection Properties. + * + * @param stationConnectionProperties the stationConnectionProperties value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withStationConnectionProperties(StationConnectionProperties stationConnectionProperties) { + this.stationConnectionProperties = stationConnectionProperties; + return this; + } + + /** + * Get the stationNetwork property: Network of the station. + * + * @return the stationNetwork value. + */ + public String stationNetwork() { + return this.stationNetwork; + } + + /** + * Set the stationNetwork property: Network of the station. + * + * @param stationNetwork the stationNetwork value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationNetwork(String stationNetwork) { + this.stationNetwork = stationNetwork; + return this; + } + + /** + * Get the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @return the monitoredNetworks value. + */ + public List monitoredNetworks() { + return this.monitoredNetworks; + } + + /** + * Set the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @param monitoredNetworks the monitoredNetworks value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withMonitoredNetworks(List monitoredNetworks) { + this.monitoredNetworks = monitoredNetworks; + return this; + } + + /** + * Get the exportPolicy property: Export Policy for the BMP Configuration. + * + * @return the exportPolicy value. + */ + public BmpExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Export Policy for the BMP Configuration. + * + * @param exportPolicy the exportPolicy value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withExportPolicy(BmpExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the exportPolicyConfiguration property: Export Policy configuration properties for the BMP. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyProperties exportPolicyConfiguration() { + return this.exportPolicyConfiguration; + } + + /** + * Set the exportPolicyConfiguration property: Export Policy configuration properties for the BMP. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration) { + this.exportPolicyConfiguration = exportPolicyConfiguration; + return this; + } + + /** + * Get the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @return the monitoredAddressFamilies value. + */ + public List monitoredAddressFamilies() { + return this.monitoredAddressFamilies; + } + + /** + * Set the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @param monitoredAddressFamilies the monitoredAddressFamilies value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withMonitoredAddressFamilies(List monitoredAddressFamilies) { + this.monitoredAddressFamilies = monitoredAddressFamilies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("stationConfigurationState", + this.stationConfigurationState == null ? null : this.stationConfigurationState.toString()); + jsonWriter.writeStringField("scopeResourceId", this.scopeResourceId); + jsonWriter.writeStringField("stationName", this.stationName); + jsonWriter.writeStringField("stationIp", this.stationIp); + jsonWriter.writeNumberField("stationPort", this.stationPort); + jsonWriter.writeStringField("stationConnectionMode", + this.stationConnectionMode == null ? null : this.stationConnectionMode.toString()); + jsonWriter.writeJsonField("stationConnectionProperties", this.stationConnectionProperties); + jsonWriter.writeStringField("stationNetwork", this.stationNetwork); + jsonWriter.writeArrayField("monitoredNetworks", this.monitoredNetworks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("exportPolicy", this.exportPolicy == null ? null : this.exportPolicy.toString()); + jsonWriter.writeJsonField("exportPolicyConfiguration", this.exportPolicyConfiguration); + jsonWriter.writeArrayField("monitoredAddressFamilies", this.monitoredAddressFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpConfigurationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpConfigurationProperties. + */ + public static BmpConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpConfigurationProperties deserializedBmpConfigurationProperties = new BmpConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("stationConfigurationState".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConfigurationState + = StationConfigurationState.fromString(reader.getString()); + } else if ("scopeResourceId".equals(fieldName)) { + deserializedBmpConfigurationProperties.scopeResourceId = reader.getString(); + } else if ("stationName".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationName = reader.getString(); + } else if ("stationIp".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationIp = reader.getString(); + } else if ("stationPort".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationPort = reader.getNullable(JsonReader::getInt); + } else if ("stationConnectionMode".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConnectionMode + = StationConnectionMode.fromString(reader.getString()); + } else if ("stationConnectionProperties".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConnectionProperties + = StationConnectionProperties.fromJson(reader); + } else if ("stationNetwork".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationNetwork = reader.getString(); + } else if ("monitoredNetworks".equals(fieldName)) { + List monitoredNetworks = reader.readArray(reader1 -> reader1.getString()); + deserializedBmpConfigurationProperties.monitoredNetworks = monitoredNetworks; + } else if ("exportPolicy".equals(fieldName)) { + deserializedBmpConfigurationProperties.exportPolicy + = BmpExportPolicy.fromString(reader.getString()); + } else if ("exportPolicyConfiguration".equals(fieldName)) { + deserializedBmpConfigurationProperties.exportPolicyConfiguration + = BmpExportPolicyProperties.fromJson(reader); + } else if ("monitoredAddressFamilies".equals(fieldName)) { + List monitoredAddressFamilies + = reader.readArray(reader1 -> BmpMonitoredAddressFamily.fromString(reader1.getString())); + deserializedBmpConfigurationProperties.monitoredAddressFamilies = monitoredAddressFamilies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java new file mode 100644 index 000000000000..97f7e00c7f93 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * BGP Monitoring Protocol (BMP) configuration state. + */ +public final class BmpConfigurationState extends ExpandableStringEnum { + /** + * BGP Monitoring Protocol (BMP) ConfigurationState - Enabled. + */ + public static final BmpConfigurationState ENABLED = fromString("Enabled"); + + /** + * BGP Monitoring Protocol (BMP) ConfigurationState - Disabled. + */ + public static final BmpConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BmpConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpConfigurationState() { + } + + /** + * Creates or finds a BmpConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpConfigurationState. + */ + public static BmpConfigurationState fromString(String name) { + return fromString(name, BmpConfigurationState.class); + } + + /** + * Gets known BmpConfigurationState values. + * + * @return known BmpConfigurationState values. + */ + public static Collection values() { + return values(BmpConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java new file mode 100644 index 000000000000..a6d5b2ef4960 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + */ +public final class BmpExportPolicy extends ExpandableStringEnum { + /** + * BMP ExportPolicy Pre-Policy. + */ + public static final BmpExportPolicy PRE_POLICY = fromString("Pre-Policy"); + + /** + * BMP ExportPolicy Post-Policy. + */ + public static final BmpExportPolicy POST_POLICY = fromString("Post-Policy"); + + /** + * BMP ExportPolicy All. + */ + public static final BmpExportPolicy ALL = fromString("All"); + + /** + * BMP ExportPolicy LocalRib. + */ + public static final BmpExportPolicy LOCAL_RIB = fromString("LocalRib"); + + /** + * Creates a new instance of BmpExportPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpExportPolicy() { + } + + /** + * Creates or finds a BmpExportPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpExportPolicy. + */ + public static BmpExportPolicy fromString(String name) { + return fromString(name, BmpExportPolicy.class); + } + + /** + * Gets known BmpExportPolicy values. + * + * @return known BmpExportPolicy values. + */ + public static Collection values() { + return values(BmpExportPolicy.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyPatchProperties.java new file mode 100644 index 000000000000..8ef9e9d875e6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyPatchProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BMP Export Policy Configuration properties. + */ +@Fluent +public final class BmpExportPolicyPatchProperties implements JsonSerializable { + /* + * Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + */ + private List exportPolicies; + + /** + * Creates an instance of BmpExportPolicyPatchProperties class. + */ + public BmpExportPolicyPatchProperties() { + } + + /** + * Get the exportPolicies property: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + * + * @return the exportPolicies value. + */ + public List exportPolicies() { + return this.exportPolicies; + } + + /** + * Set the exportPolicies property: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + * + * @param exportPolicies the exportPolicies value to set. + * @return the BmpExportPolicyPatchProperties object itself. + */ + public BmpExportPolicyPatchProperties withExportPolicies(List exportPolicies) { + this.exportPolicies = exportPolicies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("exportPolicies", this.exportPolicies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpExportPolicyPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpExportPolicyPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpExportPolicyPatchProperties. + */ + public static BmpExportPolicyPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpExportPolicyPatchProperties deserializedBmpExportPolicyPatchProperties + = new BmpExportPolicyPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportPolicies".equals(fieldName)) { + List exportPolicies + = reader.readArray(reader1 -> BmpExportPolicy.fromString(reader1.getString())); + deserializedBmpExportPolicyPatchProperties.exportPolicies = exportPolicies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpExportPolicyPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyProperties.java new file mode 100644 index 000000000000..1f1e318f2648 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BMP Export Policy Configuration properties. + */ +@Fluent +public final class BmpExportPolicyProperties implements JsonSerializable { + /* + * Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + */ + private List exportPolicies; + + /** + * Creates an instance of BmpExportPolicyProperties class. + */ + public BmpExportPolicyProperties() { + } + + /** + * Get the exportPolicies property: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + * + * @return the exportPolicies value. + */ + public List exportPolicies() { + return this.exportPolicies; + } + + /** + * Set the exportPolicies property: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + * + * @param exportPolicies the exportPolicies value to set. + * @return the BmpExportPolicyProperties object itself. + */ + public BmpExportPolicyProperties withExportPolicies(List exportPolicies) { + this.exportPolicies = exportPolicies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("exportPolicies", this.exportPolicies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpExportPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpExportPolicyProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpExportPolicyProperties. + */ + public static BmpExportPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpExportPolicyProperties deserializedBmpExportPolicyProperties = new BmpExportPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportPolicies".equals(fieldName)) { + List exportPolicies + = reader.readArray(reader1 -> BmpExportPolicy.fromString(reader1.getString())); + deserializedBmpExportPolicyProperties.exportPolicies = exportPolicies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpExportPolicyProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java new file mode 100644 index 000000000000..baef9cc6453b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Monitored Address Family. + */ +public final class BmpMonitoredAddressFamily extends ExpandableStringEnum { + /** + * IPv4 Unicast. + */ + public static final BmpMonitoredAddressFamily IPV4UNICAST = fromString("ipv4Unicast"); + + /** + * IPv6 Unicast. + */ + public static final BmpMonitoredAddressFamily IPV6UNICAST = fromString("ipv6Unicast"); + + /** + * VPN IPv4. + */ + public static final BmpMonitoredAddressFamily VPN_IPV4 = fromString("vpnIpv4"); + + /** + * VPN IPv6. + */ + public static final BmpMonitoredAddressFamily VPN_IPV6 = fromString("vpnIpv6"); + + /** + * All Address Families. + */ + public static final BmpMonitoredAddressFamily ALL = fromString("All"); + + /** + * Creates a new instance of BmpMonitoredAddressFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpMonitoredAddressFamily() { + } + + /** + * Creates or finds a BmpMonitoredAddressFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpMonitoredAddressFamily. + */ + public static BmpMonitoredAddressFamily fromString(String name) { + return fromString(name, BmpMonitoredAddressFamily.class); + } + + /** + * Gets known BmpMonitoredAddressFamily values. + * + * @return known BmpMonitoredAddressFamily values. + */ + public static Collection values() { + return values(BmpMonitoredAddressFamily.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java index 0b527fc9403e..7fd73236e0c0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * Boolean Enum. Example- True/False. + * Boolean union. Example- True/False. */ public final class BooleanEnumProperty extends ExpandableStringEnum { /** - * Static value True for BooleanEnumProperty. + * EnumProperty-True. */ public static final BooleanEnumProperty TRUE = fromString("True"); /** - * Static value False for BooleanEnumProperty. + * EnumProperty-False. */ public static final BooleanEnumProperty FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java new file mode 100644 index 000000000000..eb5d05a3b092 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Burst size in packets. + */ +@Fluent +public final class BurstSize implements JsonSerializable { + /* + * Burst size. + */ + private Long size; + + /* + * Burst size unit. + */ + private BurstSizeUnit unit; + + /** + * Creates an instance of BurstSize class. + */ + public BurstSize() { + } + + /** + * Get the size property: Burst size. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Burst size. + * + * @param size the size value to set. + * @return the BurstSize object itself. + */ + public BurstSize withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the unit property: Burst size unit. + * + * @return the unit value. + */ + public BurstSizeUnit unit() { + return this.unit; + } + + /** + * Set the unit property: Burst size unit. + * + * @param unit the unit value to set. + * @return the BurstSize object itself. + */ + public BurstSize withUnit(BurstSizeUnit unit) { + this.unit = unit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BurstSize from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BurstSize if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the BurstSize. + */ + public static BurstSize fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BurstSize deserializedBurstSize = new BurstSize(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedBurstSize.size = reader.getNullable(JsonReader::getLong); + } else if ("unit".equals(fieldName)) { + deserializedBurstSize.unit = BurstSizeUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBurstSize; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java new file mode 100644 index 000000000000..f732004b649a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Burst size unit in packets. + */ +public final class BurstSizeUnit extends ExpandableStringEnum { + /** + * Burst size unit in bytes. + */ + public static final BurstSizeUnit BYTES = fromString("Bytes"); + + /** + * Burst size unit in kilobytes. + */ + public static final BurstSizeUnit KBYTES = fromString("KBytes"); + + /** + * Burst size unit in megabytes. + */ + public static final BurstSizeUnit MBYTES = fromString("MBytes"); + + /** + * Burst size unit in gigabytes. + */ + public static final BurstSizeUnit GBYTES = fromString("GBytes"); + + /** + * Burst size unit in packets. + */ + public static final BurstSizeUnit PACKETS = fromString("Packets"); + + /** + * Creates a new instance of BurstSizeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BurstSizeUnit() { + } + + /** + * Creates or finds a BurstSizeUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding BurstSizeUnit. + */ + public static BurstSizeUnit fromString(String name) { + return fromString(name, BurstSizeUnit.class); + } + + /** + * Gets known BurstSizeUnit values. + * + * @return known BurstSizeUnit values. + */ + public static Collection values() { + return values(BurstSizeUnit.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateArchiveReference.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateArchiveReference.java new file mode 100644 index 000000000000..400d4d067e69 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateArchiveReference.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A reference to a version of a certificate in a key vault. + */ +@Immutable +public final class CertificateArchiveReference implements JsonSerializable { + /* + * A Uniform Resource Identifier (URI) for the certificate in the key vault. + */ + private String keyVaultUri; + + /* + * The resource ID of the key vault containing the certificate. + */ + private String keyVaultId; + + /* + * The name of the certificate in the key vault. + */ + private String certificateName; + + /* + * The version of the certificate in the key vault. + */ + private String certificateVersion; + + /** + * Creates an instance of CertificateArchiveReference class. + */ + private CertificateArchiveReference() { + } + + /** + * Get the keyVaultUri property: A Uniform Resource Identifier (URI) for the certificate in the key vault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Get the keyVaultId property: The resource ID of the key vault containing the certificate. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Get the certificateName property: The name of the certificate in the key vault. + * + * @return the certificateName value. + */ + public String certificateName() { + return this.certificateName; + } + + /** + * Get the certificateVersion property: The version of the certificate in the key vault. + * + * @return the certificateVersion value. + */ + public String certificateVersion() { + return this.certificateVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CertificateArchiveReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CertificateArchiveReference if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CertificateArchiveReference. + */ + public static CertificateArchiveReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CertificateArchiveReference deserializedCertificateArchiveReference = new CertificateArchiveReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedCertificateArchiveReference.keyVaultUri = reader.getString(); + } else if ("keyVaultId".equals(fieldName)) { + deserializedCertificateArchiveReference.keyVaultId = reader.getString(); + } else if ("certificateName".equals(fieldName)) { + deserializedCertificateArchiveReference.certificateName = reader.getString(); + } else if ("certificateVersion".equals(fieldName)) { + deserializedCertificateArchiveReference.certificateVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCertificateArchiveReference; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateRotationStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateRotationStatus.java new file mode 100644 index 000000000000..669239b4b9c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateRotationStatus.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Status of a certificate rotation for a device (Network Device or Terminal Server). + */ +@Immutable +public final class CertificateRotationStatus implements JsonSerializable { + /* + * Time at which the certificate will expire, for certificates with a limited validity period. + */ + private OffsetDateTime expireTime; + + /* + * The date and time when the certificate was last changed. + */ + private OffsetDateTime lastRotationTime; + + /* + * Whether the device has been configured with the latest version of the certificate. + */ + private SynchronizationStatus synchronizationStatus; + + /* + * Reference to the currently configured version of the certificate in a key vault. + */ + private CertificateArchiveReference certificateArchiveReference; + + /* + * Identifies the certificate according to its purpose. + */ + private String certificateType; + + /** + * Creates an instance of CertificateRotationStatus class. + */ + private CertificateRotationStatus() { + } + + /** + * Get the expireTime property: Time at which the certificate will expire, for certificates with a limited validity + * period. + * + * @return the expireTime value. + */ + public OffsetDateTime expireTime() { + return this.expireTime; + } + + /** + * Get the lastRotationTime property: The date and time when the certificate was last changed. + * + * @return the lastRotationTime value. + */ + public OffsetDateTime lastRotationTime() { + return this.lastRotationTime; + } + + /** + * Get the synchronizationStatus property: Whether the device has been configured with the latest version of the + * certificate. + * + * @return the synchronizationStatus value. + */ + public SynchronizationStatus synchronizationStatus() { + return this.synchronizationStatus; + } + + /** + * Get the certificateArchiveReference property: Reference to the currently configured version of the certificate in + * a key vault. + * + * @return the certificateArchiveReference value. + */ + public CertificateArchiveReference certificateArchiveReference() { + return this.certificateArchiveReference; + } + + /** + * Get the certificateType property: Identifies the certificate according to its purpose. + * + * @return the certificateType value. + */ + public String certificateType() { + return this.certificateType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CertificateRotationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CertificateRotationStatus if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CertificateRotationStatus. + */ + public static CertificateRotationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CertificateRotationStatus deserializedCertificateRotationStatus = new CertificateRotationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expireTime".equals(fieldName)) { + deserializedCertificateRotationStatus.expireTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastRotationTime".equals(fieldName)) { + deserializedCertificateRotationStatus.lastRotationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("synchronizationStatus".equals(fieldName)) { + deserializedCertificateRotationStatus.synchronizationStatus + = SynchronizationStatus.fromString(reader.getString()); + } else if ("certificateArchiveReference".equals(fieldName)) { + deserializedCertificateRotationStatus.certificateArchiveReference + = CertificateArchiveReference.fromJson(reader); + } else if ("certificateType".equals(fieldName)) { + deserializedCertificateRotationStatus.certificateType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCertificateRotationStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java new file mode 100644 index 000000000000..376a9d730101 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Commit Batch Details. + */ +@Immutable +public final class CommitBatchDetails implements JsonSerializable { + /* + * List of devices for which the commit operation failed. + */ + private List failedDevices; + + /** + * Creates an instance of CommitBatchDetails class. + */ + private CommitBatchDetails() { + } + + /** + * Get the failedDevices property: List of devices for which the commit operation failed. + * + * @return the failedDevices value. + */ + public List failedDevices() { + return this.failedDevices; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("failedDevices", this.failedDevices, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchDetails. + */ + public static CommitBatchDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchDetails deserializedCommitBatchDetails = new CommitBatchDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failedDevices".equals(fieldName)) { + List failedDevices = reader.readArray(reader1 -> reader1.getString()); + deserializedCommitBatchDetails.failedDevices = failedDevices; + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchDetails; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java new file mode 100644 index 000000000000..65211f475359 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Commit Batch State. + */ +public final class CommitBatchState extends ExpandableStringEnum { + /** + * CommitBatchState-PartialSuccess. + */ + public static final CommitBatchState PROCESSING = fromString("Processing"); + + /** + * CommitBatchState-Succeeded. + */ + public static final CommitBatchState SUCCEEDED = fromString("Succeeded"); + + /** + * CommitBatchState-Failed. + */ + public static final CommitBatchState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CommitBatchState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CommitBatchState() { + } + + /** + * Creates or finds a CommitBatchState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommitBatchState. + */ + public static CommitBatchState fromString(String name) { + return fromString(name, CommitBatchState.class); + } + + /** + * Gets known CommitBatchState values. + * + * @return known CommitBatchState values. + */ + public static Collection values() { + return values(CommitBatchState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusOperationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusOperationResponse.java new file mode 100644 index 000000000000..3e50e19aea9f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusOperationResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of CommitBatchStatusOperationResponse. + */ +public interface CommitBatchStatusOperationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Commit Batch Status Response Properties. + * + * @return the properties value. + */ + CommitBatchStatusResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner object. + * + * @return the inner object. + */ + CommitBatchStatusOperationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java new file mode 100644 index 000000000000..a3b8da941412 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Commit Batch Status Request. + */ +@Fluent +public final class CommitBatchStatusRequest implements JsonSerializable { + /* + * Commit Batch Identifier. If not provided, the latest commit batch status will be returned. + */ + private String commitBatchId; + + /** + * Creates an instance of CommitBatchStatusRequest class. + */ + public CommitBatchStatusRequest() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Set the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @param commitBatchId the commitBatchId value to set. + * @return the CommitBatchStatusRequest object itself. + */ + public CommitBatchStatusRequest withCommitBatchId(String commitBatchId) { + this.commitBatchId = commitBatchId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchStatusRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchStatusRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchStatusRequest. + */ + public static CommitBatchStatusRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchStatusRequest deserializedCommitBatchStatusRequest = new CommitBatchStatusRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedCommitBatchStatusRequest.commitBatchId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchStatusRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponseProperties.java new file mode 100644 index 000000000000..47c3997c4eef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponseProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Commit Batch Status Response Properties. + */ +@Immutable +public final class CommitBatchStatusResponseProperties + implements JsonSerializable { + /* + * Commit Batch Identifier. + */ + private String commitBatchId; + + /* + * Commit Batch State. + */ + private CommitBatchState commitBatchState; + + /* + * Commit Batch Details. + */ + private CommitBatchDetails commitBatchDetails; + + /** + * Creates an instance of CommitBatchStatusResponseProperties class. + */ + private CommitBatchStatusResponseProperties() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Get the commitBatchState property: Commit Batch State. + * + * @return the commitBatchState value. + */ + public CommitBatchState commitBatchState() { + return this.commitBatchState; + } + + /** + * Get the commitBatchDetails property: Commit Batch Details. + * + * @return the commitBatchDetails value. + */ + public CommitBatchDetails commitBatchDetails() { + return this.commitBatchDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + jsonWriter.writeStringField("commitBatchState", + this.commitBatchState == null ? null : this.commitBatchState.toString()); + jsonWriter.writeJsonField("commitBatchDetails", this.commitBatchDetails); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchStatusResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchStatusResponseProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchStatusResponseProperties. + */ + public static CommitBatchStatusResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchStatusResponseProperties deserializedCommitBatchStatusResponseProperties + = new CommitBatchStatusResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedCommitBatchStatusResponseProperties.commitBatchId = reader.getString(); + } else if ("commitBatchState".equals(fieldName)) { + deserializedCommitBatchStatusResponseProperties.commitBatchState + = CommitBatchState.fromString(reader.getString()); + } else if ("commitBatchDetails".equals(fieldName)) { + deserializedCommitBatchStatusResponseProperties.commitBatchDetails + = CommitBatchDetails.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchStatusResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationPolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationPolicy.java new file mode 100644 index 000000000000..4801a02a9fe6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationPolicy.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates Commit configuration staging policy. Supported policy is StageCEConfiguration, which indicates to prepare + * the configuration for the CE device type. + */ +public final class CommitConfigurationPolicy extends ExpandableStringEnum { + /** + * CommitConfigurationPolicy-StageCEConfiguration. + */ + public static final CommitConfigurationPolicy STAGE_CECONFIGURATION = fromString("StageCEConfiguration"); + + /** + * Creates a new instance of CommitConfigurationPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CommitConfigurationPolicy() { + } + + /** + * Creates or finds a CommitConfigurationPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommitConfigurationPolicy. + */ + public static CommitConfigurationPolicy fromString(String name) { + return fromString(name, CommitConfigurationPolicy.class); + } + + /** + * Gets known CommitConfigurationPolicy values. + * + * @return known CommitConfigurationPolicy values. + */ + public static Collection values() { + return values(CommitConfigurationPolicy.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationRequest.java new file mode 100644 index 000000000000..46894513199f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationRequest.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Commit Configuration Request. + */ +@Fluent +public final class CommitConfigurationRequest implements JsonSerializable { + /* + * Commit stage Action to be performed. + */ + private CommitStage commitStage; + + /* + * Commit configuration Policy. Supported policy is StageCEConfiguration, which indicates to prepare the + * configuration for the CE device type. + */ + private CommitConfigurationPolicy commitPolicy; + + /* + * List of ARM resource IDs of devices to be included in the commit operation. Either CE1 or CE2 is allowed. + */ + private List devices; + + /** + * Creates an instance of CommitConfigurationRequest class. + */ + public CommitConfigurationRequest() { + } + + /** + * Get the commitStage property: Commit stage Action to be performed. + * + * @return the commitStage value. + */ + public CommitStage commitStage() { + return this.commitStage; + } + + /** + * Set the commitStage property: Commit stage Action to be performed. + * + * @param commitStage the commitStage value to set. + * @return the CommitConfigurationRequest object itself. + */ + public CommitConfigurationRequest withCommitStage(CommitStage commitStage) { + this.commitStage = commitStage; + return this; + } + + /** + * Get the commitPolicy property: Commit configuration Policy. Supported policy is StageCEConfiguration, which + * indicates to prepare the configuration for the CE device type. + * + * @return the commitPolicy value. + */ + public CommitConfigurationPolicy commitPolicy() { + return this.commitPolicy; + } + + /** + * Set the commitPolicy property: Commit configuration Policy. Supported policy is StageCEConfiguration, which + * indicates to prepare the configuration for the CE device type. + * + * @param commitPolicy the commitPolicy value to set. + * @return the CommitConfigurationRequest object itself. + */ + public CommitConfigurationRequest withCommitPolicy(CommitConfigurationPolicy commitPolicy) { + this.commitPolicy = commitPolicy; + return this; + } + + /** + * Get the devices property: List of ARM resource IDs of devices to be included in the commit operation. Either CE1 + * or CE2 is allowed. + * + * @return the devices value. + */ + public List devices() { + return this.devices; + } + + /** + * Set the devices property: List of ARM resource IDs of devices to be included in the commit operation. Either CE1 + * or CE2 is allowed. + * + * @param devices the devices value to set. + * @return the CommitConfigurationRequest object itself. + */ + public CommitConfigurationRequest withDevices(List devices) { + this.devices = devices; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitStage", this.commitStage == null ? null : this.commitStage.toString()); + jsonWriter.writeStringField("commitPolicy", this.commitPolicy == null ? null : this.commitPolicy.toString()); + jsonWriter.writeArrayField("devices", this.devices, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitConfigurationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitConfigurationRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitConfigurationRequest. + */ + public static CommitConfigurationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitConfigurationRequest deserializedCommitConfigurationRequest = new CommitConfigurationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitStage".equals(fieldName)) { + deserializedCommitConfigurationRequest.commitStage = CommitStage.fromString(reader.getString()); + } else if ("commitPolicy".equals(fieldName)) { + deserializedCommitConfigurationRequest.commitPolicy + = CommitConfigurationPolicy.fromString(reader.getString()); + } else if ("devices".equals(fieldName)) { + List devices = reader.readArray(reader1 -> reader1.getString()); + deserializedCommitConfigurationRequest.devices = devices; + } else { + reader.skipChildren(); + } + } + + return deserializedCommitConfigurationRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationResponse.java new file mode 100644 index 000000000000..c842b3bcfc28 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of CommitConfigurationResponse. + */ +public interface CommitConfigurationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner + * object. + * + * @return the inner object. + */ + CommitConfigurationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitStage.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitStage.java new file mode 100644 index 000000000000..a5053d156b78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitStage.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Commit stage Action to be performed. + */ +public final class CommitStage extends ExpandableStringEnum { + /** + * CommitStage-Start indicates to prepare the device configuration for the devices which is decided by policy type. + */ + public static final CommitStage START = fromString("Start"); + + /** + * CommitStage-Continue indicates to push the configuration to the devices provided. Either CE1 or CE2 is allowed. + */ + public static final CommitStage CONTINUE = fromString("Continue"); + + /** + * CommitStage-Rollback indicates to revert to the previous configuration for the devices to which configuration is + * pushed as part of staging. + */ + public static final CommitStage ROLLBACK = fromString("Rollback"); + + /** + * Creates a new instance of CommitStage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CommitStage() { + } + + /** + * Creates or finds a CommitStage from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommitStage. + */ + public static CommitStage fromString(String name) { + return fromString(name, CommitStage.class); + } + + /** + * Gets known CommitStage values. + * + * @return known CommitStage values. + */ + public static Collection values() { + return values(CommitStage.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java index caac04182223..c2ed6b88d36d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,23 +98,6 @@ public CommonDynamicMatchConfiguration withPortGroups(List return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipGroups() != null) { - ipGroups().forEach(e -> e.validate()); - } - if (vlanGroups() != null) { - vlanGroups().forEach(e -> e.validate()); - } - if (portGroups() != null) { - portGroups().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java new file mode 100644 index 000000000000..251be8eff0c0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Dynamic match configuration object. + */ +@Fluent +public final class CommonDynamicMatchConfigurationPatch + implements JsonSerializable { + /* + * List of IP Groups. + */ + private List ipGroups; + + /* + * List of vlan groups. + */ + private List vlanGroups; + + /* + * List of the port groups. + */ + private List portGroups; + + /** + * Creates an instance of CommonDynamicMatchConfigurationPatch class. + */ + public CommonDynamicMatchConfigurationPatch() { + } + + /** + * Get the ipGroups property: List of IP Groups. + * + * @return the ipGroups value. + */ + public List ipGroups() { + return this.ipGroups; + } + + /** + * Set the ipGroups property: List of IP Groups. + * + * @param ipGroups the ipGroups value to set. + * @return the CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch withIpGroups(List ipGroups) { + this.ipGroups = ipGroups; + return this; + } + + /** + * Get the vlanGroups property: List of vlan groups. + * + * @return the vlanGroups value. + */ + public List vlanGroups() { + return this.vlanGroups; + } + + /** + * Set the vlanGroups property: List of vlan groups. + * + * @param vlanGroups the vlanGroups value to set. + * @return the CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch withVlanGroups(List vlanGroups) { + this.vlanGroups = vlanGroups; + return this; + } + + /** + * Get the portGroups property: List of the port groups. + * + * @return the portGroups value. + */ + public List portGroups() { + return this.portGroups; + } + + /** + * Set the portGroups property: List of the port groups. + * + * @param portGroups the portGroups value to set. + * @return the CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch withPortGroups(List portGroups) { + this.portGroups = portGroups; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipGroups", this.ipGroups, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("vlanGroups", this.vlanGroups, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("portGroups", this.portGroups, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonDynamicMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonDynamicMatchConfigurationPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonDynamicMatchConfigurationPatch. + */ + public static CommonDynamicMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonDynamicMatchConfigurationPatch deserializedCommonDynamicMatchConfigurationPatch + = new CommonDynamicMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipGroups".equals(fieldName)) { + List ipGroups + = reader.readArray(reader1 -> IpGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.ipGroups = ipGroups; + } else if ("vlanGroups".equals(fieldName)) { + List vlanGroups + = reader.readArray(reader1 -> VlanGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.vlanGroups = vlanGroups; + } else if ("portGroups".equals(fieldName)) { + List portGroups + = reader.readArray(reader1 -> PortGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.portGroups = portGroups; + } else { + reader.skipChildren(); + } + } + + return deserializedCommonDynamicMatchConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonErrorResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonErrorResponse.java new file mode 100644 index 000000000000..7935f5b0ec70 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonErrorResponse.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The error message. + */ +@Immutable +public class CommonErrorResponse implements JsonSerializable { + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of CommonErrorResponse class. + */ + protected CommonErrorResponse() { + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error object. + * + * @param error the error value to set. + * @return the CommonErrorResponse object itself. + */ + CommonErrorResponse withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonErrorResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonErrorResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonErrorResponse. + */ + public static CommonErrorResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonErrorResponse deserializedCommonErrorResponse = new CommonErrorResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedCommonErrorResponse.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonErrorResponse; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java index a8fdc12d4895..6a56eb6a8560 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,20 +98,6 @@ public CommonMatchConditions withIpCondition(IpMatchCondition ipCondition) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vlanMatchCondition() != null) { - vlanMatchCondition().validate(); - } - if (ipCondition() != null) { - ipCondition().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditionsPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditionsPatch.java new file mode 100644 index 000000000000..6138e9135f9a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditionsPatch.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the common match conditions of the ACL and Network Tap Rule. + */ +@Fluent +public class CommonMatchConditionsPatch implements JsonSerializable { + /* + * List of the protocols that need to be matched. + */ + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + private VlanMatchConditionPatch vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + private IpMatchConditionPatch ipCondition; + + /** + * Creates an instance of CommonMatchConditionsPatch class. + */ + public CommonMatchConditionsPatch() { + } + + /** + * Get the protocolTypes property: List of the protocols that need to be matched. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: List of the protocols that need to be matched. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CommonMatchConditionsPatch object itself. + */ + public CommonMatchConditionsPatch withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the vlanMatchCondition property: Vlan match condition that needs to be matched. + * + * @return the vlanMatchCondition value. + */ + public VlanMatchConditionPatch vlanMatchCondition() { + return this.vlanMatchCondition; + } + + /** + * Set the vlanMatchCondition property: Vlan match condition that needs to be matched. + * + * @param vlanMatchCondition the vlanMatchCondition value to set. + * @return the CommonMatchConditionsPatch object itself. + */ + public CommonMatchConditionsPatch withVlanMatchCondition(VlanMatchConditionPatch vlanMatchCondition) { + this.vlanMatchCondition = vlanMatchCondition; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public IpMatchConditionPatch ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the CommonMatchConditionsPatch object itself. + */ + public CommonMatchConditionsPatch withIpCondition(IpMatchConditionPatch ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonMatchConditionsPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonMatchConditionsPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonMatchConditionsPatch. + */ + public static CommonMatchConditionsPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonMatchConditionsPatch deserializedCommonMatchConditionsPatch = new CommonMatchConditionsPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedCommonMatchConditionsPatch.protocolTypes = protocolTypes; + } else if ("vlanMatchCondition".equals(fieldName)) { + deserializedCommonMatchConditionsPatch.vlanMatchCondition + = VlanMatchConditionPatch.fromJson(reader); + } else if ("ipCondition".equals(fieldName)) { + deserializedCommonMatchConditionsPatch.ipCondition = IpMatchConditionPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonMatchConditionsPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java new file mode 100644 index 000000000000..43370713fb1c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Common response for device Ro Commands. + */ +@Immutable +public final class CommonPostActionResponseForDeviceROCommands + implements JsonSerializable { + /* + * Gets the configuration state. + */ + private ConfigurationState configurationState; + + /* + * Predefined link containing Device RO Command output. + */ + private String outputUrl; + + /* + * Device RO command Response limited to 4000 characters. + */ + private String deviceConfigurationPreview; + + /** + * Creates an instance of CommonPostActionResponseForDeviceROCommands class. + */ + private CommonPostActionResponseForDeviceROCommands() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the outputUrl property: Predefined link containing Device RO Command output. + * + * @return the outputUrl value. + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * Get the deviceConfigurationPreview property: Device RO command Response limited to 4000 characters. + * + * @return the deviceConfigurationPreview value. + */ + public String deviceConfigurationPreview() { + return this.deviceConfigurationPreview; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("outputUrl", this.outputUrl); + jsonWriter.writeStringField("deviceConfigurationPreview", this.deviceConfigurationPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonPostActionResponseForDeviceROCommands from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonPostActionResponseForDeviceROCommands if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonPostActionResponseForDeviceROCommands. + */ + public static CommonPostActionResponseForDeviceROCommands fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonPostActionResponseForDeviceROCommands deserializedCommonPostActionResponseForDeviceROCommands + = new CommonPostActionResponseForDeviceROCommands(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("outputUrl".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.outputUrl = reader.getString(); + } else if ("deviceConfigurationPreview".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.deviceConfigurationPreview + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonPostActionResponseForDeviceROCommands; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java new file mode 100644 index 000000000000..2e56a80866d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of CommonPostActionResponseForDeviceROCommandsOperationStatusResult. + */ +public interface CommonPostActionResponseForDeviceROCommandsOperationStatusResult { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the properties property: The additional properties of the operation status result. + * + * @return the properties value. + */ + CommonPostActionResponseForDeviceROCommands properties(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner + * object. + * + * @return the inner object. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java index 1d0f8b0c59b5..201fa3cccd6a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,6 +12,13 @@ * An immutable client-side representation of CommonPostActionResponseForDeviceUpdate. */ public interface CommonPostActionResponseForDeviceUpdate { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + /** * Gets the configurationState property: Gets the configuration state. * @@ -33,13 +40,6 @@ public interface CommonPostActionResponseForDeviceUpdate { */ List failedDevices(); - /** - * Gets the error property: The error object. - * - * @return the error value. - */ - ManagementError error(); - /** * Gets the inner * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner object. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java index 3332a7d14a82..9aa8f3eef0fc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,18 +12,18 @@ */ public interface CommonPostActionResponseForStateUpdate { /** - * Gets the configurationState property: Gets the configuration state. + * Gets the error property: The error object. * - * @return the configurationState value. + * @return the error value. */ - ConfigurationState configurationState(); + ManagementError error(); /** - * Gets the error property: The error object. + * Gets the configurationState property: Gets the configuration state. * - * @return the error value. + * @return the configurationState value. */ - ManagementError error(); + ConfigurationState configurationState(); /** * Gets the inner diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java index e8fb1e6fbb5a..d4fbe364ddcf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * community action types. Example: Permit | Deny. + * Community action types. Example: Permit | Deny. */ public final class CommunityActionTypes extends ExpandableStringEnum { /** - * Static value Permit for CommunityActionTypes. + * Permit Community Action Types. */ public static final CommunityActionTypes PERMIT = fromString("Permit"); /** - * Static value Deny for CommunityActionTypes. + * Deny Community Action Types. */ public static final CommunityActionTypes DENY = fromString("Deny"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java index 5b2541d221c3..775393367bc6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class Condition extends ExpandableStringEnum { /** - * Static value EqualTo for Condition. + * Condition-EqualTo. */ public static final Condition EQUAL_TO = fromString("EqualTo"); /** - * Static value GreaterThanOrEqualTo for Condition. + * Condition-GreaterThanOrEqualTo. */ public static final Condition GREATER_THAN_OR_EQUAL_TO = fromString("GreaterThanOrEqualTo"); /** - * Static value LesserThanOrEqualTo for Condition. + * Condition-LesserThanOrEqualTo. */ public static final Condition LESSER_THAN_OR_EQUAL_TO = fromString("LesserThanOrEqualTo"); /** - * Static value Range for Condition. + * Condition-Range. */ public static final Condition RANGE = fromString("Range"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java new file mode 100644 index 000000000000..f3541de04f3d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Conditional Default Route Configuration properties. + */ +@Fluent +public final class ConditionalDefaultRouteProperties implements JsonSerializable { + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ConditionalDefaultRouteProperties class. + */ + public ConditionalDefaultRouteProperties() { + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the ConditionalDefaultRouteProperties object itself. + */ + public ConditionalDefaultRouteProperties withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the ConditionalDefaultRouteProperties object itself. + */ + public ConditionalDefaultRouteProperties withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConditionalDefaultRouteProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConditionalDefaultRouteProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConditionalDefaultRouteProperties. + */ + public static ConditionalDefaultRouteProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConditionalDefaultRouteProperties deserializedConditionalDefaultRouteProperties + = new ConditionalDefaultRouteProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedConditionalDefaultRouteProperties.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedConditionalDefaultRouteProperties.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedConditionalDefaultRouteProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java index c91dbad5a550..fb4ab1556bcf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,65 +12,70 @@ */ public final class ConfigurationState extends ExpandableStringEnum { /** - * Static value Succeeded for ConfigurationState. + * Success Configuration State. */ public static final ConfigurationState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ConfigurationState. + * Failed Configuration State. */ public static final ConfigurationState FAILED = fromString("Failed"); /** - * Static value Rejected for ConfigurationState. + * Rejected Configuration State. */ public static final ConfigurationState REJECTED = fromString("Rejected"); /** - * Static value Accepted for ConfigurationState. + * Accepted Configuration State. */ public static final ConfigurationState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioned for ConfigurationState. + * Provisioned Configuration State. */ public static final ConfigurationState PROVISIONED = fromString("Provisioned"); /** - * Static value ErrorProvisioning for ConfigurationState. + * ErrorProvisioning Configuration State. */ public static final ConfigurationState ERROR_PROVISIONING = fromString("ErrorProvisioning"); /** - * Static value Deprovisioning for ConfigurationState. + * Deprovisioning Configuration State. */ public static final ConfigurationState DEPROVISIONING = fromString("Deprovisioning"); /** - * Static value Deprovisioned for ConfigurationState. + * Deprovisioned Configuration State. */ public static final ConfigurationState DEPROVISIONED = fromString("Deprovisioned"); /** - * Static value ErrorDeprovisioning for ConfigurationState. + * ErrorDeprovisioning Configuration State. */ public static final ConfigurationState ERROR_DEPROVISIONING = fromString("ErrorDeprovisioning"); /** - * Static value DeferredControl for ConfigurationState. + * DeferredControl Configuration State. */ public static final ConfigurationState DEFERRED_CONTROL = fromString("DeferredControl"); /** - * Static value Provisioning for ConfigurationState. + * Provisioning Configuration State. */ public static final ConfigurationState PROVISIONING = fromString("Provisioning"); /** - * Static value PendingCommit for ConfigurationState. + * PendingCommit Configuration State. */ public static final ConfigurationState PENDING_COMMIT = fromString("PendingCommit"); + /** + * PendingAdministrativeUpdate State. + */ + public static final ConfigurationState PENDING_ADMINISTRATIVE_UPDATE = fromString("PendingAdministrativeUpdate"); + /** * Creates a new instance of ConfigurationState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java index 1a090e6056f1..d30bd4a6afa8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class ConfigurationType extends ExpandableStringEnum { /** - * Static value File for ConfigurationType. + * File Configuration Type. */ public static final ConfigurationType FILE = fromString("File"); /** - * Static value Inline for ConfigurationType. + * Inline Configuration Type. */ public static final ConfigurationType INLINE = fromString("Inline"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java index c15d07c73ca1..c5ce061ac60d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -56,21 +55,6 @@ public ConnectedSubnet withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model ConnectedSubnet")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectedSubnet.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java new file mode 100644 index 000000000000..0488c69164ca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Connected Subnet properties. + */ +@Fluent +public final class ConnectedSubnetPatch extends AnnotationResource { + /* + * Prefix of the Connected Subnet. + */ + private String prefix; + + /** + * Creates an instance of ConnectedSubnetPatch class. + */ + public ConnectedSubnetPatch() { + } + + /** + * Get the prefix property: Prefix of the Connected Subnet. + * + * @return the prefix value. + */ + public String prefix() { + return this.prefix; + } + + /** + * Set the prefix property: Prefix of the Connected Subnet. + * + * @param prefix the prefix value to set. + * @return the ConnectedSubnetPatch object itself. + */ + public ConnectedSubnetPatch withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ConnectedSubnetPatch withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("prefix", this.prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedSubnetPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedSubnetPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedSubnetPatch. + */ + public static ConnectedSubnetPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedSubnetPatch deserializedConnectedSubnetPatch = new ConnectedSubnetPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedConnectedSubnetPatch.withAnnotation(reader.getString()); + } else if ("prefix".equals(fieldName)) { + deserializedConnectedSubnetPatch.prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedSubnetPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java index cf5144984ae9..1f9e74863008 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,11 +16,6 @@ */ @Fluent public final class ConnectedSubnetRoutePolicy implements JsonSerializable { - /* - * ARM Resource ID of the Route Policy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - /* * Array of ARM Resource ID of the RoutePolicies. */ @@ -32,28 +27,6 @@ public final class ConnectedSubnetRoutePolicy implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicyPatch exportRoutePolicy; + + /** + * Creates an instance of ConnectedSubnetRoutePolicyPatch class. + */ + public ConnectedSubnetRoutePolicyPatch() { + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicyPatch exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ConnectedSubnetRoutePolicyPatch object itself. + */ + public ConnectedSubnetRoutePolicyPatch withExportRoutePolicy(L3ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedSubnetRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedSubnetRoutePolicyPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedSubnetRoutePolicyPatch. + */ + public static ConnectedSubnetRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedSubnetRoutePolicyPatch deserializedConnectedSubnetRoutePolicyPatch + = new ConnectedSubnetRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedConnectedSubnetRoutePolicyPatch.exportRoutePolicy + = L3ExportRoutePolicyPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedSubnetRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlanAclIpMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlanAclIpMatchCondition.java new file mode 100644 index 000000000000..d84705ed3507 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlanAclIpMatchCondition.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) IP condition properties. + */ +@Fluent +public final class ControlPlanAclIpMatchCondition implements JsonSerializable { + /* + * List of the source IP addresses that need to be matched. + */ + private String sourceIpPrefix; + + /* + * List of the destination IP addresses that need to be matched. + */ + private String destinationIpPrefix; + + /** + * Creates an instance of ControlPlanAclIpMatchCondition class. + */ + public ControlPlanAclIpMatchCondition() { + } + + /** + * Get the sourceIpPrefix property: List of the source IP addresses that need to be matched. + * + * @return the sourceIpPrefix value. + */ + public String sourceIpPrefix() { + return this.sourceIpPrefix; + } + + /** + * Set the sourceIpPrefix property: List of the source IP addresses that need to be matched. + * + * @param sourceIpPrefix the sourceIpPrefix value to set. + * @return the ControlPlanAclIpMatchCondition object itself. + */ + public ControlPlanAclIpMatchCondition withSourceIpPrefix(String sourceIpPrefix) { + this.sourceIpPrefix = sourceIpPrefix; + return this; + } + + /** + * Get the destinationIpPrefix property: List of the destination IP addresses that need to be matched. + * + * @return the destinationIpPrefix value. + */ + public String destinationIpPrefix() { + return this.destinationIpPrefix; + } + + /** + * Set the destinationIpPrefix property: List of the destination IP addresses that need to be matched. + * + * @param destinationIpPrefix the destinationIpPrefix value to set. + * @return the ControlPlanAclIpMatchCondition object itself. + */ + public ControlPlanAclIpMatchCondition withDestinationIpPrefix(String destinationIpPrefix) { + this.destinationIpPrefix = destinationIpPrefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceIpPrefix", this.sourceIpPrefix); + jsonWriter.writeStringField("destinationIpPrefix", this.destinationIpPrefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlanAclIpMatchCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlanAclIpMatchCondition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlanAclIpMatchCondition. + */ + public static ControlPlanAclIpMatchCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlanAclIpMatchCondition deserializedControlPlanAclIpMatchCondition + = new ControlPlanAclIpMatchCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceIpPrefix".equals(fieldName)) { + deserializedControlPlanAclIpMatchCondition.sourceIpPrefix = reader.getString(); + } else if ("destinationIpPrefix".equals(fieldName)) { + deserializedControlPlanAclIpMatchCondition.destinationIpPrefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlanAclIpMatchCondition; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclAction.java new file mode 100644 index 000000000000..6701d133418d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclAction.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) Actions. + */ +@Fluent +public final class ControlPlaneAclAction implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private ControlPlaneAclActionType type; + + /* + * Remark comment + */ + private String remarkComment; + + /** + * Creates an instance of ControlPlaneAclAction class. + */ + public ControlPlaneAclAction() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public ControlPlaneAclActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the ControlPlaneAclAction object itself. + */ + public ControlPlaneAclAction withType(ControlPlaneAclActionType type) { + this.type = type; + return this; + } + + /** + * Get the remarkComment property: Remark comment. + * + * @return the remarkComment value. + */ + public String remarkComment() { + return this.remarkComment; + } + + /** + * Set the remarkComment property: Remark comment. + * + * @param remarkComment the remarkComment value to set. + * @return the ControlPlaneAclAction object itself. + */ + public ControlPlaneAclAction withRemarkComment(String remarkComment) { + this.remarkComment = remarkComment; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("remarkComment", this.remarkComment); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclAction if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclAction. + */ + public static ControlPlaneAclAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclAction deserializedControlPlaneAclAction = new ControlPlaneAclAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedControlPlaneAclAction.type = ControlPlaneAclActionType.fromString(reader.getString()); + } else if ("remarkComment".equals(fieldName)) { + deserializedControlPlaneAclAction.remarkComment = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclAction; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionPatch.java new file mode 100644 index 000000000000..525d03056f36 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) Actions. + */ +@Fluent +public final class ControlPlaneAclActionPatch implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private ControlPlaneAclActionType type; + + /* + * Remark comment + */ + private String remarkComment; + + /** + * Creates an instance of ControlPlaneAclActionPatch class. + */ + public ControlPlaneAclActionPatch() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public ControlPlaneAclActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the ControlPlaneAclActionPatch object itself. + */ + public ControlPlaneAclActionPatch withType(ControlPlaneAclActionType type) { + this.type = type; + return this; + } + + /** + * Get the remarkComment property: Remark comment. + * + * @return the remarkComment value. + */ + public String remarkComment() { + return this.remarkComment; + } + + /** + * Set the remarkComment property: Remark comment. + * + * @param remarkComment the remarkComment value to set. + * @return the ControlPlaneAclActionPatch object itself. + */ + public ControlPlaneAclActionPatch withRemarkComment(String remarkComment) { + this.remarkComment = remarkComment; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("remarkComment", this.remarkComment); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclActionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclActionPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclActionPatch. + */ + public static ControlPlaneAclActionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclActionPatch deserializedControlPlaneAclActionPatch = new ControlPlaneAclActionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedControlPlaneAclActionPatch.type + = ControlPlaneAclActionType.fromString(reader.getString()); + } else if ("remarkComment".equals(fieldName)) { + deserializedControlPlaneAclActionPatch.remarkComment = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclActionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionType.java new file mode 100644 index 000000000000..c2f80e08fa8a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Control Plane Access Control List (ACL) Action Types. + */ +public final class ControlPlaneAclActionType extends ExpandableStringEnum { + /** + * AclActionType Permit. + */ + public static final ControlPlaneAclActionType PERMIT = fromString("Permit"); + + /** + * AclActionType Deny. + */ + public static final ControlPlaneAclActionType DENY = fromString("Deny"); + + /** + * AclActionType Remark. + */ + public static final ControlPlaneAclActionType REMARK = fromString("Remark"); + + /** + * Creates a new instance of ControlPlaneAclActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlPlaneAclActionType() { + } + + /** + * Creates or finds a ControlPlaneAclActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlPlaneAclActionType. + */ + public static ControlPlaneAclActionType fromString(String name) { + return fromString(name, ControlPlaneAclActionType.class); + } + + /** + * Gets known ControlPlaneAclActionType values. + * + * @return known ControlPlaneAclActionType values. + */ + public static Collection values() { + return values(ControlPlaneAclActionType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclIpMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclIpMatchConditionPatch.java new file mode 100644 index 000000000000..666c8a432867 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclIpMatchConditionPatch.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) IP condition patch properties. + */ +@Fluent +public final class ControlPlaneAclIpMatchConditionPatch + implements JsonSerializable { + /* + * List of the source IP addresses that need to be matched. + */ + private String sourceIpPrefix; + + /* + * List of the destination IP addresses that need to be matched. + */ + private String destinationIpPrefix; + + /** + * Creates an instance of ControlPlaneAclIpMatchConditionPatch class. + */ + public ControlPlaneAclIpMatchConditionPatch() { + } + + /** + * Get the sourceIpPrefix property: List of the source IP addresses that need to be matched. + * + * @return the sourceIpPrefix value. + */ + public String sourceIpPrefix() { + return this.sourceIpPrefix; + } + + /** + * Set the sourceIpPrefix property: List of the source IP addresses that need to be matched. + * + * @param sourceIpPrefix the sourceIpPrefix value to set. + * @return the ControlPlaneAclIpMatchConditionPatch object itself. + */ + public ControlPlaneAclIpMatchConditionPatch withSourceIpPrefix(String sourceIpPrefix) { + this.sourceIpPrefix = sourceIpPrefix; + return this; + } + + /** + * Get the destinationIpPrefix property: List of the destination IP addresses that need to be matched. + * + * @return the destinationIpPrefix value. + */ + public String destinationIpPrefix() { + return this.destinationIpPrefix; + } + + /** + * Set the destinationIpPrefix property: List of the destination IP addresses that need to be matched. + * + * @param destinationIpPrefix the destinationIpPrefix value to set. + * @return the ControlPlaneAclIpMatchConditionPatch object itself. + */ + public ControlPlaneAclIpMatchConditionPatch withDestinationIpPrefix(String destinationIpPrefix) { + this.destinationIpPrefix = destinationIpPrefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceIpPrefix", this.sourceIpPrefix); + jsonWriter.writeStringField("destinationIpPrefix", this.destinationIpPrefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclIpMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclIpMatchConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclIpMatchConditionPatch. + */ + public static ControlPlaneAclIpMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclIpMatchConditionPatch deserializedControlPlaneAclIpMatchConditionPatch + = new ControlPlaneAclIpMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceIpPrefix".equals(fieldName)) { + deserializedControlPlaneAclIpMatchConditionPatch.sourceIpPrefix = reader.getString(); + } else if ("destinationIpPrefix".equals(fieldName)) { + deserializedControlPlaneAclIpMatchConditionPatch.destinationIpPrefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclIpMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchCondition.java new file mode 100644 index 000000000000..ca39390589a2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchCondition.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Control Plane Access Control List (ACL) match conditions properties. + */ +@Fluent +public final class ControlPlaneAclMatchCondition implements JsonSerializable { + /* + * Protocols that need to be matched. + */ + private String protocolTypes; + + /* + * IP condition that needs to be matched. + */ + private ControlPlanAclIpMatchCondition ipCondition; + + /* + * TTL [Time To Live] values that need to be matched. + */ + private ControlPlaneAclTtlMatchCondition ttlMatchCondition; + + /* + * Port condition that needs to be matched. + */ + private ControlPlaneAclPortMatchCondition portCondition; + + /* + * Flags that need to be matched. Example: established | initial | . List of eligible TCP Flags + * are ack, cwr, ece, fin, psh, rst, syn, urg, established + */ + private List flags; + + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationProperties icmpConfiguration; + + /** + * Creates an instance of ControlPlaneAclMatchCondition class. + */ + public ControlPlaneAclMatchCondition() { + } + + /** + * Get the protocolTypes property: Protocols that need to be matched. + * + * @return the protocolTypes value. + */ + public String protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Protocols that need to be matched. + * + * @param protocolTypes the protocolTypes value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withProtocolTypes(String protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public ControlPlanAclIpMatchCondition ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withIpCondition(ControlPlanAclIpMatchCondition ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * Get the ttlMatchCondition property: TTL [Time To Live] values that need to be matched. + * + * @return the ttlMatchCondition value. + */ + public ControlPlaneAclTtlMatchCondition ttlMatchCondition() { + return this.ttlMatchCondition; + } + + /** + * Set the ttlMatchCondition property: TTL [Time To Live] values that need to be matched. + * + * @param ttlMatchCondition the ttlMatchCondition value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withTtlMatchCondition(ControlPlaneAclTtlMatchCondition ttlMatchCondition) { + this.ttlMatchCondition = ttlMatchCondition; + return this; + } + + /** + * Get the portCondition property: Port condition that needs to be matched. + * + * @return the portCondition value. + */ + public ControlPlaneAclPortMatchCondition portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withPortCondition(ControlPlaneAclPortMatchCondition portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * Get the flags property: Flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established. + * + * @return the flags value. + */ + public List flags() { + return this.flags; + } + + /** + * Set the flags property: Flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established. + * + * @param flags the flags value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withFlags(List flags) { + this.flags = flags; + return this; + } + + /** + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. + */ + public IcmpConfigurationProperties icmpConfiguration() { + return this.icmpConfiguration; + } + + /** + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the ControlPlaneAclMatchCondition object itself. + */ + public ControlPlaneAclMatchCondition withIcmpConfiguration(IcmpConfigurationProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocolTypes", this.protocolTypes); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); + jsonWriter.writeJsonField("ttlMatchCondition", this.ttlMatchCondition); + jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeArrayField("flags", this.flags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclMatchCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclMatchCondition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclMatchCondition. + */ + public static ControlPlaneAclMatchCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclMatchCondition deserializedControlPlaneAclMatchCondition + = new ControlPlaneAclMatchCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + deserializedControlPlaneAclMatchCondition.protocolTypes = reader.getString(); + } else if ("ipCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchCondition.ipCondition + = ControlPlanAclIpMatchCondition.fromJson(reader); + } else if ("ttlMatchCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchCondition.ttlMatchCondition + = ControlPlaneAclTtlMatchCondition.fromJson(reader); + } else if ("portCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchCondition.portCondition + = ControlPlaneAclPortMatchCondition.fromJson(reader); + } else if ("flags".equals(fieldName)) { + List flags = reader.readArray(reader1 -> reader1.getString()); + deserializedControlPlaneAclMatchCondition.flags = flags; + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedControlPlaneAclMatchCondition.icmpConfiguration + = IcmpConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclMatchCondition; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConditionPatch.java new file mode 100644 index 000000000000..1840c1fea4dd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConditionPatch.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Control Plane Access Control List (ACL) match conditions properties. + */ +@Fluent +public final class ControlPlaneAclMatchConditionPatch implements JsonSerializable { + /* + * Protocols that need to be matched. + */ + private String protocolTypes; + + /* + * IP condition that needs to be matched. + */ + private ControlPlaneAclIpMatchConditionPatch ipCondition; + + /* + * TTL [Time To Live] values that need to be matched. + */ + private ControlPlaneAclTtlMatchConditionPatch ttlMatchCondition; + + /* + * Port condition that needs to be matched. + */ + private ControlPlaneAclPortMatchConditionPatch portCondition; + + /* + * Flags that need to be matched. Example: established | initial | . List of eligible TCP Flags + * are ack, cwr, ece, fin, psh, rst, syn, urg, established + */ + private List flags; + + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationPatchProperties icmpConfiguration; + + /** + * Creates an instance of ControlPlaneAclMatchConditionPatch class. + */ + public ControlPlaneAclMatchConditionPatch() { + } + + /** + * Get the protocolTypes property: Protocols that need to be matched. + * + * @return the protocolTypes value. + */ + public String protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Protocols that need to be matched. + * + * @param protocolTypes the protocolTypes value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch withProtocolTypes(String protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public ControlPlaneAclIpMatchConditionPatch ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch withIpCondition(ControlPlaneAclIpMatchConditionPatch ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * Get the ttlMatchCondition property: TTL [Time To Live] values that need to be matched. + * + * @return the ttlMatchCondition value. + */ + public ControlPlaneAclTtlMatchConditionPatch ttlMatchCondition() { + return this.ttlMatchCondition; + } + + /** + * Set the ttlMatchCondition property: TTL [Time To Live] values that need to be matched. + * + * @param ttlMatchCondition the ttlMatchCondition value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch + withTtlMatchCondition(ControlPlaneAclTtlMatchConditionPatch ttlMatchCondition) { + this.ttlMatchCondition = ttlMatchCondition; + return this; + } + + /** + * Get the portCondition property: Port condition that needs to be matched. + * + * @return the portCondition value. + */ + public ControlPlaneAclPortMatchConditionPatch portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch withPortCondition(ControlPlaneAclPortMatchConditionPatch portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * Get the flags property: Flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established. + * + * @return the flags value. + */ + public List flags() { + return this.flags; + } + + /** + * Set the flags property: Flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established. + * + * @param flags the flags value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch withFlags(List flags) { + this.flags = flags; + return this; + } + + /** + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. + */ + public IcmpConfigurationPatchProperties icmpConfiguration() { + return this.icmpConfiguration; + } + + /** + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the ControlPlaneAclMatchConditionPatch object itself. + */ + public ControlPlaneAclMatchConditionPatch + withIcmpConfiguration(IcmpConfigurationPatchProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocolTypes", this.protocolTypes); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); + jsonWriter.writeJsonField("ttlMatchCondition", this.ttlMatchCondition); + jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeArrayField("flags", this.flags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclMatchConditionPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclMatchConditionPatch. + */ + public static ControlPlaneAclMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclMatchConditionPatch deserializedControlPlaneAclMatchConditionPatch + = new ControlPlaneAclMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + deserializedControlPlaneAclMatchConditionPatch.protocolTypes = reader.getString(); + } else if ("ipCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchConditionPatch.ipCondition + = ControlPlaneAclIpMatchConditionPatch.fromJson(reader); + } else if ("ttlMatchCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchConditionPatch.ttlMatchCondition + = ControlPlaneAclTtlMatchConditionPatch.fromJson(reader); + } else if ("portCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchConditionPatch.portCondition + = ControlPlaneAclPortMatchConditionPatch.fromJson(reader); + } else if ("flags".equals(fieldName)) { + List flags = reader.readArray(reader1 -> reader1.getString()); + deserializedControlPlaneAclMatchConditionPatch.flags = flags; + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedControlPlaneAclMatchConditionPatch.icmpConfiguration + = IcmpConfigurationPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationPatchProperties.java new file mode 100644 index 000000000000..ce48e6e3fdf0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationPatchProperties.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) match configurations properties. + */ +@Fluent +public final class ControlPlaneAclMatchConfigurationPatchProperties + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration. + */ + private Long sequenceNumber; + + /* + * Match conditions + */ + private ControlPlaneAclMatchConditionPatch matchCondition; + + /* + * Action that need to be performed for the matched conditions. + */ + private ControlPlaneAclActionPatch action; + + /** + * Creates an instance of ControlPlaneAclMatchConfigurationPatchProperties class. + */ + public ControlPlaneAclMatchConfigurationPatchProperties() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the ControlPlaneAclMatchConfigurationPatchProperties object itself. + */ + public ControlPlaneAclMatchConfigurationPatchProperties withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the ControlPlaneAclMatchConfigurationPatchProperties object itself. + */ + public ControlPlaneAclMatchConfigurationPatchProperties withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the matchCondition property: Match conditions. + * + * @return the matchCondition value. + */ + public ControlPlaneAclMatchConditionPatch matchCondition() { + return this.matchCondition; + } + + /** + * Set the matchCondition property: Match conditions. + * + * @param matchCondition the matchCondition value to set. + * @return the ControlPlaneAclMatchConfigurationPatchProperties object itself. + */ + public ControlPlaneAclMatchConfigurationPatchProperties + withMatchCondition(ControlPlaneAclMatchConditionPatch matchCondition) { + this.matchCondition = matchCondition; + return this; + } + + /** + * Get the action property: Action that need to be performed for the matched conditions. + * + * @return the action value. + */ + public ControlPlaneAclActionPatch action() { + return this.action; + } + + /** + * Set the action property: Action that need to be performed for the matched conditions. + * + * @param action the action value to set. + * @return the ControlPlaneAclMatchConfigurationPatchProperties object itself. + */ + public ControlPlaneAclMatchConfigurationPatchProperties withAction(ControlPlaneAclActionPatch action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeJsonField("matchCondition", this.matchCondition); + jsonWriter.writeJsonField("action", this.action); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclMatchConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclMatchConfigurationPatchProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclMatchConfigurationPatchProperties. + */ + public static ControlPlaneAclMatchConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclMatchConfigurationPatchProperties deserializedControlPlaneAclMatchConfigurationPatchProperties + = new ControlPlaneAclMatchConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationPatchProperties.matchConfigurationName + = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationPatchProperties.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("matchCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationPatchProperties.matchCondition + = ControlPlaneAclMatchConditionPatch.fromJson(reader); + } else if ("action".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationPatchProperties.action + = ControlPlaneAclActionPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclMatchConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationProperties.java new file mode 100644 index 000000000000..3bf4516e10e6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationProperties.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) match configurations properties. + */ +@Fluent +public final class ControlPlaneAclMatchConfigurationProperties + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration. + */ + private Long sequenceNumber; + + /* + * Match conditions + */ + private ControlPlaneAclMatchCondition matchCondition; + + /* + * Action that need to be performed for the matched conditions. + */ + private ControlPlaneAclAction action; + + /** + * Creates an instance of ControlPlaneAclMatchConfigurationProperties class. + */ + public ControlPlaneAclMatchConfigurationProperties() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the ControlPlaneAclMatchConfigurationProperties object itself. + */ + public ControlPlaneAclMatchConfigurationProperties withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the ControlPlaneAclMatchConfigurationProperties object itself. + */ + public ControlPlaneAclMatchConfigurationProperties withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the matchCondition property: Match conditions. + * + * @return the matchCondition value. + */ + public ControlPlaneAclMatchCondition matchCondition() { + return this.matchCondition; + } + + /** + * Set the matchCondition property: Match conditions. + * + * @param matchCondition the matchCondition value to set. + * @return the ControlPlaneAclMatchConfigurationProperties object itself. + */ + public ControlPlaneAclMatchConfigurationProperties + withMatchCondition(ControlPlaneAclMatchCondition matchCondition) { + this.matchCondition = matchCondition; + return this; + } + + /** + * Get the action property: Action that need to be performed for the matched conditions. + * + * @return the action value. + */ + public ControlPlaneAclAction action() { + return this.action; + } + + /** + * Set the action property: Action that need to be performed for the matched conditions. + * + * @param action the action value to set. + * @return the ControlPlaneAclMatchConfigurationProperties object itself. + */ + public ControlPlaneAclMatchConfigurationProperties withAction(ControlPlaneAclAction action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeJsonField("matchCondition", this.matchCondition); + jsonWriter.writeJsonField("action", this.action); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclMatchConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclMatchConfigurationProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclMatchConfigurationProperties. + */ + public static ControlPlaneAclMatchConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclMatchConfigurationProperties deserializedControlPlaneAclMatchConfigurationProperties + = new ControlPlaneAclMatchConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationProperties.matchConfigurationName = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationProperties.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("matchCondition".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationProperties.matchCondition + = ControlPlaneAclMatchCondition.fromJson(reader); + } else if ("action".equals(fieldName)) { + deserializedControlPlaneAclMatchConfigurationProperties.action + = ControlPlaneAclAction.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclMatchConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPatchProperties.java new file mode 100644 index 000000000000..dc722ad2f4eb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPatchProperties.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Access Control List (ACL) configurations patch properties. + */ +@Fluent +public final class ControlPlaneAclPatchProperties implements JsonSerializable { + /* + * IP Address Type. IPv4 or IPv6 + */ + private IpAddressType ipAddressType; + + /* + * Access Control List (ACL) match configurations. + */ + private List matchConfigurations; + + /** + * Creates an instance of ControlPlaneAclPatchProperties class. + */ + public ControlPlaneAclPatchProperties() { + } + + /** + * Get the ipAddressType property: IP Address Type. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP Address Type. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the ControlPlaneAclPatchProperties object itself. + */ + public ControlPlaneAclPatchProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConfigurations property: Access Control List (ACL) match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: Access Control List (ACL) match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the ControlPlaneAclPatchProperties object itself. + */ + public ControlPlaneAclPatchProperties + withMatchConfigurations(List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclPatchProperties. + */ + public static ControlPlaneAclPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclPatchProperties deserializedControlPlaneAclPatchProperties + = new ControlPlaneAclPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddressType".equals(fieldName)) { + deserializedControlPlaneAclPatchProperties.ipAddressType + = IpAddressType.fromString(reader.getString()); + } else if ("matchConfigurations".equals(fieldName)) { + List matchConfigurations = reader + .readArray(reader1 -> ControlPlaneAclMatchConfigurationPatchProperties.fromJson(reader1)); + deserializedControlPlaneAclPatchProperties.matchConfigurations = matchConfigurations; + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortCondition.java new file mode 100644 index 000000000000..b042e75030a3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortCondition.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Control Plane Access Control List (ACL) Port Match conditions properties. + */ +@Fluent +public final class ControlPlaneAclPortCondition implements JsonSerializable { + /* + * List of the ports that need to be matched. Possible values: 1234, 1234-1235, 1234,1235,1236 + */ + private List ports; + + /* + * Port match type. Example: eq | neq | gt | lt | range + */ + private ControlPlaneAclPortMatchType portMatchType; + + /** + * Creates an instance of ControlPlaneAclPortCondition class. + */ + public ControlPlaneAclPortCondition() { + } + + /** + * Get the ports property: List of the ports that need to be matched. Possible values: 1234, 1234-1235, + * 1234,1235,1236. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: List of the ports that need to be matched. Possible values: 1234, 1234-1235, + * 1234,1235,1236. + * + * @param ports the ports value to set. + * @return the ControlPlaneAclPortCondition object itself. + */ + public ControlPlaneAclPortCondition withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the portMatchType property: Port match type. Example: eq | neq | gt | lt | range. + * + * @return the portMatchType value. + */ + public ControlPlaneAclPortMatchType portMatchType() { + return this.portMatchType; + } + + /** + * Set the portMatchType property: Port match type. Example: eq | neq | gt | lt | range. + * + * @param portMatchType the portMatchType value to set. + * @return the ControlPlaneAclPortCondition object itself. + */ + public ControlPlaneAclPortCondition withPortMatchType(ControlPlaneAclPortMatchType portMatchType) { + this.portMatchType = portMatchType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("portMatchType", this.portMatchType == null ? null : this.portMatchType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclPortCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclPortCondition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclPortCondition. + */ + public static ControlPlaneAclPortCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclPortCondition deserializedControlPlaneAclPortCondition = new ControlPlaneAclPortCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedControlPlaneAclPortCondition.ports = ports; + } else if ("portMatchType".equals(fieldName)) { + deserializedControlPlaneAclPortCondition.portMatchType + = ControlPlaneAclPortMatchType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclPortCondition; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchCondition.java new file mode 100644 index 000000000000..a4bf0bb50de4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchCondition.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) Port Match conditions properties. + */ +@Fluent +public final class ControlPlaneAclPortMatchCondition implements JsonSerializable { + /* + * List of the ports that need to be matched. + */ + private ControlPlaneAclPortCondition sourcePorts; + + /* + * List of the destination ports that need to be matched. + */ + private ControlPlaneAclPortCondition destinationPorts; + + /** + * Creates an instance of ControlPlaneAclPortMatchCondition class. + */ + public ControlPlaneAclPortMatchCondition() { + } + + /** + * Get the sourcePorts property: List of the ports that need to be matched. + * + * @return the sourcePorts value. + */ + public ControlPlaneAclPortCondition sourcePorts() { + return this.sourcePorts; + } + + /** + * Set the sourcePorts property: List of the ports that need to be matched. + * + * @param sourcePorts the sourcePorts value to set. + * @return the ControlPlaneAclPortMatchCondition object itself. + */ + public ControlPlaneAclPortMatchCondition withSourcePorts(ControlPlaneAclPortCondition sourcePorts) { + this.sourcePorts = sourcePorts; + return this; + } + + /** + * Get the destinationPorts property: List of the destination ports that need to be matched. + * + * @return the destinationPorts value. + */ + public ControlPlaneAclPortCondition destinationPorts() { + return this.destinationPorts; + } + + /** + * Set the destinationPorts property: List of the destination ports that need to be matched. + * + * @param destinationPorts the destinationPorts value to set. + * @return the ControlPlaneAclPortMatchCondition object itself. + */ + public ControlPlaneAclPortMatchCondition withDestinationPorts(ControlPlaneAclPortCondition destinationPorts) { + this.destinationPorts = destinationPorts; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sourcePorts", this.sourcePorts); + jsonWriter.writeJsonField("destinationPorts", this.destinationPorts); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclPortMatchCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclPortMatchCondition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclPortMatchCondition. + */ + public static ControlPlaneAclPortMatchCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclPortMatchCondition deserializedControlPlaneAclPortMatchCondition + = new ControlPlaneAclPortMatchCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourcePorts".equals(fieldName)) { + deserializedControlPlaneAclPortMatchCondition.sourcePorts + = ControlPlaneAclPortCondition.fromJson(reader); + } else if ("destinationPorts".equals(fieldName)) { + deserializedControlPlaneAclPortMatchCondition.destinationPorts + = ControlPlaneAclPortCondition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclPortMatchCondition; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchConditionPatch.java new file mode 100644 index 000000000000..9361aa5c0f61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchConditionPatch.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control Plane Access Control List (ACL) Port Match conditions properties. + */ +@Fluent +public final class ControlPlaneAclPortMatchConditionPatch + implements JsonSerializable { + /* + * List of the ports that need to be matched. + */ + private ControlPlaneAclPortCondition sourcePorts; + + /* + * List of the destination ports that need to be matched. + */ + private ControlPlaneAclPortCondition destinationPorts; + + /** + * Creates an instance of ControlPlaneAclPortMatchConditionPatch class. + */ + public ControlPlaneAclPortMatchConditionPatch() { + } + + /** + * Get the sourcePorts property: List of the ports that need to be matched. + * + * @return the sourcePorts value. + */ + public ControlPlaneAclPortCondition sourcePorts() { + return this.sourcePorts; + } + + /** + * Set the sourcePorts property: List of the ports that need to be matched. + * + * @param sourcePorts the sourcePorts value to set. + * @return the ControlPlaneAclPortMatchConditionPatch object itself. + */ + public ControlPlaneAclPortMatchConditionPatch withSourcePorts(ControlPlaneAclPortCondition sourcePorts) { + this.sourcePorts = sourcePorts; + return this; + } + + /** + * Get the destinationPorts property: List of the destination ports that need to be matched. + * + * @return the destinationPorts value. + */ + public ControlPlaneAclPortCondition destinationPorts() { + return this.destinationPorts; + } + + /** + * Set the destinationPorts property: List of the destination ports that need to be matched. + * + * @param destinationPorts the destinationPorts value to set. + * @return the ControlPlaneAclPortMatchConditionPatch object itself. + */ + public ControlPlaneAclPortMatchConditionPatch withDestinationPorts(ControlPlaneAclPortCondition destinationPorts) { + this.destinationPorts = destinationPorts; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sourcePorts", this.sourcePorts); + jsonWriter.writeJsonField("destinationPorts", this.destinationPorts); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclPortMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclPortMatchConditionPatch if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclPortMatchConditionPatch. + */ + public static ControlPlaneAclPortMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclPortMatchConditionPatch deserializedControlPlaneAclPortMatchConditionPatch + = new ControlPlaneAclPortMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourcePorts".equals(fieldName)) { + deserializedControlPlaneAclPortMatchConditionPatch.sourcePorts + = ControlPlaneAclPortCondition.fromJson(reader); + } else if ("destinationPorts".equals(fieldName)) { + deserializedControlPlaneAclPortMatchConditionPatch.destinationPorts + = ControlPlaneAclPortCondition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclPortMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchType.java new file mode 100644 index 000000000000..a67c568ee97d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Control Plane Access Control List (ACL) port match types. + */ +public final class ControlPlaneAclPortMatchType extends ExpandableStringEnum { + /** + * Port-eq. + */ + public static final ControlPlaneAclPortMatchType EQUALS = fromString("eq"); + + /** + * Port-neq. + */ + public static final ControlPlaneAclPortMatchType NOT_EQUALS = fromString("neq"); + + /** + * Port-gt. + */ + public static final ControlPlaneAclPortMatchType GREATER_THAN = fromString("gt"); + + /** + * Port-lt. + */ + public static final ControlPlaneAclPortMatchType LESSER_THAN = fromString("lt"); + + /** + * Port-gt-eq. + */ + public static final ControlPlaneAclPortMatchType RANGE = fromString("range"); + + /** + * Creates a new instance of ControlPlaneAclPortMatchType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlPlaneAclPortMatchType() { + } + + /** + * Creates or finds a ControlPlaneAclPortMatchType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlPlaneAclPortMatchType. + */ + public static ControlPlaneAclPortMatchType fromString(String name) { + return fromString(name, ControlPlaneAclPortMatchType.class); + } + + /** + * Gets known ControlPlaneAclPortMatchType values. + * + * @return known ControlPlaneAclPortMatchType values. + */ + public static Collection values() { + return values(ControlPlaneAclPortMatchType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclProperties.java new file mode 100644 index 000000000000..a98a730791fb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Access Control List (ACL) configurations properties. + */ +@Fluent +public final class ControlPlaneAclProperties implements JsonSerializable { + /* + * IP Address Type. IPv4 or IPv6 + */ + private IpAddressType ipAddressType; + + /* + * Access Control List (ACL) match configurations. + */ + private List matchConfigurations; + + /** + * Creates an instance of ControlPlaneAclProperties class. + */ + public ControlPlaneAclProperties() { + } + + /** + * Get the ipAddressType property: IP Address Type. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP Address Type. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the ControlPlaneAclProperties object itself. + */ + public ControlPlaneAclProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConfigurations property: Access Control List (ACL) match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: Access Control List (ACL) match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the ControlPlaneAclProperties object itself. + */ + public ControlPlaneAclProperties + withMatchConfigurations(List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclProperties. + */ + public static ControlPlaneAclProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclProperties deserializedControlPlaneAclProperties = new ControlPlaneAclProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddressType".equals(fieldName)) { + deserializedControlPlaneAclProperties.ipAddressType = IpAddressType.fromString(reader.getString()); + } else if ("matchConfigurations".equals(fieldName)) { + List matchConfigurations + = reader.readArray(reader1 -> ControlPlaneAclMatchConfigurationProperties.fromJson(reader1)); + deserializedControlPlaneAclProperties.matchConfigurations = matchConfigurations; + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchCondition.java new file mode 100644 index 000000000000..929455f39d61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchCondition.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * TTL [Time To Live] match conditions properties. + */ +@Fluent +public final class ControlPlaneAclTtlMatchCondition implements JsonSerializable { + /* + * TTL [Time To Live] values that need to be matched. + */ + private String ttlValue; + + /* + * TTL [Time To Live] match type. Example: eq | neq | gt | lt | range + */ + private ControlPlaneAclTtlMatchType ttlMatchType; + + /** + * Creates an instance of ControlPlaneAclTtlMatchCondition class. + */ + public ControlPlaneAclTtlMatchCondition() { + } + + /** + * Get the ttlValue property: TTL [Time To Live] values that need to be matched. + * + * @return the ttlValue value. + */ + public String ttlValue() { + return this.ttlValue; + } + + /** + * Set the ttlValue property: TTL [Time To Live] values that need to be matched. + * + * @param ttlValue the ttlValue value to set. + * @return the ControlPlaneAclTtlMatchCondition object itself. + */ + public ControlPlaneAclTtlMatchCondition withTtlValue(String ttlValue) { + this.ttlValue = ttlValue; + return this; + } + + /** + * Get the ttlMatchType property: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. + * + * @return the ttlMatchType value. + */ + public ControlPlaneAclTtlMatchType ttlMatchType() { + return this.ttlMatchType; + } + + /** + * Set the ttlMatchType property: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. + * + * @param ttlMatchType the ttlMatchType value to set. + * @return the ControlPlaneAclTtlMatchCondition object itself. + */ + public ControlPlaneAclTtlMatchCondition withTtlMatchType(ControlPlaneAclTtlMatchType ttlMatchType) { + this.ttlMatchType = ttlMatchType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ttlValue", this.ttlValue); + jsonWriter.writeStringField("ttlMatchType", this.ttlMatchType == null ? null : this.ttlMatchType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclTtlMatchCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclTtlMatchCondition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclTtlMatchCondition. + */ + public static ControlPlaneAclTtlMatchCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclTtlMatchCondition deserializedControlPlaneAclTtlMatchCondition + = new ControlPlaneAclTtlMatchCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ttlValue".equals(fieldName)) { + deserializedControlPlaneAclTtlMatchCondition.ttlValue = reader.getString(); + } else if ("ttlMatchType".equals(fieldName)) { + deserializedControlPlaneAclTtlMatchCondition.ttlMatchType + = ControlPlaneAclTtlMatchType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclTtlMatchCondition; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchConditionPatch.java new file mode 100644 index 000000000000..c75507c9b4f5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchConditionPatch.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * TTL [Time To Live] match conditions patch properties. + */ +@Fluent +public final class ControlPlaneAclTtlMatchConditionPatch + implements JsonSerializable { + /* + * TTL [Time To Live] values that need to be matched. + */ + private String ttlValue; + + /* + * TTL [Time To Live] match type. Example: eq | neq | gt | lt | range + */ + private ControlPlaneAclTtlMatchType ttlMatchType; + + /** + * Creates an instance of ControlPlaneAclTtlMatchConditionPatch class. + */ + public ControlPlaneAclTtlMatchConditionPatch() { + } + + /** + * Get the ttlValue property: TTL [Time To Live] values that need to be matched. + * + * @return the ttlValue value. + */ + public String ttlValue() { + return this.ttlValue; + } + + /** + * Set the ttlValue property: TTL [Time To Live] values that need to be matched. + * + * @param ttlValue the ttlValue value to set. + * @return the ControlPlaneAclTtlMatchConditionPatch object itself. + */ + public ControlPlaneAclTtlMatchConditionPatch withTtlValue(String ttlValue) { + this.ttlValue = ttlValue; + return this; + } + + /** + * Get the ttlMatchType property: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. + * + * @return the ttlMatchType value. + */ + public ControlPlaneAclTtlMatchType ttlMatchType() { + return this.ttlMatchType; + } + + /** + * Set the ttlMatchType property: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. + * + * @param ttlMatchType the ttlMatchType value to set. + * @return the ControlPlaneAclTtlMatchConditionPatch object itself. + */ + public ControlPlaneAclTtlMatchConditionPatch withTtlMatchType(ControlPlaneAclTtlMatchType ttlMatchType) { + this.ttlMatchType = ttlMatchType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ttlValue", this.ttlValue); + jsonWriter.writeStringField("ttlMatchType", this.ttlMatchType == null ? null : this.ttlMatchType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ControlPlaneAclTtlMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ControlPlaneAclTtlMatchConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ControlPlaneAclTtlMatchConditionPatch. + */ + public static ControlPlaneAclTtlMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ControlPlaneAclTtlMatchConditionPatch deserializedControlPlaneAclTtlMatchConditionPatch + = new ControlPlaneAclTtlMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ttlValue".equals(fieldName)) { + deserializedControlPlaneAclTtlMatchConditionPatch.ttlValue = reader.getString(); + } else if ("ttlMatchType".equals(fieldName)) { + deserializedControlPlaneAclTtlMatchConditionPatch.ttlMatchType + = ControlPlaneAclTtlMatchType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedControlPlaneAclTtlMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchType.java new file mode 100644 index 000000000000..eb3577ab0685 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Control Plane Access Control List (ACL) Time To Live (TTL) match conditions properties. + */ +public final class ControlPlaneAclTtlMatchType extends ExpandableStringEnum { + /** + * TTL-eq. + */ + public static final ControlPlaneAclTtlMatchType EQUALS = fromString("eq"); + + /** + * TTL-neq. + */ + public static final ControlPlaneAclTtlMatchType NOT_EQUALS = fromString("neq"); + + /** + * TTL-gt. + */ + public static final ControlPlaneAclTtlMatchType GREATER_THAN = fromString("gt"); + + /** + * TTL-lt. + */ + public static final ControlPlaneAclTtlMatchType LESSER_THAN = fromString("lt"); + + /** + * Creates a new instance of ControlPlaneAclTtlMatchType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlPlaneAclTtlMatchType() { + } + + /** + * Creates or finds a ControlPlaneAclTtlMatchType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlPlaneAclTtlMatchType. + */ + public static ControlPlaneAclTtlMatchType fromString(String name) { + return fromString(name, ControlPlaneAclTtlMatchType.class); + } + + /** + * Gets known ControlPlaneAclTtlMatchType values. + * + * @return known ControlPlaneAclTtlMatchType values. + */ + public static Collection values() { + return values(ControlPlaneAclTtlMatchType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java index 4ac7dcee63b3..07192755e404 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Network Fabric Controller services. */ -@Fluent +@Immutable public final class ControllerServices implements JsonSerializable { /* * The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default @@ -31,7 +31,7 @@ public final class ControllerServices implements JsonSerializable ipv4AddressSpaces() { return this.ipv4AddressSpaces; } - /** - * Set the ipv4AddressSpaces property: The IPv4 Address space is optional, if the value is not defined at the time - * of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional - * attribute. - * - * @param ipv4AddressSpaces the ipv4AddressSpaces value to set. - * @return the ControllerServices object itself. - */ - public ControllerServices withIpv4AddressSpaces(List ipv4AddressSpaces) { - this.ipv4AddressSpaces = ipv4AddressSpaces; - return this; - } - /** * Get the ipv6AddressSpaces property: The IPv6 is not supported right now. * @@ -67,25 +54,6 @@ public List ipv6AddressSpaces() { return this.ipv6AddressSpaces; } - /** - * Set the ipv6AddressSpaces property: The IPv6 is not supported right now. - * - * @param ipv6AddressSpaces the ipv6AddressSpaces value to set. - * @return the ControllerServices object itself. - */ - public ControllerServices withIpv6AddressSpaces(List ipv6AddressSpaces) { - this.ipv6AddressSpaces = ipv6AddressSpaces; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java new file mode 100644 index 000000000000..2d2b4d5b6400 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The network tap destination properties. + */ +@Fluent +public final class DestinationPatchProperties implements JsonSerializable { + /* + * Destination name. + */ + private String name; + + /* + * Type of destination. Input can be IsolationDomain or Direct. + */ + private DestinationType destinationType; + + /* + * The destination Id. ARM Resource ID of either NNI or Internal Networks. + */ + private String destinationId; + + /* + * Isolation Domain Properties. + */ + private IsolationDomainPatchProperties isolationDomainProperties; + + /* + * ARM Resource ID of destination Tap Rule that contains match configurations. + */ + private String destinationTapRuleId; + + /** + * Creates an instance of DestinationPatchProperties class. + */ + public DestinationPatchProperties() { + } + + /** + * Get the name property: Destination name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Destination name. + * + * @param name the name value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the destinationType property: Type of destination. Input can be IsolationDomain or Direct. + * + * @return the destinationType value. + */ + public DestinationType destinationType() { + return this.destinationType; + } + + /** + * Set the destinationType property: Type of destination. Input can be IsolationDomain or Direct. + * + * @param destinationType the destinationType value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withDestinationType(DestinationType destinationType) { + this.destinationType = destinationType; + return this; + } + + /** + * Get the destinationId property: The destination Id. ARM Resource ID of either NNI or Internal Networks. + * + * @return the destinationId value. + */ + public String destinationId() { + return this.destinationId; + } + + /** + * Set the destinationId property: The destination Id. ARM Resource ID of either NNI or Internal Networks. + * + * @param destinationId the destinationId value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withDestinationId(String destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Get the isolationDomainProperties property: Isolation Domain Properties. + * + * @return the isolationDomainProperties value. + */ + public IsolationDomainPatchProperties isolationDomainProperties() { + return this.isolationDomainProperties; + } + + /** + * Set the isolationDomainProperties property: Isolation Domain Properties. + * + * @param isolationDomainProperties the isolationDomainProperties value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties + withIsolationDomainProperties(IsolationDomainPatchProperties isolationDomainProperties) { + this.isolationDomainProperties = isolationDomainProperties; + return this; + } + + /** + * Get the destinationTapRuleId property: ARM Resource ID of destination Tap Rule that contains match + * configurations. + * + * @return the destinationTapRuleId value. + */ + public String destinationTapRuleId() { + return this.destinationTapRuleId; + } + + /** + * Set the destinationTapRuleId property: ARM Resource ID of destination Tap Rule that contains match + * configurations. + * + * @param destinationTapRuleId the destinationTapRuleId value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withDestinationTapRuleId(String destinationTapRuleId) { + this.destinationTapRuleId = destinationTapRuleId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("destinationType", + this.destinationType == null ? null : this.destinationType.toString()); + jsonWriter.writeStringField("destinationId", this.destinationId); + jsonWriter.writeJsonField("isolationDomainProperties", this.isolationDomainProperties); + jsonWriter.writeStringField("destinationTapRuleId", this.destinationTapRuleId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DestinationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DestinationPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DestinationPatchProperties. + */ + public static DestinationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DestinationPatchProperties deserializedDestinationPatchProperties = new DestinationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDestinationPatchProperties.name = reader.getString(); + } else if ("destinationType".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationType + = DestinationType.fromString(reader.getString()); + } else if ("destinationId".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationId = reader.getString(); + } else if ("isolationDomainProperties".equals(fieldName)) { + deserializedDestinationPatchProperties.isolationDomainProperties + = IsolationDomainPatchProperties.fromJson(reader); + } else if ("destinationTapRuleId".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationTapRuleId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDestinationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java index a7b4e197b468..7b21025addbf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,7 +15,7 @@ * The network tap destination properties. */ @Fluent -public class DestinationProperties implements JsonSerializable { +public final class DestinationProperties implements JsonSerializable { /* * Destination name. */ @@ -149,17 +149,6 @@ public DestinationProperties withDestinationTapRuleId(String destinationTapRuleI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -181,6 +170,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DestinationProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DestinationProperties. */ public static DestinationProperties fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java index 7f2778885e80..820efa3a5baa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class DestinationType extends ExpandableStringEnum { /** - * Static value IsolationDomain for DestinationType. + * DestinationType-IsolationDomain. */ public static final DestinationType ISOLATION_DOMAIN = fromString("IsolationDomain"); /** - * Static value Direct for DestinationType. + * DestinationType-Direct. */ public static final DestinationType DIRECT = fromString("Direct"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java index 74018cd0eee2..f25d15929293 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,25 +12,50 @@ */ public final class DeviceAdministrativeState extends ExpandableStringEnum { /** - * Static value RMA for DeviceAdministrativeState. + * Device AdministrativeState-RMA. */ public static final DeviceAdministrativeState RMA = fromString("RMA"); /** - * Static value Resync for DeviceAdministrativeState. + * Device AdministrativeState-RMA(Return Material Authorization) Ungraceful. + */ + public static final DeviceAdministrativeState UNGRACEFUL_RMA = fromString("UngracefulRMA"); + + /** + * Device AdministrativeState-Resync. */ public static final DeviceAdministrativeState RESYNC = fromString("Resync"); /** - * Static value GracefulQuarantine for DeviceAdministrativeState. + * Device AdministrativeState-GracefulQuarantine. */ public static final DeviceAdministrativeState GRACEFUL_QUARANTINE = fromString("GracefulQuarantine"); /** - * Static value Quarantine for DeviceAdministrativeState. + * Device AdministrativeState-UngracefulQuarantine. + */ + public static final DeviceAdministrativeState UNGRACEFUL_QUARANTINE = fromString("UngracefulQuarantine"); + + /** + * Device AdministrativeState-Quarantine. */ public static final DeviceAdministrativeState QUARANTINE = fromString("Quarantine"); + /** + * Device AdministrativeState-UnderMaintenance. + */ + public static final DeviceAdministrativeState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + + /** + * Device AdministrativeState-Enable. + */ + public static final DeviceAdministrativeState ENABLE = fromString("Enable"); + + /** + * Device AdministrativeState-Disable. + */ + public static final DeviceAdministrativeState DISABLE = fromString("Disable"); + /** * Creates a new instance of DeviceAdministrativeState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java index 4a9ce51ef40b..cdaa405f0a5d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Network device interface properties. */ -@Fluent +@Immutable public final class DeviceInterfaceProperties implements JsonSerializable { /* * Interface identifier. Example: HundredGigE0/0. @@ -35,7 +35,7 @@ public final class DeviceInterfaceProperties implements JsonSerializable supportedConnectorTypes() { return this.supportedConnectorTypes; } - /** - * Set the supportedConnectorTypes property: List of supported connector types. - * - * @param supportedConnectorTypes the supportedConnectorTypes value to set. - * @return the DeviceInterfaceProperties object itself. - */ - public DeviceInterfaceProperties - withSupportedConnectorTypes(List supportedConnectorTypes) { - this.supportedConnectorTypes = supportedConnectorTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedConnectorTypes() != null) { - supportedConnectorTypes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java new file mode 100644 index 000000000000..411a0303c4c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provide the RO command. + */ +@Fluent +public final class DeviceRoCommand implements JsonSerializable { + /* + * Specify the command. + */ + private String command; + + /** + * Creates an instance of DeviceRoCommand class. + */ + public DeviceRoCommand() { + } + + /** + * Get the command property: Specify the command. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: Specify the command. + * + * @param command the command value to set. + * @return the DeviceRoCommand object itself. + */ + public DeviceRoCommand withCommand(String command) { + this.command = command; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("command", this.command); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeviceRoCommand from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeviceRoCommand if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DeviceRoCommand. + */ + public static DeviceRoCommand fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeviceRoCommand deserializedDeviceRoCommand = new DeviceRoCommand(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("command".equals(fieldName)) { + deserializedDeviceRoCommand.command = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeviceRoCommand; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java new file mode 100644 index 000000000000..aa1107b639af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Device Role. + */ +public final class DeviceRole extends ExpandableStringEnum { + /** + * DeviceRole - Customer Edge (CE). + */ + public static final DeviceRole CE = fromString("CE"); + + /** + * DeviceRole - Top of Rack (ToR). + */ + public static final DeviceRole TOR = fromString("ToR"); + + /** + * DeviceRole - Network Packet Broker (NPB). + */ + public static final DeviceRole NPB = fromString("NPB"); + + /** + * Device Role Management Switch. + */ + public static final DeviceRole MANAGEMENT_SWITCH = fromString("ManagementSwitch"); + + /** + * Creates a new instance of DeviceRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeviceRole() { + } + + /** + * Creates or finds a DeviceRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeviceRole. + */ + public static DeviceRole fromString(String name) { + return fromString(name, DeviceRole.class); + } + + /** + * Gets known DeviceRole values. + * + * @return known DeviceRole values. + */ + public static Collection values() { + return values(DeviceRole.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java new file mode 100644 index 000000000000..77870143a7c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provide the Rw command. + */ +@Fluent +public final class DeviceRwCommand implements JsonSerializable { + /* + * Specify the command. + */ + private String command; + + /* + * Specify the commands file URL. + */ + private String commandUrl; + + /** + * Creates an instance of DeviceRwCommand class. + */ + public DeviceRwCommand() { + } + + /** + * Get the command property: Specify the command. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: Specify the command. + * + * @param command the command value to set. + * @return the DeviceRwCommand object itself. + */ + public DeviceRwCommand withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the commandUrl property: Specify the commands file URL. + * + * @return the commandUrl value. + */ + public String commandUrl() { + return this.commandUrl; + } + + /** + * Set the commandUrl property: Specify the commands file URL. + * + * @param commandUrl the commandUrl value to set. + * @return the DeviceRwCommand object itself. + */ + public DeviceRwCommand withCommandUrl(String commandUrl) { + this.commandUrl = commandUrl; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("command", this.command); + jsonWriter.writeStringField("commandUrl", this.commandUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeviceRwCommand from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeviceRwCommand if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DeviceRwCommand. + */ + public static DeviceRwCommand fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeviceRwCommand deserializedDeviceRwCommand = new DeviceRwCommand(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("command".equals(fieldName)) { + deserializedDeviceRwCommand.command = reader.getString(); + } else if ("commandUrl".equals(fieldName)) { + deserializedDeviceRwCommand.commandUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeviceRwCommand; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchOperationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchOperationResponse.java new file mode 100644 index 000000000000..37a3936328dc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchOperationResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of DiscardCommitBatchOperationResponse. + */ +public interface DiscardCommitBatchOperationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Discard commit batch response properties. + * + * @return the properties value. + */ + DiscardCommitBatchResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner object. + * + * @return the inner object. + */ + DiscardCommitBatchOperationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java new file mode 100644 index 000000000000..5feb1caf2cdc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Discard Commit Batch Request. + */ +@Fluent +public final class DiscardCommitBatchRequest implements JsonSerializable { + /* + * Commit Batch Identifier. If not provided, the latest commit batch status will be returned. + */ + private String commitBatchId; + + /** + * Creates an instance of DiscardCommitBatchRequest class. + */ + public DiscardCommitBatchRequest() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Set the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @param commitBatchId the commitBatchId value to set. + * @return the DiscardCommitBatchRequest object itself. + */ + public DiscardCommitBatchRequest withCommitBatchId(String commitBatchId) { + this.commitBatchId = commitBatchId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscardCommitBatchRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscardCommitBatchRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscardCommitBatchRequest. + */ + public static DiscardCommitBatchRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscardCommitBatchRequest deserializedDiscardCommitBatchRequest = new DiscardCommitBatchRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedDiscardCommitBatchRequest.commitBatchId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscardCommitBatchRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponseProperties.java new file mode 100644 index 000000000000..5209dc8c5130 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponseProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Discard Commit Batch Response Properties. + */ +@Immutable +public final class DiscardCommitBatchResponseProperties + implements JsonSerializable { + /* + * Commit Batch Identifier. + */ + private String commitBatchId; + + /** + * Creates an instance of DiscardCommitBatchResponseProperties class. + */ + private DiscardCommitBatchResponseProperties() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscardCommitBatchResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscardCommitBatchResponseProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscardCommitBatchResponseProperties. + */ + public static DiscardCommitBatchResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscardCommitBatchResponseProperties deserializedDiscardCommitBatchResponseProperties + = new DiscardCommitBatchResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedDiscardCommitBatchResponseProperties.commitBatchId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscardCommitBatchResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java index bdb0433da901..22cf46cf7e02 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -48,14 +48,6 @@ public EnableDisableOnResources withResourceIds(List resourceIds) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java index 54fa23d64988..fcf382320f50 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class EnableDisableState extends ExpandableStringEnum { /** - * Static value Enable for EnableDisableState. + * AdministrativeState Enable. */ public static final EnableDisableState ENABLE = fromString("Enable"); /** - * Static value Disable for EnableDisableState. + * AdministrativeState Disable. */ public static final EnableDisableState DISABLE = fromString("Disable"); + /** + * AdministrativeState UnderMaintenance. + */ + public static final EnableDisableState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + /** * Creates a new instance of EnableDisableState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java index ff5510a1f6b7..143124986174 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Encapsulation extends ExpandableStringEnum { /** - * Static value None for Encapsulation. + * Encapsulation-None. */ public static final Encapsulation NONE = fromString("None"); /** - * Static value GRE for Encapsulation. + * Encapsulation-GRE. */ public static final Encapsulation GRE = fromString("GRE"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java index 9c7ab27fc6df..bd0e6ca6dd33 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class EncapsulationType extends ExpandableStringEnum { /** - * Static value None for EncapsulationType. + * None EncapsulationType. */ public static final EncapsulationType NONE = fromString("None"); /** - * Static value GTPv1 for EncapsulationType. + * GTPv1 EncapsulationType. */ public static final EncapsulationType GTPV1 = fromString("GTPv1"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java index d5ed9237722e..78df76156e6a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePolic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java index 4966fd8f4af3..b35857ca1371 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ExportRoutePolicyInformation withExportIpv6RoutePolicyId(String exportIpv return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java new file mode 100644 index 000000000000..2394f9a0dfea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Export Route Policy Configuration. + */ +@Fluent +public final class ExportRoutePolicyInformationPatch implements JsonSerializable { + /* + * Export IPv4 Route Policy Id. + */ + private String exportIpv4RoutePolicyId; + + /* + * Export IPv6 Route Policy Id. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of ExportRoutePolicyInformationPatch class. + */ + public ExportRoutePolicyInformationPatch() { + } + + /** + * Get the exportIpv4RoutePolicyId property: Export IPv4 Route Policy Id. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: Export IPv4 Route Policy Id. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the ExportRoutePolicyInformationPatch object itself. + */ + public ExportRoutePolicyInformationPatch withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: Export IPv6 Route Policy Id. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: Export IPv6 Route Policy Id. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the ExportRoutePolicyInformationPatch object itself. + */ + public ExportRoutePolicyInformationPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportRoutePolicyInformationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportRoutePolicyInformationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportRoutePolicyInformationPatch. + */ + public static ExportRoutePolicyInformationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportRoutePolicyInformationPatch deserializedExportRoutePolicyInformationPatch + = new ExportRoutePolicyInformationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyInformationPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyInformationPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportRoutePolicyInformationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java new file mode 100644 index 000000000000..08d47646917f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Export Route Policy either IPv4 or IPv6. + */ +@Fluent +public final class ExportRoutePolicyPatch implements JsonSerializable { + /* + * ARM resource ID of RoutePolicy. + */ + private String exportIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of ExportRoutePolicyPatch class. + */ + public ExportRoutePolicyPatch() { + } + + /** + * Get the exportIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the ExportRoutePolicyPatch object itself. + */ + public ExportRoutePolicyPatch withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the ExportRoutePolicyPatch object itself. + */ + public ExportRoutePolicyPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportRoutePolicyPatch. + */ + public static ExportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportRoutePolicyPatch deserializedExportRoutePolicyPatch = new ExportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java index 44e30da0763f..3cee932eb837 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -79,26 +78,6 @@ public ExpressRouteConnectionInformation withExpressRouteAuthorizationKey(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (expressRouteCircuitId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expressRouteCircuitId in model ExpressRouteConnectionInformation")); - } - if (expressRouteAuthorizationKey() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expressRouteAuthorizationKey in model ExpressRouteConnectionInformation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteConnectionInformation.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java new file mode 100644 index 000000000000..dde13d4ef730 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Extended VLAN status. + */ +public final class ExtendedVlan extends ExpandableStringEnum { + /** + * Extended VLAN is enabled. + */ + public static final ExtendedVlan ENABLED = fromString("Enabled"); + + /** + * Extended VLAN is disabled. + */ + public static final ExtendedVlan DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ExtendedVlan value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedVlan() { + } + + /** + * Creates or finds a ExtendedVlan from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedVlan. + */ + public static ExtendedVlan fromString(String name) { + return fromString(name, ExtendedVlan.class); + } + + /** + * Gets known ExtendedVlan values. + * + * @return known ExtendedVlan values. + */ + public static Collection values() { + return values(ExtendedVlan.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java index 3bb918ca6c14..2b851c8bb3ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Extension extends ExpandableStringEnum { /** - * Static value NoExtension for Extension. + * Extension-NoExtension. */ public static final Extension NO_EXTENSION = fromString("NoExtension"); /** - * Static value NPB for Extension. + * Extension-NPB. */ public static final Extension NPB = fromString("NPB"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java deleted file mode 100644 index 4b5500ccca2f..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Extension property. - */ -@Fluent -public class ExtensionEnumProperty implements JsonSerializable { - /* - * Extension. Example: NoExtension | NPB. - */ - private Extension extension; - - /** - * Creates an instance of ExtensionEnumProperty class. - */ - public ExtensionEnumProperty() { - } - - /** - * Get the extension property: Extension. Example: NoExtension | NPB. - * - * @return the extension value. - */ - public Extension extension() { - return this.extension; - } - - /** - * Set the extension property: Extension. Example: NoExtension | NPB. - * - * @param extension the extension value to set. - * @return the ExtensionEnumProperty object itself. - */ - public ExtensionEnumProperty withExtension(Extension extension) { - this.extension = extension; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtensionEnumProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtensionEnumProperty if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExtensionEnumProperty. - */ - public static ExtensionEnumProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtensionEnumProperty deserializedExtensionEnumProperty = new ExtensionEnumProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extension".equals(fieldName)) { - deserializedExtensionEnumProperty.extension = Extension.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtensionEnumProperty; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java index 056b4ea38baa..9f0aaa9b7529 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -41,91 +41,96 @@ public interface ExternalNetwork { SystemData systemData(); /** - * Gets the peeringOption property: Peering option list. + * Gets the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - PeeringOption peeringOption(); + String annotation(); /** - * Gets the optionBProperties property: option B properties object. + * Gets the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - L3OptionBProperties optionBProperties(); + String networkToNetworkInterconnectId(); /** - * Gets the optionAProperties property: option A properties object. + * Gets the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - ExternalNetworkPropertiesOptionAProperties optionAProperties(); + ImportRoutePolicy importRoutePolicy(); /** - * Gets the configurationState property: Configuration state of the resource. + * Gets the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the configurationState value. + * @return the exportRoutePolicy value. */ - ConfigurationState configurationState(); + ExportRoutePolicy exportRoutePolicy(); /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the peeringOption property: Peering option list. * - * @return the provisioningState value. + * @return the peeringOption value. */ - ProvisioningState provisioningState(); + PeeringOption peeringOption(); /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the optionBProperties property: option B properties object. * - * @return the administrativeState value. + * @return the optionBProperties value. */ - AdministrativeState administrativeState(); + L3OptionBProperties optionBProperties(); /** - * Gets the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Gets the optionAProperties property: option A properties object. * - * @return the networkToNetworkInterconnectId value. + * @return the optionAProperties value. */ - String networkToNetworkInterconnectId(); + ExternalNetworkPropertiesOptionAProperties optionAProperties(); /** - * Gets the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Gets the staticRouteConfiguration property: Static Route Configuration. * - * @return the importRoutePolicyId value. + * @return the staticRouteConfiguration value. */ - String importRoutePolicyId(); + ExternalNetworkStaticRouteConfiguration staticRouteConfiguration(); /** - * Gets the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Gets the lastOperation property: Details of the last operation performed on the resource. * - * @return the exportRoutePolicyId value. + * @return the lastOperation value. */ - String exportRoutePolicyId(); + LastOperationProperties lastOperation(); /** - * Gets the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Gets the networkFabricId property: Associated Network Fabric Resource ID. * - * @return the importRoutePolicy value. + * @return the networkFabricId value. */ - ImportRoutePolicy importRoutePolicy(); + String networkFabricId(); /** - * Gets the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Gets the configurationState property: Configuration state of the resource. * - * @return the exportRoutePolicy value. + * @return the configurationState value. */ - ExportRoutePolicy exportRoutePolicy(); + ConfigurationState configurationState(); /** - * Gets the annotation property: Switch configuration description. + * Gets the provisioningState property: Provisioning state of the resource. * - * @return the annotation value. + * @return the provisioningState value. */ - String annotation(); + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); /** * Gets the name of the resource group. @@ -189,10 +194,10 @@ interface WithPeeringOption { * The stage of the ExternalNetwork definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithOptionBProperties, DefinitionStages.WithOptionAProperties, - DefinitionStages.WithNetworkToNetworkInterconnectId, DefinitionStages.WithImportRoutePolicyId, - DefinitionStages.WithExportRoutePolicyId, DefinitionStages.WithImportRoutePolicy, - DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithAnnotation, + DefinitionStages.WithNetworkToNetworkInterconnectId, DefinitionStages.WithImportRoutePolicy, + DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithOptionBProperties, + DefinitionStages.WithOptionAProperties, DefinitionStages.WithStaticRouteConfiguration { /** * Executes the create request. * @@ -210,29 +215,16 @@ interface WithCreate extends DefinitionStages.WithOptionBProperties, DefinitionS } /** - * The stage of the ExternalNetwork definition allowing to specify optionBProperties. - */ - interface WithOptionBProperties { - /** - * Specifies the optionBProperties property: option B properties object. - * - * @param optionBProperties option B properties object. - * @return the next definition stage. - */ - WithCreate withOptionBProperties(L3OptionBProperties optionBProperties); - } - - /** - * The stage of the ExternalNetwork definition allowing to specify optionAProperties. + * The stage of the ExternalNetwork definition allowing to specify annotation. */ - interface WithOptionAProperties { + interface WithAnnotation { /** - * Specifies the optionAProperties property: option A properties object. + * Specifies the annotation property: Switch configuration description.. * - * @param optionAProperties option A properties object. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties); + WithCreate withAnnotation(String annotation); } /** @@ -251,72 +243,68 @@ interface WithNetworkToNetworkInterconnectId { } /** - * The stage of the ExternalNetwork definition allowing to specify importRoutePolicyId. + * The stage of the ExternalNetwork definition allowing to specify importRoutePolicy. */ - interface WithImportRoutePolicyId { + interface WithImportRoutePolicy { /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - WithCreate withImportRoutePolicyId(String importRoutePolicyId); + WithCreate withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); } /** - * The stage of the ExternalNetwork definition allowing to specify exportRoutePolicyId. + * The stage of the ExternalNetwork definition allowing to specify exportRoutePolicy. */ - interface WithExportRoutePolicyId { + interface WithExportRoutePolicy { /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. * - * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - WithCreate withExportRoutePolicyId(String exportRoutePolicyId); + WithCreate withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); } /** - * The stage of the ExternalNetwork definition allowing to specify importRoutePolicy. + * The stage of the ExternalNetwork definition allowing to specify optionBProperties. */ - interface WithImportRoutePolicy { + interface WithOptionBProperties { /** - * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. + * Specifies the optionBProperties property: option B properties object. * - * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. + * @param optionBProperties option B properties object. * @return the next definition stage. */ - WithCreate withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); + WithCreate withOptionBProperties(L3OptionBProperties optionBProperties); } /** - * The stage of the ExternalNetwork definition allowing to specify exportRoutePolicy. + * The stage of the ExternalNetwork definition allowing to specify optionAProperties. */ - interface WithExportRoutePolicy { + interface WithOptionAProperties { /** - * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. + * Specifies the optionAProperties property: option A properties object. * - * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. + * @param optionAProperties option A properties object. * @return the next definition stage. */ - WithCreate withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + WithCreate withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties); } /** - * The stage of the ExternalNetwork definition allowing to specify annotation. + * The stage of the ExternalNetwork definition allowing to specify staticRouteConfiguration. */ - interface WithAnnotation { + interface WithStaticRouteConfiguration { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the staticRouteConfiguration property: Static Route Configuration.. * - * @param annotation Switch configuration description. + * @param staticRouteConfiguration Static Route Configuration. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withStaticRouteConfiguration(ExternalNetworkStaticRouteConfiguration staticRouteConfiguration); } } @@ -330,10 +318,10 @@ interface WithAnnotation { /** * The template for ExternalNetwork update. */ - interface Update extends UpdateStages.WithPeeringOption, UpdateStages.WithOptionBProperties, - UpdateStages.WithOptionAProperties, UpdateStages.WithNetworkToNetworkInterconnectId, - UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithAnnotation, UpdateStages.WithNetworkToNetworkInterconnectId, + UpdateStages.WithImportRoutePolicy, UpdateStages.WithExportRoutePolicy, UpdateStages.WithPeeringOption, + UpdateStages.WithOptionBProperties, UpdateStages.WithOptionAProperties, + UpdateStages.WithStaticRouteConfiguration { /** * Executes the update request. * @@ -355,126 +343,109 @@ interface Update extends UpdateStages.WithPeeringOption, UpdateStages.WithOption */ interface UpdateStages { /** - * The stage of the ExternalNetwork update allowing to specify peeringOption. - */ - interface WithPeeringOption { - /** - * Specifies the peeringOption property: Peering option list.. - * - * @param peeringOption Peering option list. - * @return the next definition stage. - */ - Update withPeeringOption(PeeringOption peeringOption); - } - - /** - * The stage of the ExternalNetwork update allowing to specify optionBProperties. + * The stage of the ExternalNetwork update allowing to specify annotation. */ - interface WithOptionBProperties { + interface WithAnnotation { /** - * Specifies the optionBProperties property: option B properties object. + * Specifies the annotation property: Switch configuration description.. * - * @param optionBProperties option B properties object. + * @param annotation Switch configuration description. * @return the next definition stage. */ - Update withOptionBProperties(L3OptionBProperties optionBProperties); + Update withAnnotation(String annotation); } /** - * The stage of the ExternalNetwork update allowing to specify optionAProperties. + * The stage of the ExternalNetwork update allowing to specify networkToNetworkInterconnectId. */ - interface WithOptionAProperties { + interface WithNetworkToNetworkInterconnectId { /** - * Specifies the optionAProperties property: option A properties object. + * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the + * networkToNetworkInterconnectId of the ExternalNetwork resource.. * - * @param optionAProperties option A properties object. + * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * @return the next definition stage. */ - Update withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties); + Update withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); } /** - * The stage of the ExternalNetwork update allowing to specify networkToNetworkInterconnectId. + * The stage of the ExternalNetwork update allowing to specify importRoutePolicy. */ - interface WithNetworkToNetworkInterconnectId { + interface WithImportRoutePolicy { /** - * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the - * networkToNetworkInterconnectId of the ExternalNetwork resource.. + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. * - * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - Update withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); + Update withImportRoutePolicy(ImportRoutePolicyPatch importRoutePolicy); } /** - * The stage of the ExternalNetwork update allowing to specify importRoutePolicyId. + * The stage of the ExternalNetwork update allowing to specify exportRoutePolicy. */ - interface WithImportRoutePolicyId { + interface WithExportRoutePolicy { /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - Update withImportRoutePolicyId(String importRoutePolicyId); + Update withExportRoutePolicy(ExportRoutePolicyPatch exportRoutePolicy); } /** - * The stage of the ExternalNetwork update allowing to specify exportRoutePolicyId. + * The stage of the ExternalNetwork update allowing to specify peeringOption. */ - interface WithExportRoutePolicyId { + interface WithPeeringOption { /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. + * Specifies the peeringOption property: Peering option list.. * - * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * @param peeringOption Peering option list. * @return the next definition stage. */ - Update withExportRoutePolicyId(String exportRoutePolicyId); + Update withPeeringOption(PeeringOption peeringOption); } /** - * The stage of the ExternalNetwork update allowing to specify importRoutePolicy. + * The stage of the ExternalNetwork update allowing to specify optionBProperties. */ - interface WithImportRoutePolicy { + interface WithOptionBProperties { /** - * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. + * Specifies the optionBProperties property: option B properties object. * - * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. + * @param optionBProperties option B properties object. * @return the next definition stage. */ - Update withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); + Update withOptionBProperties(L3OptionBPatchProperties optionBProperties); } /** - * The stage of the ExternalNetwork update allowing to specify exportRoutePolicy. + * The stage of the ExternalNetwork update allowing to specify optionAProperties. */ - interface WithExportRoutePolicy { + interface WithOptionAProperties { /** - * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. + * Specifies the optionAProperties property: option A properties object. * - * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. + * @param optionAProperties option A properties object. * @return the next definition stage. */ - Update withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + Update withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties); } /** - * The stage of the ExternalNetwork update allowing to specify annotation. + * The stage of the ExternalNetwork update allowing to specify staticRouteConfiguration. */ - interface WithAnnotation { + interface WithStaticRouteConfiguration { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the staticRouteConfiguration property: Static Route Configuration.. * - * @param annotation Switch configuration description. + * @param staticRouteConfiguration Static Route Configuration. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withStaticRouteConfiguration(ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration); } } @@ -494,21 +465,17 @@ interface WithAnnotation { ExternalNetwork refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param body Request payload. @@ -516,26 +483,22 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param body Request payload. @@ -543,8 +506,33 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java new file mode 100644 index 000000000000..ef1538fbed9d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BMP Monitoring Configuration patch properties. + */ +@Fluent +public final class ExternalNetworkBmpPatchProperties implements JsonSerializable { + /* + * BMP Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of ExternalNetworkBmpPatchProperties class. + */ + public ExternalNetworkBmpPatchProperties() { + } + + /** + * Get the configurationState property: BMP Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BMP Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the ExternalNetworkBmpPatchProperties object itself. + */ + public ExternalNetworkBmpPatchProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBmpPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBmpPatchProperties. + */ + public static ExternalNetworkBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBmpPatchProperties deserializedExternalNetworkBmpPatchProperties + = new ExternalNetworkBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedExternalNetworkBmpPatchProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java new file mode 100644 index 000000000000..4a630c6b1ce5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) Configuration properties. + */ +@Fluent +public final class ExternalNetworkBmpProperties implements JsonSerializable { + /* + * BMP Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of ExternalNetworkBmpProperties class. + */ + public ExternalNetworkBmpProperties() { + } + + /** + * Get the configurationState property: BMP Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BMP Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the ExternalNetworkBmpProperties object itself. + */ + public ExternalNetworkBmpProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBmpProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBmpProperties. + */ + public static ExternalNetworkBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBmpProperties deserializedExternalNetworkBmpProperties = new ExternalNetworkBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedExternalNetworkBmpProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBmpProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java index fcbad0f6faed..cb781781a30b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -38,72 +38,25 @@ private ExternalNetworkPatchProperties innerProperties() { } /** - * Get the peeringOption property: Peering option list. - * - * @return the peeringOption value. - */ - public PeeringOption peeringOption() { - return this.innerProperties() == null ? null : this.innerProperties().peeringOption(); - } - - /** - * Set the peeringOption property: Peering option list. - * - * @param peeringOption the peeringOption value to set. - * @return the ExternalNetworkPatch object itself. - */ - public ExternalNetworkPatch withPeeringOption(PeeringOption peeringOption) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkPatchProperties(); - } - this.innerProperties().withPeeringOption(peeringOption); - return this; - } - - /** - * Get the optionBProperties property: option B properties object. - * - * @return the optionBProperties value. - */ - public L3OptionBProperties optionBProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); - } - - /** - * Set the optionBProperties property: option B properties object. - * - * @param optionBProperties the optionBProperties value to set. - * @return the ExternalNetworkPatch object itself. - */ - public ExternalNetworkPatch withOptionBProperties(L3OptionBProperties optionBProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkPatchProperties(); - } - this.innerProperties().withOptionBProperties(optionBProperties); - return this; - } - - /** - * Get the optionAProperties property: option A properties object. + * Get the annotation property: Switch configuration description. * - * @return the optionAProperties value. + * @return the annotation value. */ - public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the optionAProperties property: option A properties object. + * Set the annotation property: Switch configuration description. * - * @param optionAProperties the optionAProperties value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch - withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { + public ExternalNetworkPatch withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withOptionAProperties(optionAProperties); + this.innerProperties().withAnnotation(annotation); return this; } @@ -133,133 +86,143 @@ public ExternalNetworkPatch withNetworkToNetworkInterconnectId(String networkToN } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); + public ImportRoutePolicyPatch importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) { + public ExternalNetworkPatch withImportRoutePolicy(ImportRoutePolicyPatch importRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); + this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); + public ExportRoutePolicyPatch exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) { + public ExternalNetworkPatch withExportRoutePolicy(ExportRoutePolicyPatch exportRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the peeringOption property: Peering option list. * - * @return the importRoutePolicy value. + * @return the peeringOption value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); + public PeeringOption peeringOption() { + return this.innerProperties() == null ? null : this.innerProperties().peeringOption(); } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the peeringOption property: Peering option list. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + public ExternalNetworkPatch withPeeringOption(PeeringOption peeringOption) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withImportRoutePolicy(importRoutePolicy); + this.innerProperties().withPeeringOption(peeringOption); return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the optionBProperties property: option B properties object. * - * @return the exportRoutePolicy value. + * @return the optionBProperties value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + public L3OptionBPatchProperties optionBProperties() { + return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Set the optionBProperties property: option B properties object. * - * @param exportRoutePolicy the exportRoutePolicy value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + public ExternalNetworkPatch withOptionBProperties(L3OptionBPatchProperties optionBProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + this.innerProperties().withOptionBProperties(optionBProperties); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the optionAProperties property: option A properties object. * - * @return the annotation value. + * @return the optionAProperties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { + return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); } /** - * Set the annotation property: Switch configuration description. + * Set the optionAProperties property: option A properties object. * - * @param annotation the annotation value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withAnnotation(String annotation) { + public ExternalNetworkPatch + withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withOptionAProperties(optionAProperties); return this; } /** - * Validates the instance. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteConfiguration value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the ExternalNetworkPatch object itself. + */ + public ExternalNetworkPatch + withStaticRouteConfiguration(ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkPatchProperties(); } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java index da2135248fde..9efc85f90b0e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,28 @@ * option A properties object. */ @Fluent -public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer3IpPrefixProperties { +public final class ExternalNetworkPatchPropertiesOptionAProperties + implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + /* * MTU to use for option A peering. */ @@ -38,7 +60,7 @@ public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer /* * BFD configuration properties */ - private BfdConfiguration bfdConfiguration; + private BfdPatchConfiguration bfdConfiguration; /* * Ingress Acl. ARM resource ID of Access Control Lists. @@ -50,12 +72,117 @@ public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer */ private String egressAclId; + /* + * BMP Monitor Configuration. + */ + private ExternalNetworkBmpPatchProperties bmpConfiguration; + + /* + * V4OverV6 BGP Session state + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * V6OverV4 BGP Session state + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /* + * Native IPv4 prefix limit configuration + */ + private NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 prefix limit configuration + */ + private NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit; + /** * Creates an instance of ExternalNetworkPatchPropertiesOptionAProperties class. */ public ExternalNetworkPatchPropertiesOptionAProperties() { } + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + /** * Get the mtu property: MTU to use for option A peering. * @@ -130,7 +257,7 @@ public ExternalNetworkPatchPropertiesOptionAProperties withPeerAsn(Long peerAsn) * * @return the bfdConfiguration value. */ - public BfdConfiguration bfdConfiguration() { + public BfdPatchConfiguration bfdConfiguration() { return this.bfdConfiguration; } @@ -140,7 +267,8 @@ public BfdConfiguration bfdConfiguration() { * @param bfdConfiguration the bfdConfiguration value to set. * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. */ - public ExternalNetworkPatchPropertiesOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + public ExternalNetworkPatchPropertiesOptionAProperties + withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { this.bfdConfiguration = bfdConfiguration; return this; } @@ -186,51 +314,108 @@ public ExternalNetworkPatchPropertiesOptionAProperties withEgressAclId(String eg } /** - * {@inheritDoc} + * Get the bmpConfiguration property: BMP Monitor Configuration. + * + * @return the bmpConfiguration value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + public ExternalNetworkBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Monitor Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withBmpConfiguration(ExternalNetworkBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; return this; } /** - * {@inheritDoc} + * Get the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @return the v4OverV6BgpSession value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; return this; } /** - * {@inheritDoc} + * Get the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @return the v6OverV4BgpSession value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; return this; } /** - * {@inheritDoc} + * Get the nativeIpv4PrefixLimit property: Native IPv4 prefix limit configuration. + * + * @return the nativeIpv4PrefixLimit value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + public NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 prefix limit configuration. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; return this; } /** - * Validates the instance. + * Get the nativeIpv6PrefixLimit property: Native IPv6 prefix limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nativeIpv6PrefixLimit value. */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } + public NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 prefix limit configuration. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -239,16 +424,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeNumberField("vlanId", this.vlanId); jsonWriter.writeNumberField("peerASN", this.peerAsn); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); jsonWriter.writeStringField("egressAclId", this.egressAclId); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -269,17 +461,15 @@ public static ExternalNetworkPatchPropertiesOptionAProperties fromJson(JsonReade reader.nextToken(); if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withPrimaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withPrimaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withSecondaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.secondaryIpv4Prefix + = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withSecondaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.secondaryIpv6Prefix + = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); @@ -294,11 +484,26 @@ public static ExternalNetworkPatchPropertiesOptionAProperties fromJson(JsonReade = reader.getNullable(JsonReader::getLong); } else if ("bfdConfiguration".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.bfdConfiguration - = BfdConfiguration.fromJson(reader); + = BfdPatchConfiguration.fromJson(reader); } else if ("ingressAclId".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.ingressAclId = reader.getString(); } else if ("egressAclId".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.egressAclId = reader.getString(); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.bmpConfiguration + = ExternalNetworkBmpPatchProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitPatchProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java deleted file mode 100644 index 317fae89bd7b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ExternalNetwork patchable properties. - */ -@Fluent -public class ExternalNetworkPatchableProperties implements JsonSerializable { - /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. - */ - private String networkToNetworkInterconnectId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - - /* - * Import Route Policy either IPv4 or IPv6. - */ - private ImportRoutePolicy importRoutePolicy; - - /* - * Export Route Policy either IPv4 or IPv6. - */ - private ExportRoutePolicy exportRoutePolicy; - - /** - * Creates an instance of ExternalNetworkPatchableProperties class. - */ - public ExternalNetworkPatchableProperties() { - } - - /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @return the networkToNetworkInterconnectId value. - */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; - } - - /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties - withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - - /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. - * - * @return the importRoutePolicy value. - */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; - } - - /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. - * - * @param importRoutePolicy the importRoutePolicy value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; - return this; - } - - /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. - * - * @return the exportRoutePolicy value. - */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; - } - - /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. - * - * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); - jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); - jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExternalNetworkPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExternalNetworkPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExternalNetworkPatchableProperties. - */ - public static ExternalNetworkPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExternalNetworkPatchableProperties deserializedExternalNetworkPatchableProperties - = new ExternalNetworkPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.importRoutePolicy - = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.exportRoutePolicy - = ExportRoutePolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedExternalNetworkPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java index 644461b1e392..0e4abadc3ad8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,28 @@ * option A properties object. */ @Fluent -public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPrefixProperties { +public final class ExternalNetworkPropertiesOptionAProperties + implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + /* * MTU to use for option A peering. */ @@ -23,7 +45,7 @@ public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPr /* * Vlan identifier. Example : 501 */ - private Integer vlanId; + private int vlanId; /* * Fabric ASN number. Example 65001 @@ -33,7 +55,7 @@ public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPr /* * Peer ASN number.Example : 28 */ - private Long peerAsn; + private long peerAsn; /* * BFD configuration properties @@ -45,17 +67,122 @@ public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPr */ private String ingressAclId; + /* + * BMP Monitor Configuration. + */ + private ExternalNetworkBmpProperties bmpConfiguration; + /* * Egress Acl. ARM resource ID of Access Control Lists. */ private String egressAclId; + /* + * V4OverV6 BGP Session state + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * V6OverV4 BGP Session state + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /* + * Native IPv4 prefix limits configuration + */ + private NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 prefix limits configuration + */ + private NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit; + /** * Creates an instance of ExternalNetworkPropertiesOptionAProperties class. */ public ExternalNetworkPropertiesOptionAProperties() { } + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + /** * Get the mtu property: MTU to use for option A peering. * @@ -81,7 +208,7 @@ public ExternalNetworkPropertiesOptionAProperties withMtu(Integer mtu) { * * @return the vlanId value. */ - public Integer vlanId() { + public int vlanId() { return this.vlanId; } @@ -91,7 +218,7 @@ public Integer vlanId() { * @param vlanId the vlanId value to set. * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - public ExternalNetworkPropertiesOptionAProperties withVlanId(Integer vlanId) { + public ExternalNetworkPropertiesOptionAProperties withVlanId(int vlanId) { this.vlanId = vlanId; return this; } @@ -110,7 +237,7 @@ public Long fabricAsn() { * * @return the peerAsn value. */ - public Long peerAsn() { + public long peerAsn() { return this.peerAsn; } @@ -120,7 +247,7 @@ public Long peerAsn() { * @param peerAsn the peerAsn value to set. * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - public ExternalNetworkPropertiesOptionAProperties withPeerAsn(Long peerAsn) { + public ExternalNetworkPropertiesOptionAProperties withPeerAsn(long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -165,6 +292,27 @@ public ExternalNetworkPropertiesOptionAProperties withIngressAclId(String ingres return this; } + /** + * Get the bmpConfiguration property: BMP Monitor Configuration. + * + * @return the bmpConfiguration value. + */ + public ExternalNetworkBmpProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Monitor Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withBmpConfiguration(ExternalNetworkBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + /** * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. * @@ -186,51 +334,87 @@ public ExternalNetworkPropertiesOptionAProperties withEgressAclId(String egressA } /** - * {@inheritDoc} + * Get the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @return the v4OverV6BgpSession value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); - return this; + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; } /** - * {@inheritDoc} + * Set the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + public ExternalNetworkPropertiesOptionAProperties + withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; return this; } /** - * {@inheritDoc} + * Get the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @return the v6OverV4BgpSession value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; return this; } /** - * {@inheritDoc} + * Get the nativeIpv4PrefixLimit property: Native IPv4 prefix limits configuration. + * + * @return the nativeIpv4PrefixLimit value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 prefix limits configuration. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; return this; } /** - * Validates the instance. + * Get the nativeIpv6PrefixLimit property: Native IPv6 prefix limits configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nativeIpv6PrefixLimit value. */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 prefix limits configuration. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -239,16 +423,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerAsn); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); jsonWriter.writeStringField("egressAclId", this.egressAclId); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -258,6 +449,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExternalNetworkPropertiesOptionAProperties if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ExternalNetworkPropertiesOptionAProperties. */ public static ExternalNetworkPropertiesOptionAProperties fromJson(JsonReader jsonReader) throws IOException { @@ -268,32 +460,45 @@ public static ExternalNetworkPropertiesOptionAProperties fromJson(JsonReader jso String fieldName = reader.getFieldName(); reader.nextToken(); - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withPrimaryIpv4Prefix(reader.getString()); + if ("vlanId".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.vlanId = reader.getInt(); + } else if ("peerASN".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.peerAsn = reader.getLong(); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withPrimaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withSecondaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.secondaryIpv4Prefix = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withSecondaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.secondaryIpv6Prefix = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.vlanId - = reader.getNullable(JsonReader::getInt); } else if ("fabricASN".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.peerAsn - = reader.getNullable(JsonReader::getLong); } else if ("bfdConfiguration".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); } else if ("ingressAclId".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.ingressAclId = reader.getString(); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.bmpConfiguration + = ExternalNetworkBmpProperties.fromJson(reader); } else if ("egressAclId".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.egressAclId = reader.getString(); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java new file mode 100644 index 000000000000..959ac90e3b8b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * External Network RouteType. + */ +public final class ExternalNetworkRouteType extends ExpandableStringEnum { + /** + * ExternalNetwork Static. + */ + public static final ExternalNetworkRouteType STATIC = fromString("Static"); + + /** + * ExternalNetwork OptionA. + */ + public static final ExternalNetworkRouteType OPTIONA = fromString("OptionA"); + + /** + * Creates a new instance of ExternalNetworkRouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalNetworkRouteType() { + } + + /** + * Creates or finds a ExternalNetworkRouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalNetworkRouteType. + */ + public static ExternalNetworkRouteType fromString(String name) { + return fromString(name, ExternalNetworkRouteType.class); + } + + /** + * Gets known ExternalNetworkRouteType values. + * + * @return known ExternalNetworkRouteType values. + */ + public static Collection values() { + return values(ExternalNetworkRouteType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java new file mode 100644 index 000000000000..157265e308de --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for ExternalNetwork. + */ +@Fluent +public final class ExternalNetworkStaticRouteConfiguration + implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ExternalNetworkStaticRouteConfiguration class. + */ + public ExternalNetworkStaticRouteConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkStaticRouteConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkStaticRouteConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkStaticRouteConfiguration. + */ + public static ExternalNetworkStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkStaticRouteConfiguration deserializedExternalNetworkStaticRouteConfiguration + = new ExternalNetworkStaticRouteConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedExternalNetworkStaticRouteConfiguration.bfdConfiguration + = BfdConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRouteConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkStaticRouteConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..1bb515b78b3d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for External Network. + */ +@Fluent +public final class ExternalNetworkStaticRoutePatchConfiguration + implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ExternalNetworkStaticRoutePatchConfiguration class. + */ + public ExternalNetworkStaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkStaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkStaticRoutePatchConfiguration if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkStaticRoutePatchConfiguration. + */ + public static ExternalNetworkStaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkStaticRoutePatchConfiguration deserializedExternalNetworkStaticRoutePatchConfiguration + = new ExternalNetworkStaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedExternalNetworkStaticRoutePatchConfiguration.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkStaticRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..bdf1e3d0e856 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateRequest.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * External Network Update Administrative State request. + */ +@Fluent +public final class ExternalNetworkUpdateBfdAdministrativeStateRequest + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private ExternalNetworkRouteType routeType; + + /* + * Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of ExternalNetworkUpdateBfdAdministrativeStateRequest class. + */ + public ExternalNetworkUpdateBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public ExternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type that helps to know which bfd we are updating. + * + * @param routeType the routeType value to set. + * @return the ExternalNetworkUpdateBfdAdministrativeStateRequest object itself. + */ + public ExternalNetworkUpdateBfdAdministrativeStateRequest withRouteType(ExternalNetworkRouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the administrativeState property: Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the ExternalNetworkUpdateBfdAdministrativeStateRequest object itself. + */ + public ExternalNetworkUpdateBfdAdministrativeStateRequest + withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkUpdateBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkUpdateBfdAdministrativeStateRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkUpdateBfdAdministrativeStateRequest. + */ + public static ExternalNetworkUpdateBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkUpdateBfdAdministrativeStateRequest deserializedExternalNetworkUpdateBfdAdministrativeStateRequest + = new ExternalNetworkUpdateBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateRequest.routeType + = ExternalNetworkRouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkUpdateBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..bf75fcbeb7a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponse.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of ExternalNetworkUpdateBfdAdministrativeStateResponse. + */ +public interface ExternalNetworkUpdateBfdAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Response properties. + * + * @return the properties value. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.java new file mode 100644 index 000000000000..c2fbefcb67ab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response properties for External Network BFD Administrative State. + */ +@Immutable +public final class ExternalNetworkUpdateBfdAdministrativeStateResponseProperties + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private ExternalNetworkRouteType routeType; + + /* + * Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of ExternalNetworkUpdateBfdAdministrativeStateResponseProperties class. + */ + private ExternalNetworkUpdateBfdAdministrativeStateResponseProperties() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public ExternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Get the administrativeState property: Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkUpdateBfdAdministrativeStateResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkUpdateBfdAdministrativeStateResponseProperties if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ExternalNetworkUpdateBfdAdministrativeStateResponseProperties. + */ + public static ExternalNetworkUpdateBfdAdministrativeStateResponseProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkUpdateBfdAdministrativeStateResponseProperties deserializedExternalNetworkUpdateBfdAdministrativeStateResponseProperties + = new ExternalNetworkUpdateBfdAdministrativeStateResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseProperties.routeType + = ExternalNetworkRouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedExternalNetworkUpdateBfdAdministrativeStateResponseProperties.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkUpdateBfdAdministrativeStateResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java index b80fd4bc88eb..cf9acf31f653 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface ExternalNetworks { /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso String externalNetworkName, Context context); /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso ExternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,14 +86,12 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return paged collection of ExternalNetwork items as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -115,14 +101,12 @@ PagedIterable listByL3IsolationDomain(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,14 +117,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -150,14 +132,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * * Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -168,14 +148,45 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Retrieves details of ExternalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + /** * Implements ExternalNetworks GET method. * * @param id the resource ID. @@ -187,8 +198,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S ExternalNetwork getById(String id); /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param id the resource ID. @@ -201,8 +210,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S Response getByIdWithResponse(String id, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param id the resource ID. @@ -213,8 +220,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S void deleteById(String id); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java new file mode 100644 index 000000000000..63dd106d3f85 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Fabric Lock Configuration. + */ +@Immutable +public final class FabricLockProperties implements JsonSerializable { + /* + * NetworkFabric Lock State. + */ + private LockConfigurationState lockState; + + /* + * NetworkFabric Lock Type. + */ + private NetworkFabricLockType lockType; + + /** + * Creates an instance of FabricLockProperties class. + */ + private FabricLockProperties() { + } + + /** + * Get the lockState property: NetworkFabric Lock State. + * + * @return the lockState value. + */ + public LockConfigurationState lockState() { + return this.lockState; + } + + /** + * Get the lockType property: NetworkFabric Lock Type. + * + * @return the lockType value. + */ + public NetworkFabricLockType lockType() { + return this.lockType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lockState", this.lockState == null ? null : this.lockState.toString()); + jsonWriter.writeStringField("lockType", this.lockType == null ? null : this.lockType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FabricLockProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FabricLockProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FabricLockProperties. + */ + public static FabricLockProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FabricLockProperties deserializedFabricLockProperties = new FabricLockProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lockState".equals(fieldName)) { + deserializedFabricLockProperties.lockState = LockConfigurationState.fromString(reader.getString()); + } else if ("lockType".equals(fieldName)) { + deserializedFabricLockProperties.lockType = NetworkFabricLockType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFabricLockProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java index 7c56ccade0b7..b9253838c44e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class FabricSkuType extends ExpandableStringEnum { /** - * Static value SingleRack for FabricSkuType. + * FabricSkuType-SingleRack. */ public static final FabricSkuType SINGLE_RACK = fromString("SingleRack"); /** - * Static value MultiRack for FabricSkuType. + * FabricSkuType-MultiRack. */ public static final FabricSkuType MULTI_RACK = fromString("MultiRack"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java new file mode 100644 index 000000000000..93df5652e974 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Feature flag properties. + */ +@Fluent +public final class FeatureFlagProperties implements JsonSerializable { + /* + * Feature flag name. + */ + private String featureFlagName; + + /* + * Feature flag value. + */ + private String featureFlagValue; + + /** + * Creates an instance of FeatureFlagProperties class. + */ + public FeatureFlagProperties() { + } + + /** + * Get the featureFlagName property: Feature flag name. + * + * @return the featureFlagName value. + */ + public String featureFlagName() { + return this.featureFlagName; + } + + /** + * Set the featureFlagName property: Feature flag name. + * + * @param featureFlagName the featureFlagName value to set. + * @return the FeatureFlagProperties object itself. + */ + public FeatureFlagProperties withFeatureFlagName(String featureFlagName) { + this.featureFlagName = featureFlagName; + return this; + } + + /** + * Get the featureFlagValue property: Feature flag value. + * + * @return the featureFlagValue value. + */ + public String featureFlagValue() { + return this.featureFlagValue; + } + + /** + * Set the featureFlagValue property: Feature flag value. + * + * @param featureFlagValue the featureFlagValue value to set. + * @return the FeatureFlagProperties object itself. + */ + public FeatureFlagProperties withFeatureFlagValue(String featureFlagValue) { + this.featureFlagValue = featureFlagValue; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("featureFlagName", this.featureFlagName); + jsonWriter.writeStringField("featureFlagValue", this.featureFlagValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FeatureFlagProperties. + */ + public static FeatureFlagProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureFlagProperties deserializedFeatureFlagProperties = new FeatureFlagProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("featureFlagName".equals(fieldName)) { + deserializedFeatureFlagProperties.featureFlagName = reader.getString(); + } else if ("featureFlagValue".equals(fieldName)) { + deserializedFeatureFlagProperties.featureFlagValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureFlagProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java index 417a6a7af156..c2d86a2cb873 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class GatewayType extends ExpandableStringEnum { /** - * Static value Infrastructure for GatewayType. + * GatewayType Infrastructure. */ public static final GatewayType INFRASTRUCTURE = fromString("Infrastructure"); /** - * Static value Workload for GatewayType. + * GatewayType Workload. */ public static final GatewayType WORKLOAD = fromString("Workload"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponse.java new file mode 100644 index 000000000000..0e8631c4535a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponse.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of GetTopologyResponse. + */ +public interface GetTopologyResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Properties of the GetTopology Response. + * + * @return the properties value. + */ + GetTopologyResponseProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner object. + * + * @return the inner object. + */ + GetTopologyResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponseProperties.java new file mode 100644 index 000000000000..6377c286bb2c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponseProperties.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of the GetTopology Response. + */ +@Immutable +public final class GetTopologyResponseProperties implements JsonSerializable { + /* + * Topology JSON string. + */ + private String url; + + /** + * Creates an instance of GetTopologyResponseProperties class. + */ + private GetTopologyResponseProperties() { + } + + /** + * Get the url property: Topology JSON string. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GetTopologyResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GetTopologyResponseProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GetTopologyResponseProperties. + */ + public static GetTopologyResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GetTopologyResponseProperties deserializedGetTopologyResponseProperties + = new GetTopologyResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedGetTopologyResponseProperties.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGetTopologyResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java new file mode 100644 index 000000000000..aaeb7f5df18b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global Access Control List actions patch properties. + */ +@Fluent +public final class GlobalAccessControlListActionPatchProperties + implements JsonSerializable { + /* + * Configuration to enable or disable ACL action count. + */ + private BooleanEnumProperty enableCount; + + /** + * Creates an instance of GlobalAccessControlListActionPatchProperties class. + */ + public GlobalAccessControlListActionPatchProperties() { + } + + /** + * Get the enableCount property: Configuration to enable or disable ACL action count. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable or disable ACL action count. + * + * @param enableCount the enableCount value to set. + * @return the GlobalAccessControlListActionPatchProperties object itself. + */ + public GlobalAccessControlListActionPatchProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalAccessControlListActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalAccessControlListActionPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalAccessControlListActionPatchProperties. + */ + public static GlobalAccessControlListActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalAccessControlListActionPatchProperties deserializedGlobalAccessControlListActionPatchProperties + = new GlobalAccessControlListActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalAccessControlListActionPatchProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalAccessControlListActionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java new file mode 100644 index 000000000000..a5090faecb66 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global Access Control List actions properties. + */ +@Fluent +public final class GlobalAccessControlListActionProperties + implements JsonSerializable { + /* + * Configuration to enable or disable ACL action count. + */ + private BooleanEnumProperty enableCount; + + /** + * Creates an instance of GlobalAccessControlListActionProperties class. + */ + public GlobalAccessControlListActionProperties() { + } + + /** + * Get the enableCount property: Configuration to enable or disable ACL action count. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable or disable ACL action count. + * + * @param enableCount the enableCount value to set. + * @return the GlobalAccessControlListActionProperties object itself. + */ + public GlobalAccessControlListActionProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalAccessControlListActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalAccessControlListActionProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalAccessControlListActionProperties. + */ + public static GlobalAccessControlListActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalAccessControlListActionProperties deserializedGlobalAccessControlListActionProperties + = new GlobalAccessControlListActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalAccessControlListActionProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalAccessControlListActionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java new file mode 100644 index 000000000000..4a132ec2d8e5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global network tap rule actions patch properties. + */ +@Fluent +public final class GlobalNetworkTapRuleActionPatchProperties + implements JsonSerializable { + /* + * Configuration to enable network tap rule counter. + */ + private BooleanEnumProperty enableCount; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /** + * Creates an instance of GlobalNetworkTapRuleActionPatchProperties class. + */ + public GlobalNetworkTapRuleActionPatchProperties() { + } + + /** + * Get the enableCount property: Configuration to enable network tap rule counter. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable network tap rule counter. + * + * @param enableCount the enableCount value to set. + * @return the GlobalNetworkTapRuleActionPatchProperties object itself. + */ + public GlobalNetworkTapRuleActionPatchProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * Get the truncate property: Truncate. 0 indicates do not truncate. + * + * @return the truncate value. + */ + public String truncate() { + return this.truncate; + } + + /** + * Set the truncate property: Truncate. 0 indicates do not truncate. + * + * @param truncate the truncate value to set. + * @return the GlobalNetworkTapRuleActionPatchProperties object itself. + */ + public GlobalNetworkTapRuleActionPatchProperties withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalNetworkTapRuleActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalNetworkTapRuleActionPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalNetworkTapRuleActionPatchProperties. + */ + public static GlobalNetworkTapRuleActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalNetworkTapRuleActionPatchProperties deserializedGlobalNetworkTapRuleActionPatchProperties + = new GlobalNetworkTapRuleActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionPatchProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionPatchProperties.truncate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalNetworkTapRuleActionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java new file mode 100644 index 000000000000..4836d5446c52 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global network tap rule actions properties. + */ +@Fluent +public final class GlobalNetworkTapRuleActionProperties + implements JsonSerializable { + /* + * Configuration to enable network tap rule counter. + */ + private BooleanEnumProperty enableCount; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /** + * Creates an instance of GlobalNetworkTapRuleActionProperties class. + */ + public GlobalNetworkTapRuleActionProperties() { + } + + /** + * Get the enableCount property: Configuration to enable network tap rule counter. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable network tap rule counter. + * + * @param enableCount the enableCount value to set. + * @return the GlobalNetworkTapRuleActionProperties object itself. + */ + public GlobalNetworkTapRuleActionProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * Get the truncate property: Truncate. 0 indicates do not truncate. + * + * @return the truncate value. + */ + public String truncate() { + return this.truncate; + } + + /** + * Set the truncate property: Truncate. 0 indicates do not truncate. + * + * @param truncate the truncate value to set. + * @return the GlobalNetworkTapRuleActionProperties object itself. + */ + public GlobalNetworkTapRuleActionProperties withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalNetworkTapRuleActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalNetworkTapRuleActionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalNetworkTapRuleActionProperties. + */ + public static GlobalNetworkTapRuleActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalNetworkTapRuleActionProperties deserializedGlobalNetworkTapRuleActionProperties + = new GlobalNetworkTapRuleActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionProperties.truncate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalNetworkTapRuleActionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java new file mode 100644 index 000000000000..d446b90f800d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Header name and source addresses associated with the header. + */ +@Fluent +public final class HeaderAddressProperties implements JsonSerializable { + /* + * Name of the header. + */ + private String headerName; + + /* + * List of source remote IP to be allowed or denied. + */ + private List addressList; + + /** + * Creates an instance of HeaderAddressProperties class. + */ + public HeaderAddressProperties() { + } + + /** + * Get the headerName property: Name of the header. + * + * @return the headerName value. + */ + public String headerName() { + return this.headerName; + } + + /** + * Set the headerName property: Name of the header. + * + * @param headerName the headerName value to set. + * @return the HeaderAddressProperties object itself. + */ + public HeaderAddressProperties withHeaderName(String headerName) { + this.headerName = headerName; + return this; + } + + /** + * Get the addressList property: List of source remote IP to be allowed or denied. + * + * @return the addressList value. + */ + public List addressList() { + return this.addressList; + } + + /** + * Set the addressList property: List of source remote IP to be allowed or denied. + * + * @param addressList the addressList value to set. + * @return the HeaderAddressProperties object itself. + */ + public HeaderAddressProperties withAddressList(List addressList) { + this.addressList = addressList; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("headerName", this.headerName); + jsonWriter.writeArrayField("addressList", this.addressList, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HeaderAddressProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HeaderAddressProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the HeaderAddressProperties. + */ + public static HeaderAddressProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HeaderAddressProperties deserializedHeaderAddressProperties = new HeaderAddressProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("headerName".equals(fieldName)) { + deserializedHeaderAddressProperties.headerName = reader.getString(); + } else if ("addressList".equals(fieldName)) { + List addressList = reader.readArray(reader1 -> reader1.getString()); + deserializedHeaderAddressProperties.addressList = addressList; + } else { + reader.skipChildren(); + } + } + + return deserializedHeaderAddressProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java new file mode 100644 index 000000000000..8aae9929b792 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internet Control Message Protocol (ICMP) configuration patch properties. + */ +@Fluent +public final class IcmpConfigurationPatchProperties implements JsonSerializable { + /* + * Internet Control Message Protocol (ICMP) types + */ + private List icmpTypes; + + /** + * Creates an instance of IcmpConfigurationPatchProperties class. + */ + public IcmpConfigurationPatchProperties() { + } + + /** + * Get the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @return the icmpTypes value. + */ + public List icmpTypes() { + return this.icmpTypes; + } + + /** + * Set the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @param icmpTypes the icmpTypes value to set. + * @return the IcmpConfigurationPatchProperties object itself. + */ + public IcmpConfigurationPatchProperties withIcmpTypes(List icmpTypes) { + this.icmpTypes = icmpTypes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("icmpTypes", this.icmpTypes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IcmpConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IcmpConfigurationPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IcmpConfigurationPatchProperties. + */ + public static IcmpConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IcmpConfigurationPatchProperties deserializedIcmpConfigurationPatchProperties + = new IcmpConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("icmpTypes".equals(fieldName)) { + List icmpTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedIcmpConfigurationPatchProperties.icmpTypes = icmpTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedIcmpConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java new file mode 100644 index 000000000000..c6e84ba5aa2d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internet Control Message Protocol (ICMP) configuration. + */ +@Fluent +public final class IcmpConfigurationProperties implements JsonSerializable { + /* + * Internet Control Message Protocol (ICMP) types + */ + private List icmpTypes; + + /** + * Creates an instance of IcmpConfigurationProperties class. + */ + public IcmpConfigurationProperties() { + } + + /** + * Get the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @return the icmpTypes value. + */ + public List icmpTypes() { + return this.icmpTypes; + } + + /** + * Set the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @param icmpTypes the icmpTypes value to set. + * @return the IcmpConfigurationProperties object itself. + */ + public IcmpConfigurationProperties withIcmpTypes(List icmpTypes) { + this.icmpTypes = icmpTypes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("icmpTypes", this.icmpTypes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IcmpConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IcmpConfigurationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IcmpConfigurationProperties. + */ + public static IcmpConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IcmpConfigurationProperties deserializedIcmpConfigurationProperties = new IcmpConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("icmpTypes".equals(fieldName)) { + List icmpTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedIcmpConfigurationProperties.icmpTypes = icmpTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedIcmpConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java new file mode 100644 index 000000000000..32c82f0b1d94 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentitySelector represents the selection of a managed identity for use. + */ +@Fluent +public final class IdentitySelector implements JsonSerializable { + /* + * The type of managed identity that is being selected. + */ + private ManagedServiceIdentitySelectorType identityType; + + /* + * The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of IdentitySelector class. + */ + public IdentitySelector() { + } + + /** + * Get the identityType property: The type of managed identity that is being selected. + * + * @return the identityType value. + */ + public ManagedServiceIdentitySelectorType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: The type of managed identity that is being selected. + * + * @param identityType the identityType value to set. + * @return the IdentitySelector object itself. + */ + public IdentitySelector withIdentityType(ManagedServiceIdentitySelectorType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the IdentitySelector object itself. + */ + public IdentitySelector withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentitySelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentitySelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentitySelector. + */ + public static IdentitySelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentitySelector deserializedIdentitySelector = new IdentitySelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityType".equals(fieldName)) { + deserializedIdentitySelector.identityType + = ManagedServiceIdentitySelectorType.fromString(reader.getString()); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedIdentitySelector.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentitySelector; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java new file mode 100644 index 000000000000..a73daa725936 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentitySelector represents the selection of a managed identity for use. + */ +@Fluent +public final class IdentitySelectorPatch implements JsonSerializable { + /* + * The type of managed identity that is being selected. + */ + private ManagedServiceIdentitySelectorType identityType; + + /* + * The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of IdentitySelectorPatch class. + */ + public IdentitySelectorPatch() { + } + + /** + * Get the identityType property: The type of managed identity that is being selected. + * + * @return the identityType value. + */ + public ManagedServiceIdentitySelectorType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: The type of managed identity that is being selected. + * + * @param identityType the identityType value to set. + * @return the IdentitySelectorPatch object itself. + */ + public IdentitySelectorPatch withIdentityType(ManagedServiceIdentitySelectorType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the IdentitySelectorPatch object itself. + */ + public IdentitySelectorPatch withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentitySelectorPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentitySelectorPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentitySelectorPatch. + */ + public static IdentitySelectorPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentitySelectorPatch deserializedIdentitySelectorPatch = new IdentitySelectorPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityType".equals(fieldName)) { + deserializedIdentitySelectorPatch.identityType + = ManagedServiceIdentitySelectorType.fromString(reader.getString()); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedIdentitySelectorPatch.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentitySelectorPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java index 20a9557fcf7a..c036aa987258 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ImportRoutePolicy withImportIpv6RoutePolicyId(String importIpv6RoutePolic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java index e577ec82a2bc..a2d79a89a199 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ImportRoutePolicyInformation withImportIpv6RoutePolicyId(String importIpv return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java new file mode 100644 index 000000000000..f761a1bdb583 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Import Route Policy Configuration. + */ +@Fluent +public final class ImportRoutePolicyInformationPatch implements JsonSerializable { + /* + * Import IPv4 Route Policy Id. + */ + private String importIpv4RoutePolicyId; + + /* + * Import IPv6 Route Policy Id. + */ + private String importIpv6RoutePolicyId; + + /** + * Creates an instance of ImportRoutePolicyInformationPatch class. + */ + public ImportRoutePolicyInformationPatch() { + } + + /** + * Get the importIpv4RoutePolicyId property: Import IPv4 Route Policy Id. + * + * @return the importIpv4RoutePolicyId value. + */ + public String importIpv4RoutePolicyId() { + return this.importIpv4RoutePolicyId; + } + + /** + * Set the importIpv4RoutePolicyId property: Import IPv4 Route Policy Id. + * + * @param importIpv4RoutePolicyId the importIpv4RoutePolicyId value to set. + * @return the ImportRoutePolicyInformationPatch object itself. + */ + public ImportRoutePolicyInformationPatch withImportIpv4RoutePolicyId(String importIpv4RoutePolicyId) { + this.importIpv4RoutePolicyId = importIpv4RoutePolicyId; + return this; + } + + /** + * Get the importIpv6RoutePolicyId property: Import IPv6 Route Policy Id. + * + * @return the importIpv6RoutePolicyId value. + */ + public String importIpv6RoutePolicyId() { + return this.importIpv6RoutePolicyId; + } + + /** + * Set the importIpv6RoutePolicyId property: Import IPv6 Route Policy Id. + * + * @param importIpv6RoutePolicyId the importIpv6RoutePolicyId value to set. + * @return the ImportRoutePolicyInformationPatch object itself. + */ + public ImportRoutePolicyInformationPatch withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("importIpv4RoutePolicyId", this.importIpv4RoutePolicyId); + jsonWriter.writeStringField("importIpv6RoutePolicyId", this.importIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportRoutePolicyInformationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportRoutePolicyInformationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportRoutePolicyInformationPatch. + */ + public static ImportRoutePolicyInformationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportRoutePolicyInformationPatch deserializedImportRoutePolicyInformationPatch + = new ImportRoutePolicyInformationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyInformationPatch.importIpv4RoutePolicyId = reader.getString(); + } else if ("importIpv6RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyInformationPatch.importIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportRoutePolicyInformationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java new file mode 100644 index 000000000000..1ef5c8565b41 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Import Route Policy either IPv4 or IPv6. + */ +@Fluent +public final class ImportRoutePolicyPatch implements JsonSerializable { + /* + * ARM resource ID of RoutePolicy. + */ + private String importIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + private String importIpv6RoutePolicyId; + + /** + * Creates an instance of ImportRoutePolicyPatch class. + */ + public ImportRoutePolicyPatch() { + } + + /** + * Get the importIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the importIpv4RoutePolicyId value. + */ + public String importIpv4RoutePolicyId() { + return this.importIpv4RoutePolicyId; + } + + /** + * Set the importIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param importIpv4RoutePolicyId the importIpv4RoutePolicyId value to set. + * @return the ImportRoutePolicyPatch object itself. + */ + public ImportRoutePolicyPatch withImportIpv4RoutePolicyId(String importIpv4RoutePolicyId) { + this.importIpv4RoutePolicyId = importIpv4RoutePolicyId; + return this; + } + + /** + * Get the importIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the importIpv6RoutePolicyId value. + */ + public String importIpv6RoutePolicyId() { + return this.importIpv6RoutePolicyId; + } + + /** + * Set the importIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param importIpv6RoutePolicyId the importIpv6RoutePolicyId value to set. + * @return the ImportRoutePolicyPatch object itself. + */ + public ImportRoutePolicyPatch withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("importIpv4RoutePolicyId", this.importIpv4RoutePolicyId); + jsonWriter.writeStringField("importIpv6RoutePolicyId", this.importIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportRoutePolicyPatch. + */ + public static ImportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportRoutePolicyPatch deserializedImportRoutePolicyPatch = new ImportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyPatch.importIpv4RoutePolicyId = reader.getString(); + } else if ("importIpv6RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyPatch.importIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java index dee5412bc877..d53688c48fa7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class InterfaceType extends ExpandableStringEnum { /** - * Static value Management for InterfaceType. + * InterfaceType-Management. */ public static final InterfaceType MANAGEMENT = fromString("Management"); /** - * Static value Data for InterfaceType. + * InterfaceType-Data. */ public static final InterfaceType DATA = fromString("Data"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java index f724ba6e53e5..888c6349aa1b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -42,46 +42,18 @@ public interface InternalNetwork { SystemData systemData(); /** - * Gets the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. - */ - int vlanId(); - - /** - * Gets the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. - */ - InternalNetworkPropertiesBgpConfiguration bgpConfiguration(); - - /** - * Gets the staticRouteConfiguration property: Static Route Configuration properties. - * - * @return the staticRouteConfiguration value. - */ - InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration(); - - /** - * Gets the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - ConfigurationState configurationState(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - ProvisioningState provisioningState(); + String annotation(); /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the extension property: Extension. Example: NoExtension | NPB. * - * @return the administrativeState value. + * @return the extension value. */ - AdministrativeState administrativeState(); + Extension extension(); /** * Gets the mtu property: Maximum transmission unit. Default value is 1500. @@ -104,22 +76,6 @@ public interface InternalNetwork { */ List connectedIPv6Subnets(); - /** - * Gets the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - String importRoutePolicyId(); - - /** - * Gets the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - String exportRoutePolicyId(); - /** * Gets the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -156,18 +112,74 @@ public interface InternalNetwork { IsMonitoringEnabled isMonitoringEnabled(); /** - * Gets the extension property: Extension. Example: NoExtension | NPB. + * Gets the vlanId property: Vlan identifier. Example: 1001. * - * @return the extension value. + * @return the vlanId value. */ - Extension extension(); + int vlanId(); /** - * Gets the annotation property: Switch configuration description. + * Gets the bgpConfiguration property: BGP configuration properties. * - * @return the annotation value. + * @return the bgpConfiguration value. */ - String annotation(); + BgpConfiguration bgpConfiguration(); + + /** + * Gets the staticRouteConfiguration property: Static Route Configuration properties. + * + * @return the staticRouteConfiguration value. + */ + StaticRouteConfiguration staticRouteConfiguration(); + + /** + * Gets the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit(); + + /** + * Gets the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); /** * Gets the name of the resource group. @@ -231,13 +243,13 @@ interface WithVlanId { * The stage of the InternalNetwork definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithBgpConfiguration, DefinitionStages.WithStaticRouteConfiguration, + interface WithCreate extends DefinitionStages.WithAnnotation, DefinitionStages.WithExtension, DefinitionStages.WithMtu, DefinitionStages.WithConnectedIPv4Subnets, - DefinitionStages.WithConnectedIPv6Subnets, DefinitionStages.WithImportRoutePolicyId, - DefinitionStages.WithExportRoutePolicyId, DefinitionStages.WithImportRoutePolicy, + DefinitionStages.WithConnectedIPv6Subnets, DefinitionStages.WithImportRoutePolicy, DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithIngressAclId, DefinitionStages.WithEgressAclId, - DefinitionStages.WithIsMonitoringEnabled, DefinitionStages.WithExtension, DefinitionStages.WithAnnotation { + DefinitionStages.WithIsMonitoringEnabled, DefinitionStages.WithBgpConfiguration, + DefinitionStages.WithStaticRouteConfiguration, DefinitionStages.WithNativeIpv4PrefixLimit, + DefinitionStages.WithNativeIpv6PrefixLimit { /** * Executes the create request. * @@ -255,30 +267,29 @@ interface WithCreate } /** - * The stage of the InternalNetwork definition allowing to specify bgpConfiguration. + * The stage of the InternalNetwork definition allowing to specify annotation. */ - interface WithBgpConfiguration { + interface WithAnnotation { /** - * Specifies the bgpConfiguration property: BGP configuration properties.. + * Specifies the annotation property: Switch configuration description.. * - * @param bgpConfiguration BGP configuration properties. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration); + WithCreate withAnnotation(String annotation); } /** - * The stage of the InternalNetwork definition allowing to specify staticRouteConfiguration. + * The stage of the InternalNetwork definition allowing to specify extension. */ - interface WithStaticRouteConfiguration { + interface WithExtension { /** - * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * Specifies the extension property: Extension. Example: NoExtension | NPB.. * - * @param staticRouteConfiguration Static Route Configuration properties. + * @param extension Extension. Example: NoExtension | NPB. * @return the next definition stage. */ - WithCreate withStaticRouteConfiguration( - InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration); + WithCreate withExtension(Extension extension); } /** @@ -320,36 +331,6 @@ interface WithConnectedIPv6Subnets { WithCreate withConnectedIPv6Subnets(List connectedIPv6Subnets); } - /** - * The stage of the InternalNetwork definition allowing to specify importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - WithCreate withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the InternalNetwork definition allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - WithCreate withExportRoutePolicyId(String exportRoutePolicyId); - } - /** * The stage of the InternalNetwork definition allowing to specify importRoutePolicy. */ @@ -417,29 +398,55 @@ interface WithIsMonitoringEnabled { } /** - * The stage of the InternalNetwork definition allowing to specify extension. + * The stage of the InternalNetwork definition allowing to specify bgpConfiguration. */ - interface WithExtension { + interface WithBgpConfiguration { /** - * Specifies the extension property: Extension. Example: NoExtension | NPB.. + * Specifies the bgpConfiguration property: BGP configuration properties.. * - * @param extension Extension. Example: NoExtension | NPB. + * @param bgpConfiguration BGP configuration properties. * @return the next definition stage. */ - WithCreate withExtension(Extension extension); + WithCreate withBgpConfiguration(BgpConfiguration bgpConfiguration); } /** - * The stage of the InternalNetwork definition allowing to specify annotation. + * The stage of the InternalNetwork definition allowing to specify staticRouteConfiguration. */ - interface WithAnnotation { + interface WithStaticRouteConfiguration { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. * - * @param annotation Switch configuration description. + * @param staticRouteConfiguration Static Route Configuration properties. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration); + } + + /** + * The stage of the InternalNetwork definition allowing to specify nativeIpv4PrefixLimit. + */ + interface WithNativeIpv4PrefixLimit { + /** + * Specifies the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties.. + * + * @param nativeIpv4PrefixLimit Native IPv4 Prefix Limit Configuration properties. + * @return the next definition stage. + */ + WithCreate withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit); + } + + /** + * The stage of the InternalNetwork definition allowing to specify nativeIpv6PrefixLimit. + */ + interface WithNativeIpv6PrefixLimit { + /** + * Specifies the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties.. + * + * @param nativeIpv6PrefixLimit Native IPv6 Prefix Limit Configuration properties. + * @return the next definition stage. + */ + WithCreate withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit); } } @@ -453,11 +460,11 @@ interface WithAnnotation { /** * The template for InternalNetwork update. */ - interface Update extends UpdateStages.WithBgpConfiguration, UpdateStages.WithStaticRouteConfiguration, - UpdateStages.WithMtu, UpdateStages.WithConnectedIPv4Subnets, UpdateStages.WithConnectedIPv6Subnets, - UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithIngressAclId, UpdateStages.WithEgressAclId, - UpdateStages.WithIsMonitoringEnabled, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithAnnotation, UpdateStages.WithMtu, UpdateStages.WithConnectedIPv4Subnets, + UpdateStages.WithConnectedIPv6Subnets, UpdateStages.WithImportRoutePolicy, UpdateStages.WithExportRoutePolicy, + UpdateStages.WithIngressAclId, UpdateStages.WithEgressAclId, UpdateStages.WithIsMonitoringEnabled, + UpdateStages.WithBgpConfiguration, UpdateStages.WithStaticRouteConfiguration, + UpdateStages.WithNativeIpv4PrefixLimit, UpdateStages.WithNativeIpv6PrefixLimit { /** * Executes the update request. * @@ -479,29 +486,16 @@ interface Update extends UpdateStages.WithBgpConfiguration, UpdateStages.WithSta */ interface UpdateStages { /** - * The stage of the InternalNetwork update allowing to specify bgpConfiguration. - */ - interface WithBgpConfiguration { - /** - * Specifies the bgpConfiguration property: BGP configuration properties.. - * - * @param bgpConfiguration BGP configuration properties. - * @return the next definition stage. - */ - Update withBgpConfiguration(BgpConfiguration bgpConfiguration); - } - - /** - * The stage of the InternalNetwork update allowing to specify staticRouteConfiguration. + * The stage of the InternalNetwork update allowing to specify annotation. */ - interface WithStaticRouteConfiguration { + interface WithAnnotation { /** - * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * Specifies the annotation property: Switch configuration description.. * - * @param staticRouteConfiguration Static Route Configuration properties. + * @param annotation Switch configuration description. * @return the next definition stage. */ - Update withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration); + Update withAnnotation(String annotation); } /** @@ -527,7 +521,7 @@ interface WithConnectedIPv4Subnets { * @param connectedIPv4Subnets List of Connected IPv4 Subnets. * @return the next definition stage. */ - Update withConnectedIPv4Subnets(List connectedIPv4Subnets); + Update withConnectedIPv4SubnetsForUpdate(List connectedIPv4Subnets); } /** @@ -540,37 +534,7 @@ interface WithConnectedIPv6Subnets { * @param connectedIPv6Subnets List of connected IPv6 Subnets. * @return the next definition stage. */ - Update withConnectedIPv6Subnets(List connectedIPv6Subnets); - } - - /** - * The stage of the InternalNetwork update allowing to specify importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - Update withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the InternalNetwork update allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - Update withExportRoutePolicyId(String exportRoutePolicyId); + Update withConnectedIPv6SubnetsForUpdate(List connectedIPv6Subnets); } /** @@ -640,16 +604,55 @@ interface WithIsMonitoringEnabled { } /** - * The stage of the InternalNetwork update allowing to specify annotation. + * The stage of the InternalNetwork update allowing to specify bgpConfiguration. */ - interface WithAnnotation { + interface WithBgpConfiguration { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the bgpConfiguration property: BGP configuration properties.. * - * @param annotation Switch configuration description. + * @param bgpConfiguration BGP configuration properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withBgpConfiguration(BgpPatchConfiguration bgpConfiguration); + } + + /** + * The stage of the InternalNetwork update allowing to specify staticRouteConfiguration. + */ + interface WithStaticRouteConfiguration { + /** + * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * + * @param staticRouteConfiguration Static Route Configuration properties. + * @return the next definition stage. + */ + Update withStaticRouteConfiguration(StaticRoutePatchConfiguration staticRouteConfiguration); + } + + /** + * The stage of the InternalNetwork update allowing to specify nativeIpv4PrefixLimit. + */ + interface WithNativeIpv4PrefixLimit { + /** + * Specifies the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties.. + * + * @param nativeIpv4PrefixLimit Native IPv4 Prefix Limit Configuration properties. + * @return the next definition stage. + */ + Update withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit); + } + + /** + * The stage of the InternalNetwork update allowing to specify nativeIpv6PrefixLimit. + */ + interface WithNativeIpv6PrefixLimit { + /** + * Specifies the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties.. + * + * @param nativeIpv6PrefixLimit Native IPv6 Prefix Limit Configuration properties. + * @return the next definition stage. + */ + Update withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit); } } @@ -669,48 +672,41 @@ interface WithAnnotation { InternalNetwork refresh(Context context); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body); + InternalNetworkUpdateBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkUpdateBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param body Request payload. @@ -718,27 +714,23 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body, - Context context); + InternalNetworkUpdateBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param body Request payload. @@ -746,8 +738,33 @@ CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdmini * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InternalNetworkUpdateBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java new file mode 100644 index 000000000000..b93cc7e12f20 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BMP Configuration. + */ +@Fluent +public final class InternalNetworkBmpPatchProperties implements JsonSerializable { + /* + * Neighbor IP Address exclusions for BMP. + */ + private List neighborIpExclusions; + + /* + * BMP Monitoring configuration state. + */ + private BmpConfigurationState bmpConfigurationState; + + /** + * Creates an instance of InternalNetworkBmpPatchProperties class. + */ + public InternalNetworkBmpPatchProperties() { + } + + /** + * Get the neighborIpExclusions property: Neighbor IP Address exclusions for BMP. + * + * @return the neighborIpExclusions value. + */ + public List neighborIpExclusions() { + return this.neighborIpExclusions; + } + + /** + * Set the neighborIpExclusions property: Neighbor IP Address exclusions for BMP. + * + * @param neighborIpExclusions the neighborIpExclusions value to set. + * @return the InternalNetworkBmpPatchProperties object itself. + */ + public InternalNetworkBmpPatchProperties withNeighborIpExclusions(List neighborIpExclusions) { + this.neighborIpExclusions = neighborIpExclusions; + return this; + } + + /** + * Get the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @return the bmpConfigurationState value. + */ + public BmpConfigurationState bmpConfigurationState() { + return this.bmpConfigurationState; + } + + /** + * Set the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @param bmpConfigurationState the bmpConfigurationState value to set. + * @return the InternalNetworkBmpPatchProperties object itself. + */ + public InternalNetworkBmpPatchProperties withBmpConfigurationState(BmpConfigurationState bmpConfigurationState) { + this.bmpConfigurationState = bmpConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborIpExclusions", this.neighborIpExclusions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("bmpConfigurationState", + this.bmpConfigurationState == null ? null : this.bmpConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBmpPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBmpPatchProperties. + */ + public static InternalNetworkBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBmpPatchProperties deserializedInternalNetworkBmpPatchProperties + = new InternalNetworkBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborIpExclusions".equals(fieldName)) { + List neighborIpExclusions = reader.readArray(reader1 -> reader1.getString()); + deserializedInternalNetworkBmpPatchProperties.neighborIpExclusions = neighborIpExclusions; + } else if ("bmpConfigurationState".equals(fieldName)) { + deserializedInternalNetworkBmpPatchProperties.bmpConfigurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java new file mode 100644 index 000000000000..95540e67ae7b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BMP Configuration. + */ +@Fluent +public final class InternalNetworkBmpProperties implements JsonSerializable { + /* + * BMP Collector Address. + */ + private List neighborIpExclusions; + + /* + * BMP Monitoring configuration state. + */ + private BmpConfigurationState bmpConfigurationState; + + /* + * BMP Export Policy configuration. + */ + private BmpExportPolicyProperties exportPolicyConfiguration; + + /** + * Creates an instance of InternalNetworkBmpProperties class. + */ + public InternalNetworkBmpProperties() { + } + + /** + * Get the neighborIpExclusions property: BMP Collector Address. + * + * @return the neighborIpExclusions value. + */ + public List neighborIpExclusions() { + return this.neighborIpExclusions; + } + + /** + * Set the neighborIpExclusions property: BMP Collector Address. + * + * @param neighborIpExclusions the neighborIpExclusions value to set. + * @return the InternalNetworkBmpProperties object itself. + */ + public InternalNetworkBmpProperties withNeighborIpExclusions(List neighborIpExclusions) { + this.neighborIpExclusions = neighborIpExclusions; + return this; + } + + /** + * Get the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @return the bmpConfigurationState value. + */ + public BmpConfigurationState bmpConfigurationState() { + return this.bmpConfigurationState; + } + + /** + * Set the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @param bmpConfigurationState the bmpConfigurationState value to set. + * @return the InternalNetworkBmpProperties object itself. + */ + public InternalNetworkBmpProperties withBmpConfigurationState(BmpConfigurationState bmpConfigurationState) { + this.bmpConfigurationState = bmpConfigurationState; + return this; + } + + /** + * Get the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyProperties exportPolicyConfiguration() { + return this.exportPolicyConfiguration; + } + + /** + * Set the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the InternalNetworkBmpProperties object itself. + */ + public InternalNetworkBmpProperties + withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration) { + this.exportPolicyConfiguration = exportPolicyConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborIpExclusions", this.neighborIpExclusions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("bmpConfigurationState", + this.bmpConfigurationState == null ? null : this.bmpConfigurationState.toString()); + jsonWriter.writeJsonField("exportPolicyConfiguration", this.exportPolicyConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBmpProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBmpProperties. + */ + public static InternalNetworkBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBmpProperties deserializedInternalNetworkBmpProperties = new InternalNetworkBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborIpExclusions".equals(fieldName)) { + List neighborIpExclusions = reader.readArray(reader1 -> reader1.getString()); + deserializedInternalNetworkBmpProperties.neighborIpExclusions = neighborIpExclusions; + } else if ("bmpConfigurationState".equals(fieldName)) { + deserializedInternalNetworkBmpProperties.bmpConfigurationState + = BmpConfigurationState.fromString(reader.getString()); + } else if ("exportPolicyConfiguration".equals(fieldName)) { + deserializedInternalNetworkBmpProperties.exportPolicyConfiguration + = BmpExportPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBmpProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java index 57e64c091a36..1c4b5ef06599 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -39,48 +39,25 @@ private InternalNetworkPatchProperties innerProperties() { } /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. - */ - public BgpConfiguration bgpConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); - } - - /** - * Set the bgpConfiguration property: BGP configuration properties. - * - * @param bgpConfiguration the bgpConfiguration value to set. - * @return the InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withBgpConfiguration(BgpConfiguration bgpConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withBgpConfiguration(bgpConfiguration); - return this; - } - - /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the annotation property: Switch configuration description. * - * @return the staticRouteConfiguration value. + * @return the annotation value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the annotation property: Switch configuration description. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param annotation the annotation value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkPatch withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + this.innerProperties().withAnnotation(annotation); return this; } @@ -112,7 +89,7 @@ public InternalNetworkPatch withMtu(Integer mtu) { * * @return the connectedIPv4Subnets value. */ - public List connectedIPv4Subnets() { + public List connectedIPv4Subnets() { return this.innerProperties() == null ? null : this.innerProperties().connectedIPv4Subnets(); } @@ -122,7 +99,7 @@ public List connectedIPv4Subnets() { * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withConnectedIPv4Subnets(List connectedIPv4Subnets) { + public InternalNetworkPatch withConnectedIPv4Subnets(List connectedIPv4Subnets) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } @@ -135,7 +112,7 @@ public InternalNetworkPatch withConnectedIPv4Subnets(List conne * * @return the connectedIPv6Subnets value. */ - public List connectedIPv6Subnets() { + public List connectedIPv6Subnets() { return this.innerProperties() == null ? null : this.innerProperties().connectedIPv6Subnets(); } @@ -145,7 +122,7 @@ public List connectedIPv6Subnets() { * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withConnectedIPv6Subnets(List connectedIPv6Subnets) { + public InternalNetworkPatch withConnectedIPv6Subnets(List connectedIPv6Subnets) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } @@ -153,56 +130,6 @@ public InternalNetworkPatch withConnectedIPv6Subnets(List conne return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -319,37 +246,95 @@ public InternalNetworkPatch withIsMonitoringEnabled(IsMonitoringEnabled isMonito } /** - * Get the annotation property: Switch configuration description. + * Get the bgpConfiguration property: BGP configuration properties. * - * @return the annotation value. + * @return the bgpConfiguration value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public BgpPatchConfiguration bgpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); } /** - * Set the annotation property: Switch configuration description. + * Set the bgpConfiguration property: BGP configuration properties. * - * @param annotation the annotation value to set. + * @param bgpConfiguration the bgpConfiguration value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withAnnotation(String annotation) { + public InternalNetworkPatch withBgpConfiguration(BgpPatchConfiguration bgpConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withBgpConfiguration(bgpConfiguration); + return this; + } + + /** + * Get the staticRouteConfiguration property: Static Route Configuration properties. + * + * @return the staticRouteConfiguration value. + */ + public StaticRoutePatchConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withStaticRouteConfiguration(StaticRoutePatchConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); return this; } /** - * Validates the instance. + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().nativeIpv4PrefixLimit(); + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkPatch object itself. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public InternalNetworkPatch withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); } + this.innerProperties().withNativeIpv4PrefixLimit(nativeIpv4PrefixLimit); + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().nativeIpv6PrefixLimit(); + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withNativeIpv6PrefixLimit(nativeIpv6PrefixLimit); + return this; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java deleted file mode 100644 index 854a1f6cec90..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The InternalNetwork patchable properties. - */ -@Fluent -public class InternalNetworkPatchableProperties implements JsonSerializable { - /* - * Maximum transmission unit. Default value is 1500. - */ - private Integer mtu; - - /* - * List of Connected IPv4 Subnets. - */ - private List connectedIPv4Subnets; - - /* - * List of connected IPv6 Subnets. - */ - private List connectedIPv6Subnets; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - - /* - * Import Route Policy either IPv4 or IPv6. - */ - private ImportRoutePolicy importRoutePolicy; - - /* - * Export Route Policy either IPv4 or IPv6. - */ - private ExportRoutePolicy exportRoutePolicy; - - /* - * Ingress Acl. ARM resource ID of Access Control Lists. - */ - private String ingressAclId; - - /* - * Egress Acl. ARM resource ID of Access Control Lists. - */ - private String egressAclId; - - /* - * To check whether monitoring of internal network is enabled or not. - */ - private IsMonitoringEnabled isMonitoringEnabled; - - /** - * Creates an instance of InternalNetworkPatchableProperties class. - */ - public InternalNetworkPatchableProperties() { - } - - /** - * Get the mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.mtu; - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @return the connectedIPv4Subnets value. - */ - public List connectedIPv4Subnets() { - return this.connectedIPv4Subnets; - } - - /** - * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { - this.connectedIPv4Subnets = connectedIPv4Subnets; - return this; - } - - /** - * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @return the connectedIPv6Subnets value. - */ - public List connectedIPv6Subnets() { - return this.connectedIPv6Subnets; - } - - /** - * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { - this.connectedIPv6Subnets = connectedIPv6Subnets; - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - - /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. - * - * @return the importRoutePolicy value. - */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; - } - - /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. - * - * @param importRoutePolicy the importRoutePolicy value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; - return this; - } - - /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. - * - * @return the exportRoutePolicy value. - */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; - } - - /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. - * - * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; - } - - /** - * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. - * - * @return the ingressAclId value. - */ - public String ingressAclId() { - return this.ingressAclId; - } - - /** - * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. - * - * @param ingressAclId the ingressAclId value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withIngressAclId(String ingressAclId) { - this.ingressAclId = ingressAclId; - return this; - } - - /** - * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. - * - * @return the egressAclId value. - */ - public String egressAclId() { - return this.egressAclId; - } - - /** - * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. - * - * @param egressAclId the egressAclId value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withEgressAclId(String egressAclId) { - this.egressAclId = egressAclId; - return this; - } - - /** - * Get the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. - * - * @return the isMonitoringEnabled value. - */ - public IsMonitoringEnabled isMonitoringEnabled() { - return this.isMonitoringEnabled; - } - - /** - * Set the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. - * - * @param isMonitoringEnabled the isMonitoringEnabled value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { - this.isMonitoringEnabled = isMonitoringEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectedIPv4Subnets() != null) { - connectedIPv4Subnets().forEach(e -> e.validate()); - } - if (connectedIPv6Subnets() != null) { - connectedIPv6Subnets().forEach(e -> e.validate()); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); - jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); - jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); - jsonWriter.writeStringField("ingressAclId", this.ingressAclId); - jsonWriter.writeStringField("egressAclId", this.egressAclId); - jsonWriter.writeStringField("isMonitoringEnabled", - this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPatchableProperties. - */ - public static InternalNetworkPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPatchableProperties deserializedInternalNetworkPatchableProperties - = new InternalNetworkPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("connectedIPv4Subnets".equals(fieldName)) { - List connectedIPv4Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); - deserializedInternalNetworkPatchableProperties.connectedIPv4Subnets = connectedIPv4Subnets; - } else if ("connectedIPv6Subnets".equals(fieldName)) { - List connectedIPv6Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); - deserializedInternalNetworkPatchableProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.importRoutePolicy - = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.exportRoutePolicy - = ExportRoutePolicy.fromJson(reader); - } else if ("ingressAclId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.ingressAclId = reader.getString(); - } else if ("egressAclId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.egressAclId = reader.getString(); - } else if ("isMonitoringEnabled".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.isMonitoringEnabled - = IsMonitoringEnabled.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java deleted file mode 100644 index ae9359eb3363..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * BGP configuration properties. - */ -@Fluent -public final class InternalNetworkPropertiesBgpConfiguration extends BgpConfiguration { - /* - * ASN of Network Fabric. Example: 65048. - */ - private Long fabricAsn; - - /** - * Creates an instance of InternalNetworkPropertiesBgpConfiguration class. - */ - public InternalNetworkPropertiesBgpConfiguration() { - } - - /** - * Get the fabricAsn property: ASN of Network Fabric. Example: 65048. - * - * @return the fabricAsn value. - */ - @Override - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { - super.withBfdConfiguration(bfdConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration - withDefaultRouteOriginate(BooleanEnumProperty defaultRouteOriginate) { - super.withDefaultRouteOriginate(defaultRouteOriginate); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withAllowAS(Integer allowAS) { - super.withAllowAS(allowAS); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withAllowASOverride(AllowASOverride allowASOverride) { - super.withAllowASOverride(allowASOverride); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withPeerAsn(Long peerAsn) { - super.withPeerAsn(peerAsn); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withIpv4ListenRangePrefixes(List ipv4ListenRangePrefixes) { - super.withIpv4ListenRangePrefixes(ipv4ListenRangePrefixes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withIpv6ListenRangePrefixes(List ipv6ListenRangePrefixes) { - super.withIpv6ListenRangePrefixes(ipv6ListenRangePrefixes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration - withIpv4NeighborAddress(List ipv4NeighborAddress) { - super.withIpv4NeighborAddress(ipv4NeighborAddress); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration - withIpv6NeighborAddress(List ipv6NeighborAddress) { - super.withIpv6NeighborAddress(ipv6NeighborAddress); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesBgpConfiguration withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4NeighborAddress() != null) { - ipv4NeighborAddress().forEach(e -> e.validate()); - } - if (ipv6NeighborAddress() != null) { - ipv6NeighborAddress().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeStringField("defaultRouteOriginate", - defaultRouteOriginate() == null ? null : defaultRouteOriginate().toString()); - jsonWriter.writeNumberField("allowAS", allowAS()); - jsonWriter.writeStringField("allowASOverride", allowASOverride() == null ? null : allowASOverride().toString()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeArrayField("ipv4ListenRangePrefixes", ipv4ListenRangePrefixes(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipv6ListenRangePrefixes", ipv6ListenRangePrefixes(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipv4NeighborAddress", ipv4NeighborAddress(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("ipv6NeighborAddress", ipv6NeighborAddress(), - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPropertiesBgpConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPropertiesBgpConfiguration if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPropertiesBgpConfiguration. - */ - public static InternalNetworkPropertiesBgpConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPropertiesBgpConfiguration deserializedInternalNetworkPropertiesBgpConfiguration - = new InternalNetworkPropertiesBgpConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration.withAnnotation(reader.getString()); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("defaultRouteOriginate".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withDefaultRouteOriginate(BooleanEnumProperty.fromString(reader.getString())); - } else if ("allowAS".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withAllowAS(reader.getNullable(JsonReader::getInt)); - } else if ("allowASOverride".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withAllowASOverride(AllowASOverride.fromString(reader.getString())); - } else if ("fabricASN".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration.fabricAsn - = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { - List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedInternalNetworkPropertiesBgpConfiguration - .withIpv4ListenRangePrefixes(ipv4ListenRangePrefixes); - } else if ("ipv6ListenRangePrefixes".equals(fieldName)) { - List ipv6ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedInternalNetworkPropertiesBgpConfiguration - .withIpv6ListenRangePrefixes(ipv6ListenRangePrefixes); - } else if ("ipv4NeighborAddress".equals(fieldName)) { - List ipv4NeighborAddress - = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); - deserializedInternalNetworkPropertiesBgpConfiguration.withIpv4NeighborAddress(ipv4NeighborAddress); - } else if ("ipv6NeighborAddress".equals(fieldName)) { - List ipv6NeighborAddress - = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); - deserializedInternalNetworkPropertiesBgpConfiguration.withIpv6NeighborAddress(ipv6NeighborAddress); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPropertiesBgpConfiguration; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java deleted file mode 100644 index 2839b8f3fca8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Static Route Configuration properties. - */ -@Fluent -public final class InternalNetworkPropertiesStaticRouteConfiguration extends StaticRouteConfiguration { - /* - * Extension. Example: NoExtension | NPB. - */ - private Extension extension; - - /** - * Creates an instance of InternalNetworkPropertiesStaticRouteConfiguration class. - */ - public InternalNetworkPropertiesStaticRouteConfiguration() { - } - - /** - * Get the extension property: Extension. Example: NoExtension | NPB. - * - * @return the extension value. - */ - public Extension extension() { - return this.extension; - } - - /** - * Set the extension property: Extension. Example: NoExtension | NPB. - * - * @param extension the extension value to set. - * @return the InternalNetworkPropertiesStaticRouteConfiguration object itself. - */ - public InternalNetworkPropertiesStaticRouteConfiguration withExtension(Extension extension) { - this.extension = extension; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesStaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { - super.withBfdConfiguration(bfdConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesStaticRouteConfiguration withIpv4Routes(List ipv4Routes) { - super.withIpv4Routes(ipv4Routes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InternalNetworkPropertiesStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { - super.withIpv6Routes(ipv6Routes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeArrayField("ipv4Routes", ipv4Routes(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("ipv6Routes", ipv6Routes(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPropertiesStaticRouteConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPropertiesStaticRouteConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPropertiesStaticRouteConfiguration. - */ - public static InternalNetworkPropertiesStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPropertiesStaticRouteConfiguration deserializedInternalNetworkPropertiesStaticRouteConfiguration - = new InternalNetworkPropertiesStaticRouteConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bfdConfiguration".equals(fieldName)) { - deserializedInternalNetworkPropertiesStaticRouteConfiguration - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("ipv4Routes".equals(fieldName)) { - List ipv4Routes - = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); - deserializedInternalNetworkPropertiesStaticRouteConfiguration.withIpv4Routes(ipv4Routes); - } else if ("ipv6Routes".equals(fieldName)) { - List ipv6Routes - = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); - deserializedInternalNetworkPropertiesStaticRouteConfiguration.withIpv6Routes(ipv6Routes); - } else if ("extension".equals(fieldName)) { - deserializedInternalNetworkPropertiesStaticRouteConfiguration.extension - = Extension.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPropertiesStaticRouteConfiguration; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java new file mode 100644 index 000000000000..a1a48af141bf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Internal Network RouteType. + */ +public final class InternalNetworkRouteType extends ExpandableStringEnum { + /** + * InternalNetwork Static. + */ + public static final InternalNetworkRouteType STATIC = fromString("Static"); + + /** + * InternalNetwork Bgp. + */ + public static final InternalNetworkRouteType BGP = fromString("Bgp"); + + /** + * Creates a new instance of InternalNetworkRouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InternalNetworkRouteType() { + } + + /** + * Creates or finds a InternalNetworkRouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InternalNetworkRouteType. + */ + public static InternalNetworkRouteType fromString(String name) { + return fromString(name, InternalNetworkRouteType.class); + } + + /** + * Gets known InternalNetworkRouteType values. + * + * @return known InternalNetworkRouteType values. + */ + public static Collection values() { + return values(InternalNetworkRouteType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..9e4fb10f3291 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateRequest.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Internal Network BFD Administrative State request. + */ +@Fluent +public final class InternalNetworkUpdateBfdAdministrativeStateRequest + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private InternalNetworkRouteType routeType; + + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BFD Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of InternalNetworkUpdateBfdAdministrativeStateRequest class. + */ + public InternalNetworkUpdateBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public InternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type that helps to know which bfd we are updating. + * + * @param routeType the routeType value to set. + * @return the InternalNetworkUpdateBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkUpdateBfdAdministrativeStateRequest withRouteType(InternalNetworkRouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Set the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @param neighborAddress the neighborAddress value to set. + * @return the InternalNetworkUpdateBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkUpdateBfdAdministrativeStateRequest withNeighborAddress(String neighborAddress) { + this.neighborAddress = neighborAddress; + return this; + } + + /** + * Get the administrativeState property: BFD Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: BFD Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the InternalNetworkUpdateBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkUpdateBfdAdministrativeStateRequest + withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBfdAdministrativeStateRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkUpdateBfdAdministrativeStateRequest. + */ + public static InternalNetworkUpdateBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBfdAdministrativeStateRequest deserializedInternalNetworkUpdateBfdAdministrativeStateRequest + = new InternalNetworkUpdateBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateRequest.routeType + = InternalNetworkRouteType.fromString(reader.getString()); + } else if ("neighborAddress".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateRequest.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkUpdateBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..26525f30ae6a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponse.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of InternalNetworkUpdateBfdAdministrativeStateResponse. + */ +public interface InternalNetworkUpdateBfdAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Internal Network BFD Administrative State response properties. + * + * @return the properties value. + */ + InternalNetworkUpdateBfdAdministrativeStateResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + InternalNetworkUpdateBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponseProperties.java new file mode 100644 index 000000000000..e9563920fdf7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponseProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BFD Administrative State response properties. + */ +@Immutable +public final class InternalNetworkUpdateBfdAdministrativeStateResponseProperties + implements JsonSerializable { + /* + * NeighborAddress administrative status + */ + private List neighborAddressAdministrativeStatus; + + /** + * Creates an instance of InternalNetworkUpdateBfdAdministrativeStateResponseProperties class. + */ + private InternalNetworkUpdateBfdAdministrativeStateResponseProperties() { + } + + /** + * Get the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + public List neighborAddressAdministrativeStatus() { + return this.neighborAddressAdministrativeStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborAddressAdministrativeStatus", this.neighborAddressAdministrativeStatus, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBfdAdministrativeStateResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBfdAdministrativeStateResponseProperties if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * InternalNetworkUpdateBfdAdministrativeStateResponseProperties. + */ + public static InternalNetworkUpdateBfdAdministrativeStateResponseProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBfdAdministrativeStateResponseProperties deserializedInternalNetworkUpdateBfdAdministrativeStateResponseProperties + = new InternalNetworkUpdateBfdAdministrativeStateResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddressAdministrativeStatus".equals(fieldName)) { + List neighborAddressAdministrativeStatus + = reader.readArray(reader1 -> NeighborAddressBfdAdministrativeStatus.fromJson(reader1)); + deserializedInternalNetworkUpdateBfdAdministrativeStateResponseProperties.neighborAddressAdministrativeStatus + = neighborAddressAdministrativeStatus; + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBfdAdministrativeStateResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateRequest.java new file mode 100644 index 000000000000..1b1b99121dd7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateRequest.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Internal Network Administrative State Request. + */ +@Fluent +public final class InternalNetworkUpdateBgpAdministrativeStateRequest + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BGP Administrative state. + */ + private BgpAdministrativeState administrativeState; + + /** + * Creates an instance of InternalNetworkUpdateBgpAdministrativeStateRequest class. + */ + public InternalNetworkUpdateBgpAdministrativeStateRequest() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Set the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @param neighborAddress the neighborAddress value to set. + * @return the InternalNetworkUpdateBgpAdministrativeStateRequest object itself. + */ + public InternalNetworkUpdateBgpAdministrativeStateRequest withNeighborAddress(String neighborAddress) { + this.neighborAddress = neighborAddress; + return this; + } + + /** + * Get the administrativeState property: BGP Administrative state. + * + * @return the administrativeState value. + */ + public BgpAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: BGP Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the InternalNetworkUpdateBgpAdministrativeStateRequest object itself. + */ + public InternalNetworkUpdateBgpAdministrativeStateRequest + withAdministrativeState(BgpAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBgpAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBgpAdministrativeStateRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkUpdateBgpAdministrativeStateRequest. + */ + public static InternalNetworkUpdateBgpAdministrativeStateRequest fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBgpAdministrativeStateRequest deserializedInternalNetworkUpdateBgpAdministrativeStateRequest + = new InternalNetworkUpdateBgpAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateRequest.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkUpdateBgpAdministrativeStateRequest.administrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBgpAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponse.java new file mode 100644 index 000000000000..b662364a191e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponse.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of InternalNetworkUpdateBgpAdministrativeStateResponse. + */ +public interface InternalNetworkUpdateBgpAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Internal Network BGP Administrative State response properties. + * + * @return the properties value. + */ + InternalNetworkUpdateBgpAdministrativeStateResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + InternalNetworkUpdateBgpAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponseProperties.java new file mode 100644 index 000000000000..335e36e73508 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponseProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BGP Administrative State response properties. + */ +@Immutable +public final class InternalNetworkUpdateBgpAdministrativeStateResponseProperties + implements JsonSerializable { + /* + * NeighborAddress administrative status + */ + private List neighborAddressAdministrativeStatus; + + /** + * Creates an instance of InternalNetworkUpdateBgpAdministrativeStateResponseProperties class. + */ + private InternalNetworkUpdateBgpAdministrativeStateResponseProperties() { + } + + /** + * Get the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + public List neighborAddressAdministrativeStatus() { + return this.neighborAddressAdministrativeStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborAddressAdministrativeStatus", this.neighborAddressAdministrativeStatus, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkUpdateBgpAdministrativeStateResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkUpdateBgpAdministrativeStateResponseProperties if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * InternalNetworkUpdateBgpAdministrativeStateResponseProperties. + */ + public static InternalNetworkUpdateBgpAdministrativeStateResponseProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkUpdateBgpAdministrativeStateResponseProperties deserializedInternalNetworkUpdateBgpAdministrativeStateResponseProperties + = new InternalNetworkUpdateBgpAdministrativeStateResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddressAdministrativeStatus".equals(fieldName)) { + List neighborAddressAdministrativeStatus + = reader.readArray(reader1 -> NeighborAddressBgpAdministrativeStatus.fromJson(reader1)); + deserializedInternalNetworkUpdateBgpAdministrativeStateResponseProperties.neighborAddressAdministrativeStatus + = neighborAddressAdministrativeStatus; + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkUpdateBgpAdministrativeStateResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java index 557083c49124..b7b731488e38 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface InternalNetworks { /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso String internalNetworkName, Context context); /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso InternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,15 +86,13 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return paged collection of InternalNetwork items as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -115,15 +101,13 @@ PagedIterable listByL3IsolationDomain(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * - * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * Executes update operation to enable or disable administrative State for InternalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -133,14 +117,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -150,14 +132,13 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkUpdateBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -168,14 +149,13 @@ CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkUpdateBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBgpAdministrativeStateRequest body, Context context); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -185,14 +165,12 @@ CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -203,14 +181,45 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Retrieves details of InternalNetworks using GET method. + * BFD administrative state for either static or bgp for internalNetwork. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body); + + /** + * BFD administrative state for either static or bgp for internalNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InternalNetworkUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, + InternalNetworkUpdateBfdAdministrativeStateRequest body, Context context); + + /** * Gets a InternalNetworks. * * @param id the resource ID. @@ -222,8 +231,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S InternalNetwork getById(String id); /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param id the resource ID. @@ -236,8 +243,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S Response getByIdWithResponse(String id, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param id the resource ID. @@ -248,8 +253,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S void deleteById(String id); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java index 78988eac2c74..0f6303ec2044 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -56,6 +56,20 @@ public interface InternetGateway { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + String internetGatewayRuleId(); + /** * Gets the ipv4Address property: IPv4 Address of Internet Gateway. * @@ -78,32 +92,32 @@ public interface InternetGateway { GatewayType typePropertiesType(); /** - * Gets the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Gets the internetGatewayType property: Gateway Type of the resource. * - * @return the networkFabricControllerId value. + * @return the internetGatewayType value. */ - String networkFabricControllerId(); + GatewayType internetGatewayType(); /** - * Gets the provisioningState property: Provisioning state of resource. + * Gets the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @return the provisioningState value. + * @return the networkFabricControllerId value. */ - ProvisioningState provisioningState(); + String networkFabricControllerId(); /** - * Gets the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Gets the lastOperation property: Details of the last operation performed on the resource. * - * @return the internetGatewayRuleId value. + * @return the lastOperation value. */ - String internetGatewayRuleId(); + LastOperationProperties lastOperation(); /** - * Gets the annotation property: Switch configuration description. + * Gets the provisioningState property: Provisioning state of resource. * - * @return the annotation value. + * @return the provisioningState value. */ - String annotation(); + ProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -136,8 +150,8 @@ public interface InternetGateway { /** * The entirety of the InternetGateway definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithTypePropertiesType, + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricControllerId, DefinitionStages.WithCreate { } @@ -182,20 +196,7 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithTypePropertiesType withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the InternetGateway definition allowing to specify typePropertiesType. - */ - interface WithTypePropertiesType { - /** - * Specifies the typePropertiesType property: Gateway Type of the resource.. - * - * @param typePropertiesType Gateway Type of the resource. - * @return the next definition stage. - */ - WithNetworkFabricControllerId withTypePropertiesType(GatewayType typePropertiesType); + WithNetworkFabricControllerId withExistingResourceGroup(String resourceGroupName); } /** @@ -215,8 +216,9 @@ interface WithNetworkFabricControllerId { * The stage of the InternetGateway definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithInternetGatewayRuleId, - DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation, + DefinitionStages.WithInternetGatewayRuleId, DefinitionStages.WithTypePropertiesType, + DefinitionStages.WithInternetGatewayType { /** * Executes the create request. * @@ -246,6 +248,19 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the InternetGateway definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + /** * The stage of the InternetGateway definition allowing to specify internetGatewayRuleId. */ @@ -260,16 +275,29 @@ interface WithInternetGatewayRuleId { } /** - * The stage of the InternetGateway definition allowing to specify annotation. + * The stage of the InternetGateway definition allowing to specify typePropertiesType. */ - interface WithAnnotation { + interface WithTypePropertiesType { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the typePropertiesType property: Gateway Type of the resource.. * - * @param annotation Switch configuration description. + * @param typePropertiesType Gateway Type of the resource. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withTypePropertiesType(GatewayType typePropertiesType); + } + + /** + * The stage of the InternetGateway definition allowing to specify internetGatewayType. + */ + interface WithInternetGatewayType { + /** + * Specifies the internetGatewayType property: Gateway Type of the resource.. + * + * @param internetGatewayType Gateway Type of the resource. + * @return the next definition stage. + */ + WithCreate withInternetGatewayType(GatewayType internetGatewayType); } } @@ -309,7 +337,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java index 3ef32bb95f25..e04250ea2b0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchProperties; import java.io.IOException; import java.util.Map; @@ -20,7 +20,7 @@ public final class InternetGatewayPatch extends TagsUpdate { /* * Resource properties. */ - private InternetGatewayPatchableProperties innerProperties; + private InternetGatewayPatchProperties innerProperties; /** * Creates an instance of InternetGatewayPatch class. @@ -33,7 +33,7 @@ public InternetGatewayPatch() { * * @return the innerProperties value. */ - private InternetGatewayPatchableProperties innerProperties() { + private InternetGatewayPatchProperties innerProperties() { return this.innerProperties; } @@ -63,24 +63,12 @@ public String internetGatewayRuleId() { */ public InternetGatewayPatch withInternetGatewayRuleId(String internetGatewayRuleId) { if (this.innerProperties() == null) { - this.innerProperties = new InternetGatewayPatchableProperties(); + this.innerProperties = new InternetGatewayPatchProperties(); } this.innerProperties().withInternetGatewayRuleId(internetGatewayRuleId); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -111,8 +99,7 @@ public static InternetGatewayPatch fromJson(JsonReader jsonReader) throws IOExce Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedInternetGatewayPatch.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedInternetGatewayPatch.innerProperties - = InternetGatewayPatchableProperties.fromJson(reader); + deserializedInternetGatewayPatch.innerProperties = InternetGatewayPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java index 31eccf6b4433..d30582552f96 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -64,6 +64,13 @@ public interface InternetGatewayRule { */ RuleProperties ruleProperties(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the provisioningState property: Provisioning state of the resource. * @@ -261,7 +268,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java index ab102b25d8cb..f6e83e7bd78e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * The Internet Gateway Rules patch resource definition. */ @Fluent -public final class InternetGatewayRulePatch extends TagsUpdate { +public final class InternetGatewayRulePatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /** * Creates an instance of InternetGatewayRulePatch class. */ @@ -23,21 +29,23 @@ public InternetGatewayRulePatch() { } /** - * {@inheritDoc} + * Get the tags property: Resource tags. + * + * @return the tags value. */ - @Override - public InternetGatewayRulePatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Validates the instance. + * Set the tags property: Resource tags. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param tags the tags value to set. + * @return the InternetGatewayRulePatch object itself. */ - @Override - public void validate() { + public InternetGatewayRulePatch withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -46,7 +54,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -67,7 +75,7 @@ public static InternetGatewayRulePatch fromJson(JsonReader jsonReader) throws IO if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedInternetGatewayRulePatch.withTags(tags); + deserializedInternetGatewayRulePatch.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java index 612149bf3c65..eff6a3687634 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface InternetGatewayRules { /** - * Gets an Internet Gateway Rule. - * * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou String internetGatewayRuleName, Context context); /** - * Gets an Internet Gateway Rule. - * * Gets an Internet Gateway Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou InternetGatewayRule getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteByResourceGroup(String resourceGroupName, String internetGatewayRuleName); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou void delete(String resourceGroupName, String internetGatewayRuleName, Context context); /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Internet Gateway Rules by resource group. - * * Implements Internet Gateway Rules list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Internet Gateway Rules by subscription. - * * List all Internet Gateway rules in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGatewayRule items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an Internet Gateway Rule. - * * Gets an Internet Gateway Rule resource. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou InternetGatewayRule getById(String id); /** - * Gets an Internet Gateway Rule. - * * Gets an Internet Gateway Rule resource. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java index 6e55430b8fdc..d9fd55a1fef4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface InternetGateways { /** - * Retrieves details of Network Fabric Service Internet Gateway. - * * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam Context context); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * * Implements Gateway GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam InternetGateway getByResourceGroup(String resourceGroupName, String internetGatewayName); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void deleteByResourceGroup(String resourceGroupName, String internetGatewayName); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void delete(String resourceGroupName, String internetGatewayName, Context context); /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Internet Gateways by resource group. - * * Displays Internet Gateways list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Internet Gateways by subscription. - * * Displays Internet Gateways list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternetGateways as paginated response with {@link PagedIterable}. + * @return paged collection of InternetGateway items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * * Implements Gateway GET method. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam InternetGateway getById(String id); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * * Implements Gateway GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void deleteById(String id); /** - * Deletes a Network Fabric Service Internet Gateway. - * * Execute a delete on Network Fabric Service Internet Gateway. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java index 5e3ac10f5e0a..1d43f8096fdc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class IpAddressType extends ExpandableStringEnum { /** - * Static value IPv4 for IpAddressType. + * IPv4 IP address. */ public static final IpAddressType IPV4 = fromString("IPv4"); /** - * Static value IPv6 for IpAddressType. + * IPv6 IP address. */ public static final IpAddressType IPV6 = fromString("IPv6"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java index 1dbe02612e66..de818ba72997 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpCommunities { /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S IpCommunity getByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IP Communities by subscription. - * * Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return paged collection of IpCommunity items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S IpCommunity getById(String id); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Response getByIdWithResponse(String id, Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteById(String id); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java index 993c926c0e71..0e430d3fb6f7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -57,6 +57,34 @@ public interface IpCommunity { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the ipCommunityRules property: List of IP Community Rules. + * + * @return the ipCommunityRules value. + */ + List ipCommunityRules(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -78,20 +106,6 @@ public interface IpCommunity { */ AdministrativeState administrativeState(); - /** - * Gets the ipCommunityRules property: List of IP Community Rules. - * - * @return the ipCommunityRules value. - */ - List ipCommunityRules(); - - /** - * Gets the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - String annotation(); - /** * Gets the region of the resource. * @@ -124,7 +138,7 @@ public interface IpCommunity { * The entirety of the IpCommunity definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithIpCommunityRules, DefinitionStages.WithCreate { } /** @@ -168,15 +182,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithIpCommunityRules withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the IpCommunity definition allowing to specify ipCommunityRules. + */ + interface WithIpCommunityRules { + /** + * Specifies the ipCommunityRules property: List of IP Community Rules.. + * + * @param ipCommunityRules List of IP Community Rules. + * @return the next definition stage. + */ + WithCreate withIpCommunityRules(List ipCommunityRules); } /** * The stage of the IpCommunity definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIpCommunityRules, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -206,19 +232,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the IpCommunity definition allowing to specify ipCommunityRules. - */ - interface WithIpCommunityRules { - /** - * Specifies the ipCommunityRules property: List of IP Community Rules.. - * - * @param ipCommunityRules List of IP Community Rules. - * @return the next definition stage. - */ - WithCreate withIpCommunityRules(List ipCommunityRules); - } - /** * The stage of the IpCommunity definition allowing to specify annotation. */ @@ -269,7 +282,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java deleted file mode 100644 index 94ee21090775..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community add operation properties. - */ -@Fluent -public class IpCommunityAddOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList add; - - /** - * Creates an instance of IpCommunityAddOperationProperties class. - */ - public IpCommunityAddOperationProperties() { - } - - /** - * Get the add property: List of IP Community IDs. - * - * @return the add value. - */ - public IpCommunityIdList add() { - return this.add; - } - - /** - * Set the add property: List of IP Community IDs. - * - * @param add the add value to set. - * @return the IpCommunityAddOperationProperties object itself. - */ - public IpCommunityAddOperationProperties withAdd(IpCommunityIdList add) { - this.add = add; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (add() != null) { - add().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", this.add); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunityAddOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunityAddOperationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunityAddOperationProperties. - */ - public static IpCommunityAddOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunityAddOperationProperties deserializedIpCommunityAddOperationProperties - = new IpCommunityAddOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("add".equals(fieldName)) { - deserializedIpCommunityAddOperationProperties.add = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunityAddOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java deleted file mode 100644 index df4f8b1203db..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community delete operation properties. - */ -@Fluent -public class IpCommunityDeleteOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList delete; - - /** - * Creates an instance of IpCommunityDeleteOperationProperties class. - */ - public IpCommunityDeleteOperationProperties() { - } - - /** - * Get the delete property: List of IP Community IDs. - * - * @return the delete value. - */ - public IpCommunityIdList delete() { - return this.delete; - } - - /** - * Set the delete property: List of IP Community IDs. - * - * @param delete the delete value to set. - * @return the IpCommunityDeleteOperationProperties object itself. - */ - public IpCommunityDeleteOperationProperties withDelete(IpCommunityIdList delete) { - this.delete = delete; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delete() != null) { - delete().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("delete", this.delete); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunityDeleteOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunityDeleteOperationProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunityDeleteOperationProperties. - */ - public static IpCommunityDeleteOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunityDeleteOperationProperties deserializedIpCommunityDeleteOperationProperties - = new IpCommunityDeleteOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("delete".equals(fieldName)) { - deserializedIpCommunityDeleteOperationProperties.delete = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunityDeleteOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java index c07ed87faf07..15e9ad2f7107 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * IP Community ID list properties. */ @Fluent -public class IpCommunityIdList implements JsonSerializable { +public final class IpCommunityIdList implements JsonSerializable { /* * List of IP Community resource IDs. */ @@ -48,14 +48,6 @@ public IpCommunityIdList withIpCommunityIds(List ipCommunityIds) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java index f1a643970f28..7bf7d63f9490 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -70,18 +70,6 @@ public IpCommunityPatch withIpCommunityRules(List ipCommunityRu return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java index ca86f70b5935..9f2ac40d4d7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -130,25 +129,6 @@ public IpCommunityRule withCommunityMembers(List communityMembers) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpCommunityRule")); - } - if (communityMembers() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property communityMembers in model IpCommunityRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpCommunityRule.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java deleted file mode 100644 index 11d66e2105e0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community set operation properties. - */ -@Fluent -public class IpCommunitySetOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList set; - - /** - * Creates an instance of IpCommunitySetOperationProperties class. - */ - public IpCommunitySetOperationProperties() { - } - - /** - * Get the set property: List of IP Community IDs. - * - * @return the set value. - */ - public IpCommunityIdList set() { - return this.set; - } - - /** - * Set the set property: List of IP Community IDs. - * - * @param set the set value to set. - * @return the IpCommunitySetOperationProperties object itself. - */ - public IpCommunitySetOperationProperties withSet(IpCommunityIdList set) { - this.set = set; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (set() != null) { - set().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("set", this.set); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunitySetOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunitySetOperationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunitySetOperationProperties. - */ - public static IpCommunitySetOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunitySetOperationProperties deserializedIpCommunitySetOperationProperties - = new IpCommunitySetOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("set".equals(fieldName)) { - deserializedIpCommunitySetOperationProperties.set = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunitySetOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java index 6e4d36b57bb8..f5e6bedd0a47 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpExtendedCommunities { /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou String ipExtendedCommunityName, Context context); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou IpExtendedCommunity getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou void delete(String resourceGroupName, String ipExtendedCommunityName, Context context); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou IpExtendedCommunity getById(String id); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java index 21990b53dc6a..d1da80035655 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -57,6 +57,34 @@ public interface IpExtendedCommunity { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. + */ + List ipExtendedCommunityRules(); + + /** + * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -78,20 +106,6 @@ public interface IpExtendedCommunity { */ AdministrativeState administrativeState(); - /** - * Gets the ipExtendedCommunityRules property: List of IP Extended Community Rules. - * - * @return the ipExtendedCommunityRules value. - */ - List ipExtendedCommunityRules(); - - /** - * Gets the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - String annotation(); - /** * Gets the region of the resource. * @@ -269,7 +283,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java deleted file mode 100644 index 0505ca808086..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community add operation properties. - */ -@Fluent -public class IpExtendedCommunityAddOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList add; - - /** - * Creates an instance of IpExtendedCommunityAddOperationProperties class. - */ - public IpExtendedCommunityAddOperationProperties() { - } - - /** - * Get the add property: List of IP Extended Community IDs. - * - * @return the add value. - */ - public IpExtendedCommunityIdList add() { - return this.add; - } - - /** - * Set the add property: List of IP Extended Community IDs. - * - * @param add the add value to set. - * @return the IpExtendedCommunityAddOperationProperties object itself. - */ - public IpExtendedCommunityAddOperationProperties withAdd(IpExtendedCommunityIdList add) { - this.add = add; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (add() != null) { - add().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", this.add); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityAddOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityAddOperationProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunityAddOperationProperties. - */ - public static IpExtendedCommunityAddOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityAddOperationProperties deserializedIpExtendedCommunityAddOperationProperties - = new IpExtendedCommunityAddOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("add".equals(fieldName)) { - deserializedIpExtendedCommunityAddOperationProperties.add - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityAddOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java deleted file mode 100644 index a4aeafbb1c20..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community delete operation properties. - */ -@Fluent -public class IpExtendedCommunityDeleteOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList delete; - - /** - * Creates an instance of IpExtendedCommunityDeleteOperationProperties class. - */ - public IpExtendedCommunityDeleteOperationProperties() { - } - - /** - * Get the delete property: List of IP Extended Community IDs. - * - * @return the delete value. - */ - public IpExtendedCommunityIdList delete() { - return this.delete; - } - - /** - * Set the delete property: List of IP Extended Community IDs. - * - * @param delete the delete value to set. - * @return the IpExtendedCommunityDeleteOperationProperties object itself. - */ - public IpExtendedCommunityDeleteOperationProperties withDelete(IpExtendedCommunityIdList delete) { - this.delete = delete; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delete() != null) { - delete().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("delete", this.delete); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityDeleteOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityDeleteOperationProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunityDeleteOperationProperties. - */ - public static IpExtendedCommunityDeleteOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityDeleteOperationProperties deserializedIpExtendedCommunityDeleteOperationProperties - = new IpExtendedCommunityDeleteOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("delete".equals(fieldName)) { - deserializedIpExtendedCommunityDeleteOperationProperties.delete - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityDeleteOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java index 8c836870deba..3b3ccf457b70 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * IP Extended Community Id list properties. */ @Fluent -public class IpExtendedCommunityIdList implements JsonSerializable { +public final class IpExtendedCommunityIdList implements JsonSerializable { /* * List of IP Extended Community resource IDs. */ @@ -48,14 +48,6 @@ public IpExtendedCommunityIdList withIpExtendedCommunityIds(List ipExten return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java index 19cc4f9d799c..9753e2ae054b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -94,18 +94,6 @@ public List ipExtendedCommunityRules() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java deleted file mode 100644 index d75a2895016c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * IP Extended Community patchable properties. - */ -@Fluent -public class IpExtendedCommunityPatchableProperties - implements JsonSerializable { - /* - * List of IP Extended Community Rules. - */ - private List ipExtendedCommunityRules; - - /** - * Creates an instance of IpExtendedCommunityPatchableProperties class. - */ - public IpExtendedCommunityPatchableProperties() { - } - - /** - * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. - * - * @return the ipExtendedCommunityRules value. - */ - public List ipExtendedCommunityRules() { - return this.ipExtendedCommunityRules; - } - - /** - * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. - * - * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. - * @return the IpExtendedCommunityPatchableProperties object itself. - */ - public IpExtendedCommunityPatchableProperties - withIpExtendedCommunityRules(List ipExtendedCommunityRules) { - this.ipExtendedCommunityRules = ipExtendedCommunityRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipExtendedCommunityRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityPatchableProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityPatchableProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityPatchableProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IpExtendedCommunityPatchableProperties. - */ - public static IpExtendedCommunityPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityPatchableProperties deserializedIpExtendedCommunityPatchableProperties - = new IpExtendedCommunityPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipExtendedCommunityRules".equals(fieldName)) { - List ipExtendedCommunityRules - = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); - deserializedIpExtendedCommunityPatchableProperties.ipExtendedCommunityRules - = ipExtendedCommunityRules; - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java index f157e486efe9..23231315c22f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -111,25 +110,6 @@ public IpExtendedCommunityRule withRouteTargets(List routeTargets) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpExtendedCommunityRule")); - } - if (routeTargets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property routeTargets in model IpExtendedCommunityRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityRule.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java deleted file mode 100644 index 8f29e1acbb9a..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community set operation properties. - */ -@Fluent -public class IpExtendedCommunitySetOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList set; - - /** - * Creates an instance of IpExtendedCommunitySetOperationProperties class. - */ - public IpExtendedCommunitySetOperationProperties() { - } - - /** - * Get the set property: List of IP Extended Community IDs. - * - * @return the set value. - */ - public IpExtendedCommunityIdList set() { - return this.set; - } - - /** - * Set the set property: List of IP Extended Community IDs. - * - * @param set the set value to set. - * @return the IpExtendedCommunitySetOperationProperties object itself. - */ - public IpExtendedCommunitySetOperationProperties withSet(IpExtendedCommunityIdList set) { - this.set = set; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (set() != null) { - set().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("set", this.set); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunitySetOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunitySetOperationProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunitySetOperationProperties. - */ - public static IpExtendedCommunitySetOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunitySetOperationProperties deserializedIpExtendedCommunitySetOperationProperties - = new IpExtendedCommunitySetOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("set".equals(fieldName)) { - deserializedIpExtendedCommunitySetOperationProperties.set - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunitySetOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java new file mode 100644 index 000000000000..96e202da507e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * IP Group properties. + */ +@Fluent +public final class IpGroupPatchProperties implements JsonSerializable { + /* + * IP Group name. + */ + private String name; + + /* + * IP Address type. + */ + private IpAddressType ipAddressType; + + /* + * List of IP Prefixes. + */ + private List ipPrefixes; + + /** + * Creates an instance of IpGroupPatchProperties class. + */ + public IpGroupPatchProperties() { + } + + /** + * Get the name property: IP Group name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: IP Group name. + * + * @param name the name value to set. + * @return the IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ipAddressType property: IP Address type. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP Address type. + * + * @param ipAddressType the ipAddressType value to set. + * @return the IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the ipPrefixes property: List of IP Prefixes. + * + * @return the ipPrefixes value. + */ + public List ipPrefixes() { + return this.ipPrefixes; + } + + /** + * Set the ipPrefixes property: List of IP Prefixes. + * + * @param ipPrefixes the ipPrefixes value to set. + * @return the IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties withIpPrefixes(List ipPrefixes) { + this.ipPrefixes = ipPrefixes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("ipPrefixes", this.ipPrefixes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IpGroupPatchProperties. + */ + public static IpGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpGroupPatchProperties deserializedIpGroupPatchProperties = new IpGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedIpGroupPatchProperties.name = reader.getString(); + } else if ("ipAddressType".equals(fieldName)) { + deserializedIpGroupPatchProperties.ipAddressType = IpAddressType.fromString(reader.getString()); + } else if ("ipPrefixes".equals(fieldName)) { + List ipPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedIpGroupPatchProperties.ipPrefixes = ipPrefixes; + } else { + reader.skipChildren(); + } + } + + return deserializedIpGroupPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java index 129230ab77c7..27a1fc77ddc6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,14 +98,6 @@ public IpGroupProperties withIpPrefixes(List ipPrefixes) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java index fd1e5a465346..595df8683e23 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -123,14 +123,6 @@ public IpMatchCondition withIpGroupNames(List ipGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java new file mode 100644 index 000000000000..a37dbcdc5840 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the condition that can be filtered using the selected IPs. + */ +@Fluent +public final class IpMatchConditionPatch implements JsonSerializable { + /* + * IP Address type that needs to be matched. + */ + private SourceDestinationType type; + + /* + * IP Prefix Type that needs to be matched. + */ + private PrefixType prefixType; + + /* + * The list of IP Prefixes that need to be matched. + */ + private List ipPrefixValues; + + /* + * The List of IP Group Names that need to be matched. + */ + private List ipGroupNames; + + /** + * Creates an instance of IpMatchConditionPatch class. + */ + public IpMatchConditionPatch() { + } + + /** + * Get the type property: IP Address type that needs to be matched. + * + * @return the type value. + */ + public SourceDestinationType type() { + return this.type; + } + + /** + * Set the type property: IP Address type that needs to be matched. + * + * @param type the type value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withType(SourceDestinationType type) { + this.type = type; + return this; + } + + /** + * Get the prefixType property: IP Prefix Type that needs to be matched. + * + * @return the prefixType value. + */ + public PrefixType prefixType() { + return this.prefixType; + } + + /** + * Set the prefixType property: IP Prefix Type that needs to be matched. + * + * @param prefixType the prefixType value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withPrefixType(PrefixType prefixType) { + this.prefixType = prefixType; + return this; + } + + /** + * Get the ipPrefixValues property: The list of IP Prefixes that need to be matched. + * + * @return the ipPrefixValues value. + */ + public List ipPrefixValues() { + return this.ipPrefixValues; + } + + /** + * Set the ipPrefixValues property: The list of IP Prefixes that need to be matched. + * + * @param ipPrefixValues the ipPrefixValues value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withIpPrefixValues(List ipPrefixValues) { + this.ipPrefixValues = ipPrefixValues; + return this; + } + + /** + * Get the ipGroupNames property: The List of IP Group Names that need to be matched. + * + * @return the ipGroupNames value. + */ + public List ipGroupNames() { + return this.ipGroupNames; + } + + /** + * Set the ipGroupNames property: The List of IP Group Names that need to be matched. + * + * @param ipGroupNames the ipGroupNames value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withIpGroupNames(List ipGroupNames) { + this.ipGroupNames = ipGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("prefixType", this.prefixType == null ? null : this.prefixType.toString()); + jsonWriter.writeArrayField("ipPrefixValues", this.ipPrefixValues, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipGroupNames", this.ipGroupNames, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpMatchConditionPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IpMatchConditionPatch. + */ + public static IpMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpMatchConditionPatch deserializedIpMatchConditionPatch = new IpMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedIpMatchConditionPatch.type = SourceDestinationType.fromString(reader.getString()); + } else if ("prefixType".equals(fieldName)) { + deserializedIpMatchConditionPatch.prefixType = PrefixType.fromString(reader.getString()); + } else if ("ipPrefixValues".equals(fieldName)) { + List ipPrefixValues = reader.readArray(reader1 -> reader1.getString()); + deserializedIpMatchConditionPatch.ipPrefixValues = ipPrefixValues; + } else if ("ipGroupNames".equals(fieldName)) { + List ipGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedIpMatchConditionPatch.ipGroupNames = ipGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedIpMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java index 326c6a37d933..0b2aa2a33ccf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -57,6 +57,34 @@ public interface IpPrefix { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. + */ + List ipPrefixRules(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -78,20 +106,6 @@ public interface IpPrefix { */ AdministrativeState administrativeState(); - /** - * Gets the ipPrefixRules property: The list of IP Prefix Rules. - * - * @return the ipPrefixRules value. - */ - List ipPrefixRules(); - - /** - * Gets the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - String annotation(); - /** * Gets the region of the resource. * @@ -124,7 +138,7 @@ public interface IpPrefix { * The entirety of the IpPrefix definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithIpPrefixRules, DefinitionStages.WithCreate { } /** @@ -168,15 +182,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithIpPrefixRules withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the IpPrefix definition allowing to specify ipPrefixRules. + */ + interface WithIpPrefixRules { + /** + * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. + * + * @param ipPrefixRules The list of IP Prefix Rules. + * @return the next definition stage. + */ + WithCreate withIpPrefixRules(List ipPrefixRules); } /** * The stage of the IpPrefix definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIpPrefixRules, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -206,19 +232,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the IpPrefix definition allowing to specify ipPrefixRules. - */ - interface WithIpPrefixRules { - /** - * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. - * - * @param ipPrefixRules The list of IP Prefix Rules. - * @return the next definition stage. - */ - WithCreate withIpPrefixRules(List ipPrefixRules); - } - /** * The stage of the IpPrefix definition allowing to specify annotation. */ @@ -243,7 +256,7 @@ interface WithAnnotation { /** * The template for IpPrefix update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIpPrefixRules, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithAnnotation, UpdateStages.WithIpPrefixRules { /** * Executes the update request. * @@ -269,7 +282,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,29 +291,29 @@ interface WithTags { } /** - * The stage of the IpPrefix update allowing to specify ipPrefixRules. + * The stage of the IpPrefix update allowing to specify annotation. */ - interface WithIpPrefixRules { + interface WithAnnotation { /** - * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. + * Specifies the annotation property: Switch configuration description.. * - * @param ipPrefixRules The list of IP Prefix Rules. + * @param annotation Switch configuration description. * @return the next definition stage. */ - Update withIpPrefixRules(List ipPrefixRules); + Update withAnnotation(String annotation); } /** - * The stage of the IpPrefix update allowing to specify annotation. + * The stage of the IpPrefix update allowing to specify ipPrefixRules. */ - interface WithAnnotation { + interface WithIpPrefixRules { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. * - * @param annotation Switch configuration description. + * @param ipPrefixRules The list of IP Prefix Rules. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withIpPrefixRules(List ipPrefixRules); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java index 598da134c713..b72c03676be9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -48,63 +48,51 @@ public IpPrefixPatch withTags(Map tags) { } /** - * Get the ipPrefixRules property: The list of IP Prefix Rules. + * Get the annotation property: Switch configuration description. * - * @return the ipPrefixRules value. + * @return the annotation value. */ - public List ipPrefixRules() { - return this.innerProperties() == null ? null : this.innerProperties().ipPrefixRules(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the ipPrefixRules property: The list of IP Prefix Rules. + * Set the annotation property: Switch configuration description. * - * @param ipPrefixRules the ipPrefixRules value to set. + * @param annotation the annotation value to set. * @return the IpPrefixPatch object itself. */ - public IpPrefixPatch withIpPrefixRules(List ipPrefixRules) { + public IpPrefixPatch withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new IpPrefixPatchProperties(); } - this.innerProperties().withIpPrefixRules(ipPrefixRules); + this.innerProperties().withAnnotation(annotation); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the ipPrefixRules property: The list of IP Prefix Rules. * - * @return the annotation value. + * @return the ipPrefixRules value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public List ipPrefixRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipPrefixRules(); } /** - * Set the annotation property: Switch configuration description. + * Set the ipPrefixRules property: The list of IP Prefix Rules. * - * @param annotation the annotation value to set. + * @param ipPrefixRules the ipPrefixRules value to set. * @return the IpPrefixPatch object itself. */ - public IpPrefixPatch withAnnotation(String annotation) { + public IpPrefixPatch withIpPrefixRules(List ipPrefixRules) { if (this.innerProperties() == null) { this.innerProperties = new IpPrefixPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withIpPrefixRules(ipPrefixRules); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java deleted file mode 100644 index d1f24e27f5cc..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * IP Prefix patchable properties. - */ -@Fluent -public class IpPrefixPatchableProperties implements JsonSerializable { - /* - * The list of IP Prefix Rules. - */ - private List ipPrefixRules; - - /** - * Creates an instance of IpPrefixPatchableProperties class. - */ - public IpPrefixPatchableProperties() { - } - - /** - * Get the ipPrefixRules property: The list of IP Prefix Rules. - * - * @return the ipPrefixRules value. - */ - public List ipPrefixRules() { - return this.ipPrefixRules; - } - - /** - * Set the ipPrefixRules property: The list of IP Prefix Rules. - * - * @param ipPrefixRules the ipPrefixRules value to set. - * @return the IpPrefixPatchableProperties object itself. - */ - public IpPrefixPatchableProperties withIpPrefixRules(List ipPrefixRules) { - this.ipPrefixRules = ipPrefixRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipPrefixRules() != null) { - ipPrefixRules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpPrefixPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpPrefixPatchableProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpPrefixPatchableProperties. - */ - public static IpPrefixPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpPrefixPatchableProperties deserializedIpPrefixPatchableProperties = new IpPrefixPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipPrefixRules".equals(fieldName)) { - List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); - deserializedIpPrefixPatchableProperties.ipPrefixRules = ipPrefixRules; - } else { - reader.skipChildren(); - } - } - - return deserializedIpPrefixPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java index e61b46ecb6a9..b01d31e5938d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -160,24 +159,6 @@ public IpPrefixRule withSubnetMaskLength(String subnetMaskLength) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpPrefixRule")); - } - if (networkPrefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property networkPrefix in model IpPrefixRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixRule.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java index 4e0ebab2d77e..f70d8b0cfea2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpPrefixes { /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -28,8 +26,6 @@ public interface IpPrefixes { Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, Context context); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -42,8 +38,6 @@ public interface IpPrefixes { IpPrefix getByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -55,8 +49,6 @@ public interface IpPrefixes { void deleteByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -69,21 +61,17 @@ public interface IpPrefixes { void delete(String resourceGroupName, String ipPrefixName, Context context); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,37 +79,31 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return paged collection of IpPrefix items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param id the resource ID. @@ -133,8 +115,6 @@ public interface IpPrefixes { IpPrefix getById(String id); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param id the resource ID. @@ -147,8 +127,6 @@ public interface IpPrefixes { Response getByIdWithResponse(String id, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param id the resource ID. @@ -159,8 +137,6 @@ public interface IpPrefixes { void deleteById(String id); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java index 81fbef7c726f..7973a6663a0a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class IsManagementType extends ExpandableStringEnum { /** - * Static value True for IsManagementType. + * IsManagementType-True. */ public static final IsManagementType TRUE = fromString("True"); /** - * Static value False for IsManagementType. + * IsManagementType-False. */ public static final IsManagementType FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java index ec69389b774e..e79ad7b54e0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class IsMonitoringEnabled extends ExpandableStringEnum { /** - * Static value True for IsMonitoringEnabled. + * IsMonitoringEnabled-True. */ public static final IsMonitoringEnabled TRUE = fromString("True"); /** - * Static value False for IsMonitoringEnabled. + * IsMonitoringEnabled-False. */ public static final IsMonitoringEnabled FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java index 67e2c36c77ca..bdfe22a30130 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,12 +13,12 @@ */ public final class IsWorkloadManagementNetworkEnabled extends ExpandableStringEnum { /** - * Static value True for IsWorkloadManagementNetworkEnabled. + * IsWorkloadManagementNetworkEnabled-True. */ public static final IsWorkloadManagementNetworkEnabled TRUE = fromString("True"); /** - * Static value False for IsWorkloadManagementNetworkEnabled. + * IsWorkloadManagementNetworkEnabled-False. */ public static final IsWorkloadManagementNetworkEnabled FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java new file mode 100644 index 000000000000..85852b3ecd16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Isolation Domain Properties. + */ +@Fluent +public final class IsolationDomainPatchProperties implements JsonSerializable { + /* + * Type of encapsulation. + */ + private Encapsulation encapsulation; + + /* + * List of Neighbor Group IDs. + */ + private List neighborGroupIds; + + /** + * Creates an instance of IsolationDomainPatchProperties class. + */ + public IsolationDomainPatchProperties() { + } + + /** + * Get the encapsulation property: Type of encapsulation. + * + * @return the encapsulation value. + */ + public Encapsulation encapsulation() { + return this.encapsulation; + } + + /** + * Set the encapsulation property: Type of encapsulation. + * + * @param encapsulation the encapsulation value to set. + * @return the IsolationDomainPatchProperties object itself. + */ + public IsolationDomainPatchProperties withEncapsulation(Encapsulation encapsulation) { + this.encapsulation = encapsulation; + return this; + } + + /** + * Get the neighborGroupIds property: List of Neighbor Group IDs. + * + * @return the neighborGroupIds value. + */ + public List neighborGroupIds() { + return this.neighborGroupIds; + } + + /** + * Set the neighborGroupIds property: List of Neighbor Group IDs. + * + * @param neighborGroupIds the neighborGroupIds value to set. + * @return the IsolationDomainPatchProperties object itself. + */ + public IsolationDomainPatchProperties withNeighborGroupIds(List neighborGroupIds) { + this.neighborGroupIds = neighborGroupIds; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("encapsulation", this.encapsulation == null ? null : this.encapsulation.toString()); + jsonWriter.writeArrayField("neighborGroupIds", this.neighborGroupIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsolationDomainPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsolationDomainPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IsolationDomainPatchProperties. + */ + public static IsolationDomainPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsolationDomainPatchProperties deserializedIsolationDomainPatchProperties + = new IsolationDomainPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("encapsulation".equals(fieldName)) { + deserializedIsolationDomainPatchProperties.encapsulation + = Encapsulation.fromString(reader.getString()); + } else if ("neighborGroupIds".equals(fieldName)) { + List neighborGroupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedIsolationDomainPatchProperties.neighborGroupIds = neighborGroupIds; + } else { + reader.skipChildren(); + } + } + + return deserializedIsolationDomainPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java index 553f0a1fac29..baf6f356004d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public IsolationDomainProperties withNeighborGroupIds(List neighborGroup return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java index 15caa84bb8bc..6fd7e56da23b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -49,6 +49,13 @@ public interface L2IsolationDomain { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -77,6 +84,28 @@ public interface L2IsolationDomain { */ Integer mtu(); + /** + * Gets the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @return the extendedVlan value. + */ + ExtendedVlan extendedVlan(); + + /** + * Gets the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + String networkToNetworkInterconnectId(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -215,8 +244,9 @@ interface WithVlanId { * The stage of the L2IsolationDomain definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithMtu, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithMtu, + DefinitionStages.WithExtendedVlan, DefinitionStages.WithNetworkToNetworkInterconnectId, + DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -246,6 +276,19 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the L2IsolationDomain definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the L2IsolationDomain definition allowing to specify mtu. */ @@ -259,6 +302,34 @@ interface WithMtu { WithCreate withMtu(Integer mtu); } + /** + * The stage of the L2IsolationDomain definition allowing to specify extendedVlan. + */ + interface WithExtendedVlan { + /** + * Specifies the extendedVlan property: Extended VLAN status, default value is Disabled.. + * + * @param extendedVlan Extended VLAN status, default value is Disabled. + * @return the next definition stage. + */ + WithCreate withExtendedVlan(ExtendedVlan extendedVlan); + } + + /** + * The stage of the L2IsolationDomain definition allowing to specify networkToNetworkInterconnectId. + */ + interface WithNetworkToNetworkInterconnectId { + /** + * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the + * networkToNetworkInterconnectId of the L2 ISD resource.. + * + * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD + * resource. + * @return the next definition stage. + */ + WithCreate withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); + } + /** * The stage of the L2IsolationDomain definition allowing to specify annotation. */ @@ -283,7 +354,8 @@ interface WithAnnotation { /** * The template for L2IsolationDomain update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithMtu, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithMtu, + UpdateStages.WithExtendedVlan, UpdateStages.WithNetworkToNetworkInterconnectId, UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -309,7 +381,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -317,6 +389,19 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the L2IsolationDomain update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + /** * The stage of the L2IsolationDomain update allowing to specify mtu. */ @@ -330,6 +415,34 @@ interface WithMtu { Update withMtu(Integer mtu); } + /** + * The stage of the L2IsolationDomain update allowing to specify extendedVlan. + */ + interface WithExtendedVlan { + /** + * Specifies the extendedVlan property: Extended VLAN status.. + * + * @param extendedVlan Extended VLAN status. + * @return the next definition stage. + */ + Update withExtendedVlan(ExtendedVlan extendedVlan); + } + + /** + * The stage of the L2IsolationDomain update allowing to specify networkToNetworkInterconnectId. + */ + interface WithNetworkToNetworkInterconnectId { + /** + * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the + * networkToNetworkInterconnectId of the L2 ISD resource.. + * + * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD + * resource. + * @return the next definition stage. + */ + Update withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); + } + /** * The stage of the L2IsolationDomain update allowing to specify annotation. */ @@ -360,21 +473,17 @@ interface WithAnnotation { L2IsolationDomain refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param body Request payload. @@ -382,16 +491,16 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** * Validates the configuration of the resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -402,31 +511,27 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java index 6985afb40cc1..68b31d991ea5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -18,10 +18,15 @@ @Fluent public final class L2IsolationDomainPatch extends TagsUpdate { /* - * Resource properties. + * L2 Isolation Domain resource patch properties. */ private L2IsolationDomainPatchProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of L2IsolationDomainPatch class. */ @@ -29,7 +34,7 @@ public L2IsolationDomainPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: L2 Isolation Domain resource patch properties. * * @return the innerProperties value. */ @@ -37,6 +42,26 @@ private L2IsolationDomainPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the L2IsolationDomainPatch object itself. + */ + public L2IsolationDomainPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -69,6 +94,54 @@ public L2IsolationDomainPatch withMtu(Integer mtu) { return this; } + /** + * Get the extendedVlan property: Extended VLAN status. + * + * @return the extendedVlan value. + */ + public ExtendedVlan extendedVlan() { + return this.innerProperties() == null ? null : this.innerProperties().extendedVlan(); + } + + /** + * Set the extendedVlan property: Extended VLAN status. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainPatch object itself. + */ + public L2IsolationDomainPatch withExtendedVlan(ExtendedVlan extendedVlan) { + if (this.innerProperties() == null) { + this.innerProperties = new L2IsolationDomainPatchProperties(); + } + this.innerProperties().withExtendedVlan(extendedVlan); + return this; + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainPatch object itself. + */ + public L2IsolationDomainPatch withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + if (this.innerProperties() == null) { + this.innerProperties = new L2IsolationDomainPatchProperties(); + } + this.innerProperties().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); + return this; + } + /** * Get the annotation property: Switch configuration description. * @@ -92,18 +165,6 @@ public L2IsolationDomainPatch withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -112,6 +173,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -136,6 +198,8 @@ public static L2IsolationDomainPatch fromJson(JsonReader jsonReader) throws IOEx } else if ("properties".equals(fieldName)) { deserializedL2IsolationDomainPatch.innerProperties = L2IsolationDomainPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedL2IsolationDomainPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java index 1941c06cbb05..55d5155d2acf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface L2IsolationDomains { /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN L2IsolationDomain getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,148 +62,130 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * - * Enables isolation domain across the fabric or on specified racks. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Implements the operation to the underlying resources. - * - * Enables isolation domain across the fabric or on specified racks. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Validates the configuration of the resources. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. */ - ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName); + PagedIterable list(); /** - * Validates the configuration of the resources. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return paged collection of L2IsolationDomain items as paginated response with {@link PagedIterable}. */ - ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName, - Context context); + PagedIterable list(Context context); /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. + * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, + UpdateAdministrativeState body); /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. + * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName, - Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, + UpdateAdministrativeState body, Context context); /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable listByResourceGroup(String resourceGroupName); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName, + Context context); /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * Commits the configuration of the given resources. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable list(); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * Commits the configuration of the given resources. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable list(Context context); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName, + Context context); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN L2IsolationDomain getById(String id); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java index b1f83c39eeca..351cb0d9bb5b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public L3ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePol return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java new file mode 100644 index 000000000000..6a842ecc4c11 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Array of ARM Resource ID of the RoutePolicies. + */ +@Fluent +public final class L3ExportRoutePolicyPatch implements JsonSerializable { + /* + * ARM Resource ID of the RoutePolicy. + */ + private String exportIpv4RoutePolicyId; + + /* + * ARM Resource ID of the RoutePolicy. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of L3ExportRoutePolicyPatch class. + */ + public L3ExportRoutePolicyPatch() { + } + + /** + * Get the exportIpv4RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the L3ExportRoutePolicyPatch object itself. + */ + public L3ExportRoutePolicyPatch withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the L3ExportRoutePolicyPatch object itself. + */ + public L3ExportRoutePolicyPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3ExportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3ExportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3ExportRoutePolicyPatch. + */ + public static L3ExportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3ExportRoutePolicyPatch deserializedL3ExportRoutePolicyPatch = new L3ExportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedL3ExportRoutePolicyPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedL3ExportRoutePolicyPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedL3ExportRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java index 7f080e8687ac..d9f56c4a0d1d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -49,6 +49,13 @@ public interface L3IsolationDomain { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -56,6 +63,41 @@ public interface L3IsolationDomain { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * + * @return the redistributeConnectedSubnets value. + */ + RedistributeConnectedSubnets redistributeConnectedSubnets(); + + /** + * Gets the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". + * + * @return the redistributeStaticRoutes value. + */ + RedistributeStaticRoutes redistributeStaticRoutes(); + + /** + * Gets the aggregateRouteConfiguration property: Aggregate route configurations. + * + * @return the aggregateRouteConfiguration value. + */ + AggregateRouteConfiguration aggregateRouteConfiguration(); + + /** + * Gets the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * + * @return the connectedSubnetRoutePolicy value. + */ + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy(); + /** * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. * @@ -64,60 +106,67 @@ public interface L3IsolationDomain { String networkFabricId(); /** - * Gets the configurationState property: Configuration state of the resource. + * Gets the staticRouteRoutePolicy property: Static Route - route policy. * - * @return the configurationState value. + * @return the staticRouteRoutePolicy value. */ - ConfigurationState configurationState(); + StaticRouteRoutePolicy staticRouteRoutePolicy(); /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the uniqueRdConfiguration property: Unique Route Distinguisher configuration. * - * @return the provisioningState value. + * @return the uniqueRdConfiguration value. */ - ProvisioningState provisioningState(); + L3UniqueRouteDistinguisherProperties uniqueRdConfiguration(); /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the v4routePrefixLimit property: IPv4 VRF Limit configuration. * - * @return the administrativeState value. + * @return the v4routePrefixLimit value. */ - AdministrativeState administrativeState(); + RoutePrefixLimitProperties v4routePrefixLimit(); /** - * Gets the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * Gets the v6routePrefixLimit property: IPv6 VRF Limit configuration. * - * @return the redistributeConnectedSubnets value. + * @return the v6routePrefixLimit value. */ - RedistributeConnectedSubnets redistributeConnectedSubnets(); + RoutePrefixLimitProperties v6routePrefixLimit(); /** - * Gets the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". + * Gets the lastOperation property: Details of the last operation performed on the resource. * - * @return the redistributeStaticRoutes value. + * @return the lastOperation value. */ - RedistributeStaticRoutes redistributeStaticRoutes(); + LastOperationProperties lastOperation(); /** - * Gets the aggregateRouteConfiguration property: Aggregate route configurations. + * Gets the exportPolicyConfiguration property: BMP Export Policy configuration. * - * @return the aggregateRouteConfiguration value. + * @return the exportPolicyConfiguration value. */ - AggregateRouteConfiguration aggregateRouteConfiguration(); + BmpExportPolicyProperties exportPolicyConfiguration(); /** - * Gets the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * Gets the configurationState property: Configuration state of the resource. * - * @return the connectedSubnetRoutePolicy value. + * @return the configurationState value. */ - ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy(); + ConfigurationState configurationState(); /** - * Gets the annotation property: Switch configuration description. + * Gets the provisioningState property: Provisioning state of the resource. * - * @return the annotation value. + * @return the provisioningState value. */ - String annotation(); + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); /** * Gets the region of the resource. @@ -215,9 +264,12 @@ interface WithNetworkFabricId { * The stage of the L3IsolationDomain definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithRedistributeConnectedSubnets, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithAnnotation, DefinitionStages.WithRedistributeConnectedSubnets, DefinitionStages.WithRedistributeStaticRoutes, DefinitionStages.WithAggregateRouteConfiguration, - DefinitionStages.WithConnectedSubnetRoutePolicy, DefinitionStages.WithAnnotation { + DefinitionStages.WithConnectedSubnetRoutePolicy, DefinitionStages.WithStaticRouteRoutePolicy, + DefinitionStages.WithUniqueRdConfiguration, DefinitionStages.WithV4routePrefixLimit, + DefinitionStages.WithV6routePrefixLimit, DefinitionStages.WithExportPolicyConfiguration { /** * Executes the create request. * @@ -247,6 +299,32 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the L3IsolationDomain definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the L3IsolationDomain definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + /** * The stage of the L3IsolationDomain definition allowing to specify redistributeConnectedSubnets. */ @@ -300,16 +378,68 @@ interface WithConnectedSubnetRoutePolicy { } /** - * The stage of the L3IsolationDomain definition allowing to specify annotation. + * The stage of the L3IsolationDomain definition allowing to specify staticRouteRoutePolicy. */ - interface WithAnnotation { + interface WithStaticRouteRoutePolicy { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the staticRouteRoutePolicy property: Static Route - route policy.. * - * @param annotation Switch configuration description. + * @param staticRouteRoutePolicy Static Route - route policy. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withStaticRouteRoutePolicy(StaticRouteRoutePolicy staticRouteRoutePolicy); + } + + /** + * The stage of the L3IsolationDomain definition allowing to specify uniqueRdConfiguration. + */ + interface WithUniqueRdConfiguration { + /** + * Specifies the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration Unique Route Distinguisher configuration. + * @return the next definition stage. + */ + WithCreate withUniqueRdConfiguration(L3UniqueRouteDistinguisherProperties uniqueRdConfiguration); + } + + /** + * The stage of the L3IsolationDomain definition allowing to specify v4routePrefixLimit. + */ + interface WithV4routePrefixLimit { + /** + * Specifies the v4routePrefixLimit property: IPv4 VRF Limit configuration.. + * + * @param v4routePrefixLimit IPv4 VRF Limit configuration. + * @return the next definition stage. + */ + WithCreate withV4routePrefixLimit(RoutePrefixLimitProperties v4routePrefixLimit); + } + + /** + * The stage of the L3IsolationDomain definition allowing to specify v6routePrefixLimit. + */ + interface WithV6routePrefixLimit { + /** + * Specifies the v6routePrefixLimit property: IPv6 VRF Limit configuration.. + * + * @param v6routePrefixLimit IPv6 VRF Limit configuration. + * @return the next definition stage. + */ + WithCreate withV6routePrefixLimit(RoutePrefixLimitProperties v6routePrefixLimit); + } + + /** + * The stage of the L3IsolationDomain definition allowing to specify exportPolicyConfiguration. + */ + interface WithExportPolicyConfiguration { + /** + * Specifies the exportPolicyConfiguration property: BMP Export Policy configuration.. + * + * @param exportPolicyConfiguration BMP Export Policy configuration. + * @return the next definition stage. + */ + WithCreate withExportPolicyConfiguration(BmpExportPolicyProperties exportPolicyConfiguration); } } @@ -323,9 +453,11 @@ interface WithAnnotation { /** * The template for L3IsolationDomain update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithRedistributeConnectedSubnets, - UpdateStages.WithRedistributeStaticRoutes, UpdateStages.WithAggregateRouteConfiguration, - UpdateStages.WithConnectedSubnetRoutePolicy, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithRedistributeConnectedSubnets, UpdateStages.WithRedistributeStaticRoutes, + UpdateStages.WithAggregateRouteConfiguration, UpdateStages.WithConnectedSubnetRoutePolicy, + UpdateStages.WithStaticRouteRoutePolicy, UpdateStages.WithV4routePrefixLimit, + UpdateStages.WithV6routePrefixLimit, UpdateStages.WithExportPolicyConfiguration { /** * Executes the update request. * @@ -351,7 +483,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -359,6 +491,32 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the L3IsolationDomain update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the L3IsolationDomain update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + /** * The stage of the L3IsolationDomain update allowing to specify redistributeConnectedSubnets. */ @@ -395,7 +553,7 @@ interface WithAggregateRouteConfiguration { * @param aggregateRouteConfiguration Aggregate route configurations. * @return the next definition stage. */ - Update withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration); + Update withAggregateRouteConfiguration(AggregateRoutePatchConfiguration aggregateRouteConfiguration); } /** @@ -408,20 +566,59 @@ interface WithConnectedSubnetRoutePolicy { * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. * @return the next definition stage. */ - Update withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); + Update withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy); } /** - * The stage of the L3IsolationDomain update allowing to specify annotation. + * The stage of the L3IsolationDomain update allowing to specify staticRouteRoutePolicy. */ - interface WithAnnotation { + interface WithStaticRouteRoutePolicy { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the staticRouteRoutePolicy property: Static Route - route policy.. * - * @param annotation Switch configuration description. + * @param staticRouteRoutePolicy Static Route - route policy. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withStaticRouteRoutePolicy(StaticRouteRoutePolicyPatch staticRouteRoutePolicy); + } + + /** + * The stage of the L3IsolationDomain update allowing to specify v4routePrefixLimit. + */ + interface WithV4routePrefixLimit { + /** + * Specifies the v4routePrefixLimit property: IPv4 VRF Limit configuration.. + * + * @param v4routePrefixLimit IPv4 VRF Limit configuration. + * @return the next definition stage. + */ + Update withV4routePrefixLimit(RoutePrefixLimitPatchProperties v4routePrefixLimit); + } + + /** + * The stage of the L3IsolationDomain update allowing to specify v6routePrefixLimit. + */ + interface WithV6routePrefixLimit { + /** + * Specifies the v6routePrefixLimit property: IPv6 VRF Limit configuration.. + * + * @param v6routePrefixLimit IPv6 VRF Limit configuration. + * @return the next definition stage. + */ + Update withV6routePrefixLimit(RoutePrefixLimitPatchProperties v6routePrefixLimit); + } + + /** + * The stage of the L3IsolationDomain update allowing to specify exportPolicyConfiguration. + */ + interface WithExportPolicyConfiguration { + /** + * Specifies the exportPolicyConfiguration property: BMP Export Policy configuration.. + * + * @param exportPolicyConfiguration BMP Export Policy configuration. + * @return the next definition stage. + */ + Update withExportPolicyConfiguration(BmpExportPolicyPatchProperties exportPolicyConfiguration); } } @@ -441,38 +638,34 @@ interface WithAnnotation { L3IsolationDomain refresh(Context context); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** * Validates the configuration of the resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -483,31 +676,27 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java index b532a0a74f5e..36f2496bf93a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -18,10 +18,15 @@ @Fluent public final class L3IsolationDomainPatch extends TagsUpdate { /* - * Resource properties. + * L3 Isolation Domain resource patch properties. */ private L3IsolationDomainPatchProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of L3IsolationDomainPatch class. */ @@ -29,7 +34,7 @@ public L3IsolationDomainPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: L3 Isolation Domain resource patch properties. * * @return the innerProperties value. */ @@ -37,6 +42,26 @@ private L3IsolationDomainPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the L3IsolationDomainPatch object itself. + */ + public L3IsolationDomainPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -46,6 +71,29 @@ public L3IsolationDomainPatch withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the L3IsolationDomainPatch object itself. + */ + public L3IsolationDomainPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + /** * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". * @@ -98,7 +146,7 @@ public L3IsolationDomainPatch withRedistributeStaticRoutes(RedistributeStaticRou * * @return the aggregateRouteConfiguration value. */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { + public AggregateRoutePatchConfiguration aggregateRouteConfiguration() { return this.innerProperties() == null ? null : this.innerProperties().aggregateRouteConfiguration(); } @@ -109,7 +157,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * @return the L3IsolationDomainPatch object itself. */ public L3IsolationDomainPatch - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { + withAggregateRouteConfiguration(AggregateRoutePatchConfiguration aggregateRouteConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainPatchProperties(); } @@ -122,7 +170,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * * @return the connectedSubnetRoutePolicy value. */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy() { return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); } @@ -133,7 +181,7 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { * @return the L3IsolationDomainPatch object itself. */ public L3IsolationDomainPatch - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainPatchProperties(); } @@ -142,38 +190,96 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { } /** - * Get the annotation property: Switch configuration description. + * Get the staticRouteRoutePolicy property: Static Route - route policy. * - * @return the annotation value. + * @return the staticRouteRoutePolicy value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public StaticRouteRoutePolicyPatch staticRouteRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteRoutePolicy(); } /** - * Set the annotation property: Switch configuration description. + * Set the staticRouteRoutePolicy property: Static Route - route policy. * - * @param annotation the annotation value to set. + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. * @return the L3IsolationDomainPatch object itself. */ - public L3IsolationDomainPatch withAnnotation(String annotation) { + public L3IsolationDomainPatch withStaticRouteRoutePolicy(StaticRouteRoutePolicyPatch staticRouteRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withStaticRouteRoutePolicy(staticRouteRoutePolicy); return this; } /** - * Validates the instance. + * Get the v4routePrefixLimit property: IPv4 VRF Limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the v4routePrefixLimit value. */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public RoutePrefixLimitPatchProperties v4routePrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().v4routePrefixLimit(); + } + + /** + * Set the v4routePrefixLimit property: IPv4 VRF Limit configuration. + * + * @param v4routePrefixLimit the v4routePrefixLimit value to set. + * @return the L3IsolationDomainPatch object itself. + */ + public L3IsolationDomainPatch withV4routePrefixLimit(RoutePrefixLimitPatchProperties v4routePrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainPatchProperties(); } + this.innerProperties().withV4routePrefixLimit(v4routePrefixLimit); + return this; + } + + /** + * Get the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @return the v6routePrefixLimit value. + */ + public RoutePrefixLimitPatchProperties v6routePrefixLimit() { + return this.innerProperties() == null ? null : this.innerProperties().v6routePrefixLimit(); + } + + /** + * Set the v6routePrefixLimit property: IPv6 VRF Limit configuration. + * + * @param v6routePrefixLimit the v6routePrefixLimit value to set. + * @return the L3IsolationDomainPatch object itself. + */ + public L3IsolationDomainPatch withV6routePrefixLimit(RoutePrefixLimitPatchProperties v6routePrefixLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainPatchProperties(); + } + this.innerProperties().withV6routePrefixLimit(v6routePrefixLimit); + return this; + } + + /** + * Get the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @return the exportPolicyConfiguration value. + */ + public BmpExportPolicyPatchProperties exportPolicyConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().exportPolicyConfiguration(); + } + + /** + * Set the exportPolicyConfiguration property: BMP Export Policy configuration. + * + * @param exportPolicyConfiguration the exportPolicyConfiguration value to set. + * @return the L3IsolationDomainPatch object itself. + */ + public L3IsolationDomainPatch + withExportPolicyConfiguration(BmpExportPolicyPatchProperties exportPolicyConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new L3IsolationDomainPatchProperties(); + } + this.innerProperties().withExportPolicyConfiguration(exportPolicyConfiguration); + return this; } /** @@ -184,6 +290,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -208,6 +315,8 @@ public static L3IsolationDomainPatch fromJson(JsonReader jsonReader) throws IOEx } else if ("properties".equals(fieldName)) { deserializedL3IsolationDomainPatch.innerProperties = L3IsolationDomainPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedL3IsolationDomainPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java deleted file mode 100644 index 0946501ddfc1..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * L3 Isolation Domain Patch Properties defines the patchable properties of the resource. - */ -@Fluent -public class L3IsolationDomainPatchableProperties implements JsonSerializable { - /* - * Advertise Connected Subnets. Ex: "True" | "False". - */ - private RedistributeConnectedSubnets redistributeConnectedSubnets; - - /* - * Advertise Static Routes. Ex: "True" | "False". - */ - private RedistributeStaticRoutes redistributeStaticRoutes; - - /* - * Aggregate route configurations. - */ - private AggregateRouteConfiguration aggregateRouteConfiguration; - - /* - * Connected Subnet RoutePolicy - */ - private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; - - /** - * Creates an instance of L3IsolationDomainPatchableProperties class. - */ - public L3IsolationDomainPatchableProperties() { - } - - /** - * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". - * - * @return the redistributeConnectedSubnets value. - */ - public RedistributeConnectedSubnets redistributeConnectedSubnets() { - return this.redistributeConnectedSubnets; - } - - /** - * Set the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". - * - * @param redistributeConnectedSubnets the redistributeConnectedSubnets value to set. - * @return the L3IsolationDomainPatchableProperties object itself. - */ - public L3IsolationDomainPatchableProperties - withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets) { - this.redistributeConnectedSubnets = redistributeConnectedSubnets; - return this; - } - - /** - * Get the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @return the redistributeStaticRoutes value. - */ - public RedistributeStaticRoutes redistributeStaticRoutes() { - return this.redistributeStaticRoutes; - } - - /** - * Set the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @param redistributeStaticRoutes the redistributeStaticRoutes value to set. - * @return the L3IsolationDomainPatchableProperties object itself. - */ - public L3IsolationDomainPatchableProperties - withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes) { - this.redistributeStaticRoutes = redistributeStaticRoutes; - return this; - } - - /** - * Get the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @return the aggregateRouteConfiguration value. - */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { - return this.aggregateRouteConfiguration; - } - - /** - * Set the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. - * @return the L3IsolationDomainPatchableProperties object itself. - */ - public L3IsolationDomainPatchableProperties - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { - this.aggregateRouteConfiguration = aggregateRouteConfiguration; - return this; - } - - /** - * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @return the connectedSubnetRoutePolicy value. - */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { - return this.connectedSubnetRoutePolicy; - } - - /** - * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. - * @return the L3IsolationDomainPatchableProperties object itself. - */ - public L3IsolationDomainPatchableProperties - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { - this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregateRouteConfiguration() != null) { - aggregateRouteConfiguration().validate(); - } - if (connectedSubnetRoutePolicy() != null) { - connectedSubnetRoutePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("redistributeConnectedSubnets", - this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); - jsonWriter.writeStringField("redistributeStaticRoutes", - this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); - jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); - jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L3IsolationDomainPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L3IsolationDomainPatchableProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the L3IsolationDomainPatchableProperties. - */ - public static L3IsolationDomainPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L3IsolationDomainPatchableProperties deserializedL3IsolationDomainPatchableProperties - = new L3IsolationDomainPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("redistributeConnectedSubnets".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.redistributeConnectedSubnets - = RedistributeConnectedSubnets.fromString(reader.getString()); - } else if ("redistributeStaticRoutes".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.redistributeStaticRoutes - = RedistributeStaticRoutes.fromString(reader.getString()); - } else if ("aggregateRouteConfiguration".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.aggregateRouteConfiguration - = AggregateRouteConfiguration.fromJson(reader); - } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.connectedSubnetRoutePolicy - = ConnectedSubnetRoutePolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedL3IsolationDomainPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java index 18ecbc36f417..2e9eea575e08 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface L3IsolationDomains { /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN L3IsolationDomain getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,38 +80,32 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return paged collection of L3IsolationDomain items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -131,15 +113,13 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. + * Updates the administrative state of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -148,10 +128,10 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + UpdateAdministrativeState body, Context context); /** * Validates the configuration of the resources. @@ -161,7 +141,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName); @@ -174,14 +154,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -189,13 +167,11 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -204,14 +180,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN L3IsolationDomain getById(String id); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java deleted file mode 100644 index a092489da55e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peering optionA properties. - */ -@Fluent -public class L3OptionAProperties implements JsonSerializable { - /* - * MTU to use for option A peering. - */ - private Integer mtu; - - /* - * Vlan identifier. Example : 501 - */ - private Integer vlanId; - - /* - * Fabric ASN number. Example 65001 - */ - private Long fabricAsn; - - /* - * Peer ASN number.Example : 28 - */ - private Long peerAsn; - - /* - * BFD configuration properties - */ - private BfdConfiguration bfdConfiguration; - - /* - * Ingress Acl. ARM resource ID of Access Control Lists. - */ - private String ingressAclId; - - /* - * Egress Acl. ARM resource ID of Access Control Lists. - */ - private String egressAclId; - - /** - * Creates an instance of L3OptionAProperties class. - */ - public L3OptionAProperties() { - } - - /** - * Get the mtu property: MTU to use for option A peering. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.mtu; - } - - /** - * Set the mtu property: MTU to use for option A peering. - * - * @param mtu the mtu value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * Get the vlanId property: Vlan identifier. Example : 501. - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: Vlan identifier. Example : 501. - * - * @param vlanId the vlanId value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * Get the fabricAsn property: Fabric ASN number. Example 65001. - * - * @return the fabricAsn value. - */ - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * Set the fabricAsn property: Fabric ASN number. Example 65001. - * - * @param fabricAsn the fabricAsn value to set. - * @return the L3OptionAProperties object itself. - */ - L3OptionAProperties withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; - } - - /** - * Get the peerAsn property: Peer ASN number.Example : 28. - * - * @return the peerAsn value. - */ - public Long peerAsn() { - return this.peerAsn; - } - - /** - * Set the peerAsn property: Peer ASN number.Example : 28. - * - * @param peerAsn the peerAsn value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; - return this; - } - - /** - * Get the bfdConfiguration property: BFD configuration properties. - * - * @return the bfdConfiguration value. - */ - public BfdConfiguration bfdConfiguration() { - return this.bfdConfiguration; - } - - /** - * Set the bfdConfiguration property: BFD configuration properties. - * - * @param bfdConfiguration the bfdConfiguration value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { - this.bfdConfiguration = bfdConfiguration; - return this; - } - - /** - * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. - * - * @return the ingressAclId value. - */ - public String ingressAclId() { - return this.ingressAclId; - } - - /** - * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. - * - * @param ingressAclId the ingressAclId value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withIngressAclId(String ingressAclId) { - this.ingressAclId = ingressAclId; - return this; - } - - /** - * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. - * - * @return the egressAclId value. - */ - public String egressAclId() { - return this.egressAclId; - } - - /** - * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. - * - * @param egressAclId the egressAclId value to set. - * @return the L3OptionAProperties object itself. - */ - public L3OptionAProperties withEgressAclId(String egressAclId) { - this.egressAclId = egressAclId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); - jsonWriter.writeStringField("ingressAclId", this.ingressAclId); - jsonWriter.writeStringField("egressAclId", this.egressAclId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L3OptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L3OptionAProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the L3OptionAProperties. - */ - public static L3OptionAProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L3OptionAProperties deserializedL3OptionAProperties = new L3OptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedL3OptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedL3OptionAProperties.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("fabricASN".equals(fieldName)) { - deserializedL3OptionAProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedL3OptionAProperties.peerAsn = reader.getNullable(JsonReader::getLong); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedL3OptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); - } else if ("ingressAclId".equals(fieldName)) { - deserializedL3OptionAProperties.ingressAclId = reader.getString(); - } else if ("egressAclId".equals(fieldName)) { - deserializedL3OptionAProperties.egressAclId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedL3OptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java new file mode 100644 index 000000000000..78f9f2731369 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Option B configuration. + */ +@Fluent +public final class L3OptionBPatchProperties implements JsonSerializable { + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + private List importRouteTargets; + + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + private List exportRouteTargets; + + /* + * RouteTargets to be applied. + */ + private RouteTargetPatchInformation routeTargets; + + /** + * Creates an instance of L3OptionBPatchProperties class. + */ + public L3OptionBPatchProperties() { + } + + /** + * Get the importRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @return the importRouteTargets value. + */ + public List importRouteTargets() { + return this.importRouteTargets; + } + + /** + * Set the importRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @param importRouteTargets the importRouteTargets value to set. + * @return the L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties withImportRouteTargets(List importRouteTargets) { + this.importRouteTargets = importRouteTargets; + return this; + } + + /** + * Get the exportRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @return the exportRouteTargets value. + */ + public List exportRouteTargets() { + return this.exportRouteTargets; + } + + /** + * Set the exportRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @param exportRouteTargets the exportRouteTargets value to set. + * @return the L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties withExportRouteTargets(List exportRouteTargets) { + this.exportRouteTargets = exportRouteTargets; + return this; + } + + /** + * Get the routeTargets property: RouteTargets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetPatchInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: RouteTargets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties withRouteTargets(RouteTargetPatchInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importRouteTargets", this.importRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportRouteTargets", this.exportRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("routeTargets", this.routeTargets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3OptionBPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3OptionBPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3OptionBPatchProperties. + */ + public static L3OptionBPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3OptionBPatchProperties deserializedL3OptionBPatchProperties = new L3OptionBPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importRouteTargets".equals(fieldName)) { + List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedL3OptionBPatchProperties.importRouteTargets = importRouteTargets; + } else if ("exportRouteTargets".equals(fieldName)) { + List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedL3OptionBPatchProperties.exportRouteTargets = exportRouteTargets; + } else if ("routeTargets".equals(fieldName)) { + deserializedL3OptionBPatchProperties.routeTargets = RouteTargetPatchInformation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedL3OptionBPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java index fe5f57f0fe4e..f671d692a03a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,17 +98,6 @@ public L3OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routeTargets() != null) { - routeTargets().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java new file mode 100644 index 000000000000..92fce4edd79b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Unique Route Distinguisher properties. + */ +@Immutable +public final class L3UniqueRouteDistinguisherProperties + implements JsonSerializable { + /* + * List of Unique Route Distinguisher addresses. + */ + private List uniqueRds; + + /** + * Creates an instance of L3UniqueRouteDistinguisherProperties class. + */ + public L3UniqueRouteDistinguisherProperties() { + } + + /** + * Get the uniqueRds property: List of Unique Route Distinguisher addresses. + * + * @return the uniqueRds value. + */ + public List uniqueRds() { + return this.uniqueRds; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3UniqueRouteDistinguisherProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3UniqueRouteDistinguisherProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3UniqueRouteDistinguisherProperties. + */ + public static L3UniqueRouteDistinguisherProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3UniqueRouteDistinguisherProperties deserializedL3UniqueRouteDistinguisherProperties + = new L3UniqueRouteDistinguisherProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRds".equals(fieldName)) { + List uniqueRds = reader.readArray(reader1 -> reader1.getString()); + deserializedL3UniqueRouteDistinguisherProperties.uniqueRds = uniqueRds; + } else { + reader.skipChildren(); + } + } + + return deserializedL3UniqueRouteDistinguisherProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java new file mode 100644 index 000000000000..6f19597a24c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Details of the last operations performed on the resource. + */ +@Immutable +public final class LastOperationProperties implements JsonSerializable { + /* + * Details status of the last operation performed on the resource. + */ + private String details; + + /** + * Creates an instance of LastOperationProperties class. + */ + private LastOperationProperties() { + } + + /** + * Get the details property: Details status of the last operation performed on the resource. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LastOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LastOperationProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LastOperationProperties. + */ + public static LastOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LastOperationProperties deserializedLastOperationProperties = new LastOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("details".equals(fieldName)) { + deserializedLastOperationProperties.details = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLastOperationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java index 7db697b7a766..b18339df7c85 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public Layer2Configuration withInterfaces(List interfaces) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java new file mode 100644 index 000000000000..413c049e1885 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Common properties for Layer2 Configuration. + */ +@Fluent +public final class Layer2ConfigurationPatch implements JsonSerializable { + /* + * MTU of the packets between PE & CE. + */ + private Integer mtu; + + /* + * List of network device interfaces resource IDs. + */ + private List interfaces; + + /** + * Creates an instance of Layer2ConfigurationPatch class. + */ + public Layer2ConfigurationPatch() { + } + + /** + * Get the mtu property: MTU of the packets between PE & CE. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU of the packets between PE & CE. + * + * @param mtu the mtu value to set. + * @return the Layer2ConfigurationPatch object itself. + */ + public Layer2ConfigurationPatch withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the interfaces property: List of network device interfaces resource IDs. + * + * @return the interfaces value. + */ + public List interfaces() { + return this.interfaces; + } + + /** + * Set the interfaces property: List of network device interfaces resource IDs. + * + * @param interfaces the interfaces value to set. + * @return the Layer2ConfigurationPatch object itself. + */ + public Layer2ConfigurationPatch withInterfaces(List interfaces) { + this.interfaces = interfaces; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeArrayField("interfaces", this.interfaces, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Layer2ConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Layer2ConfigurationPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the Layer2ConfigurationPatch. + */ + public static Layer2ConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Layer2ConfigurationPatch deserializedLayer2ConfigurationPatch = new Layer2ConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mtu".equals(fieldName)) { + deserializedLayer2ConfigurationPatch.mtu = reader.getNullable(JsonReader::getInt); + } else if ("interfaces".equals(fieldName)) { + List interfaces = reader.readArray(reader1 -> reader1.getString()); + deserializedLayer2ConfigurationPatch.interfaces = interfaces; + } else { + reader.skipChildren(); + } + } + + return deserializedLayer2ConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixPatchProperties.java new file mode 100644 index 000000000000..3819a778cb32 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixPatchProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Layer 3 primary and secondary IP Address prefixes. + */ +@Fluent +public class Layer3IpPrefixPatchProperties implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /** + * Creates an instance of Layer3IpPrefixPatchProperties class. + */ + public Layer3IpPrefixPatchProperties() { + } + + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the Layer3IpPrefixPatchProperties object itself. + */ + public Layer3IpPrefixPatchProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the Layer3IpPrefixPatchProperties object itself. + */ + public Layer3IpPrefixPatchProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the Layer3IpPrefixPatchProperties object itself. + */ + public Layer3IpPrefixPatchProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the Layer3IpPrefixPatchProperties object itself. + */ + public Layer3IpPrefixPatchProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Layer3IpPrefixPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Layer3IpPrefixPatchProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the Layer3IpPrefixPatchProperties. + */ + public static Layer3IpPrefixPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Layer3IpPrefixPatchProperties deserializedLayer3IpPrefixPatchProperties + = new Layer3IpPrefixPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedLayer3IpPrefixPatchProperties.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedLayer3IpPrefixPatchProperties.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedLayer3IpPrefixPatchProperties.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedLayer3IpPrefixPatchProperties.secondaryIpv6Prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLayer3IpPrefixPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java index 06533f4f0ad1..c9bb8d87734e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -122,14 +122,6 @@ public Layer3IpPrefixProperties withSecondaryIpv6Prefix(String secondaryIpv6Pref return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java index f3005308a67f..5aa2dba1d77d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class Layer4Protocol extends ExpandableStringEnum { /** - * Static value TCP for Layer4Protocol. + * TCP(Transmission Control Protocol) Protocol. */ public static final Layer4Protocol TCP = fromString("TCP"); /** - * Static value UDP for Layer4Protocol. + * UDP(User Datagram Protocol) Protocol. */ public static final Layer4Protocol UDP = fromString("UDP"); + /** + * SCTP(Streaming Control Transmission Protocol) Protocol. + */ + public static final Layer4Protocol SCTP = fromString("SCTP"); + /** * Creates a new instance of Layer4Protocol value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java new file mode 100644 index 000000000000..0c27bde59e85 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Lock Configuration State. + */ +public final class LockConfigurationState extends ExpandableStringEnum { + /** + * LockConfigurationState Enabled. + */ + public static final LockConfigurationState ENABLED = fromString("Enabled"); + + /** + * LockConfigurationState Disabled. + */ + public static final LockConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LockConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LockConfigurationState() { + } + + /** + * Creates or finds a LockConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LockConfigurationState. + */ + public static LockConfigurationState fromString(String name) { + return fromString(name, LockConfigurationState.class); + } + + /** + * Gets known LockConfigurationState values. + * + * @return known LockConfigurationState values. + */ + public static Collection values() { + return values(LockConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java index 655cd71d8fa7..f6d5c0ec2b3a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ManagedResourceGroupConfiguration withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java new file mode 100644 index 000000000000..a799141b93e9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Managed service identity (system assigned and/or user assigned identities). + */ +@Fluent +public final class ManagedServiceIdentity implements JsonSerializable { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + private String principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + private String tenantId; + + /* + * The type of managed identity assigned to this resource. + */ + private ManagedServiceIdentityType type; + + /* + * The identities assigned to this resource by the user. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentity class. + */ + public ManagedServiceIdentity() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of managed identity assigned to this resource. + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServiceIdentity. + */ + public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedManagedServiceIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedServiceIdentity.tenantId = reader.getString(); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentity; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java new file mode 100644 index 000000000000..ecaeeccaf725 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The managed service identities assigned to this resource. + */ +@Fluent +public final class ManagedServiceIdentityPatch implements JsonSerializable { + /* + * The type of managed identity assigned to this resource. + */ + private ManagedServiceIdentityType type; + + /* + * The identities assigned to this resource by the user. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentityPatch class. + */ + public ManagedServiceIdentityPatch() { + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of managed identity assigned to this resource. + * + * @param type the type value to set. + * @return the ManagedServiceIdentityPatch object itself. + */ + public ManagedServiceIdentityPatch withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentityPatch object itself. + */ + public ManagedServiceIdentityPatch + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentityPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentityPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServiceIdentityPatch. + */ + public static ManagedServiceIdentityPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentityPatch deserializedManagedServiceIdentityPatch = new ManagedServiceIdentityPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentityPatch.type + = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentityPatch.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentityPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java new file mode 100644 index 000000000000..74823d0f0f68 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of managed identity. + */ +public final class ManagedServiceIdentitySelectorType extends ExpandableStringEnum { + /** + * System Assigned Identity. + */ + public static final ManagedServiceIdentitySelectorType SYSTEM_ASSIGNED_IDENTITY + = fromString("SystemAssignedIdentity"); + + /** + * User Assigned Identity. + */ + public static final ManagedServiceIdentitySelectorType USER_ASSIGNED_IDENTITY = fromString("UserAssignedIdentity"); + + /** + * Creates a new instance of ManagedServiceIdentitySelectorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentitySelectorType() { + } + + /** + * Creates or finds a ManagedServiceIdentitySelectorType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentitySelectorType. + */ + public static ManagedServiceIdentitySelectorType fromString(String name) { + return fromString(name, ManagedServiceIdentitySelectorType.class); + } + + /** + * Gets known ManagedServiceIdentitySelectorType values. + * + * @return known ManagedServiceIdentitySelectorType values. + */ + public static Collection values() { + return values(ManagedServiceIdentitySelectorType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java new file mode 100644 index 000000000000..62198fba9e65 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** + * No managed identity. + */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** + * System assigned managed identity. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * User assigned managed identity. + */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * System and user assigned managed identity. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned,UserAssigned"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java index a123f86a8b7c..17556daeae6e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,30 +75,6 @@ public VpnConfigurationProperties workloadVpnConfiguration() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (infrastructureVpnConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property infrastructureVpnConfiguration in model ManagementNetworkConfigurationProperties")); - } else { - infrastructureVpnConfiguration().validate(); - } - if (workloadVpnConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property workloadVpnConfiguration in model ManagementNetworkConfigurationProperties")); - } else { - workloadVpnConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagementNetworkConfigurationProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java similarity index 62% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java index 5532afb83f3b..2767abc4a7bf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,8 +15,8 @@ * Configuration to be used to setup the management network. */ @Fluent -public final class ManagementNetworkConfigurationPatchableProperties - implements JsonSerializable { +public final class ManagementNetworkPatchConfiguration + implements JsonSerializable { /* * VPN Configuration properties. */ @@ -28,9 +28,9 @@ public final class ManagementNetworkConfigurationPatchableProperties private VpnConfigurationPatchableProperties workloadVpnConfiguration; /** - * Creates an instance of ManagementNetworkConfigurationPatchableProperties class. + * Creates an instance of ManagementNetworkPatchConfiguration class. */ - public ManagementNetworkConfigurationPatchableProperties() { + public ManagementNetworkPatchConfiguration() { } /** @@ -46,9 +46,9 @@ public VpnConfigurationPatchableProperties infrastructureVpnConfiguration() { * Set the infrastructureVpnConfiguration property: VPN Configuration properties. * * @param infrastructureVpnConfiguration the infrastructureVpnConfiguration value to set. - * @return the ManagementNetworkConfigurationPatchableProperties object itself. + * @return the ManagementNetworkPatchConfiguration object itself. */ - public ManagementNetworkConfigurationPatchableProperties + public ManagementNetworkPatchConfiguration withInfrastructureVpnConfiguration(VpnConfigurationPatchableProperties infrastructureVpnConfiguration) { this.infrastructureVpnConfiguration = infrastructureVpnConfiguration; return this; @@ -67,28 +67,14 @@ public VpnConfigurationPatchableProperties workloadVpnConfiguration() { * Set the workloadVpnConfiguration property: VPN Configuration properties. * * @param workloadVpnConfiguration the workloadVpnConfiguration value to set. - * @return the ManagementNetworkConfigurationPatchableProperties object itself. + * @return the ManagementNetworkPatchConfiguration object itself. */ - public ManagementNetworkConfigurationPatchableProperties + public ManagementNetworkPatchConfiguration withWorkloadVpnConfiguration(VpnConfigurationPatchableProperties workloadVpnConfiguration) { this.workloadVpnConfiguration = workloadVpnConfiguration; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (infrastructureVpnConfiguration() != null) { - infrastructureVpnConfiguration().validate(); - } - if (workloadVpnConfiguration() != null) { - workloadVpnConfiguration().validate(); - } - } - /** * {@inheritDoc} */ @@ -101,33 +87,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ManagementNetworkConfigurationPatchableProperties from the JsonReader. + * Reads an instance of ManagementNetworkPatchConfiguration from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ManagementNetworkConfigurationPatchableProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagementNetworkConfigurationPatchableProperties. + * @return An instance of ManagementNetworkPatchConfiguration if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagementNetworkPatchConfiguration. */ - public static ManagementNetworkConfigurationPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static ManagementNetworkPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ManagementNetworkConfigurationPatchableProperties deserializedManagementNetworkConfigurationPatchableProperties - = new ManagementNetworkConfigurationPatchableProperties(); + ManagementNetworkPatchConfiguration deserializedManagementNetworkPatchConfiguration + = new ManagementNetworkPatchConfiguration(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("infrastructureVpnConfiguration".equals(fieldName)) { - deserializedManagementNetworkConfigurationPatchableProperties.infrastructureVpnConfiguration + deserializedManagementNetworkPatchConfiguration.infrastructureVpnConfiguration = VpnConfigurationPatchableProperties.fromJson(reader); } else if ("workloadVpnConfiguration".equals(fieldName)) { - deserializedManagementNetworkConfigurationPatchableProperties.workloadVpnConfiguration + deserializedManagementNetworkPatchConfiguration.workloadVpnConfiguration = VpnConfigurationPatchableProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedManagementNetworkConfigurationPatchableProperties; + return deserializedManagementNetworkPatchConfiguration; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java new file mode 100644 index 000000000000..d74f0666e028 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + */ +public final class MicroBfdState extends ExpandableStringEnum { + /** + * MicroBfdState-Enabled. + */ + public static final MicroBfdState ENABLED = fromString("Enabled"); + + /** + * MicroBfdState-Disabled. + */ + public static final MicroBfdState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MicroBfdState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MicroBfdState() { + } + + /** + * Creates or finds a MicroBfdState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MicroBfdState. + */ + public static MicroBfdState fromString(String name) { + return fromString(name, MicroBfdState.class); + } + + /** + * Gets known MicroBfdState values. + * + * @return known MicroBfdState values. + */ + public static Collection values() { + return values(MicroBfdState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java new file mode 100644 index 000000000000..3ad00643f279 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NNI Derived Unique Route Distinguisher Configuration State. + */ +public final class NNIDerivedUniqueRouteDistinguisherConfigurationState + extends ExpandableStringEnum { + /** + * NNI derived unique route distinguisher configuration state Enabled. + */ + public static final NNIDerivedUniqueRouteDistinguisherConfigurationState ENABLED = fromString("Enabled"); + + /** + * NNI derived unique route distinguisher configuration state Disabled. + */ + public static final NNIDerivedUniqueRouteDistinguisherConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of NNIDerivedUniqueRouteDistinguisherConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NNIDerivedUniqueRouteDistinguisherConfigurationState() { + } + + /** + * Creates or finds a NNIDerivedUniqueRouteDistinguisherConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NNIDerivedUniqueRouteDistinguisherConfigurationState. + */ + public static NNIDerivedUniqueRouteDistinguisherConfigurationState fromString(String name) { + return fromString(name, NNIDerivedUniqueRouteDistinguisherConfigurationState.class); + } + + /** + * Gets known NNIDerivedUniqueRouteDistinguisherConfigurationState values. + * + * @return known NNIDerivedUniqueRouteDistinguisherConfigurationState values. + */ + public static Collection values() { + return values(NNIDerivedUniqueRouteDistinguisherConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..a9216ea46619 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv4 prefix limits patch properties. + */ +@Fluent +public final class NativeIpv4PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv4PrefixLimitPatchProperties class. + */ + public NativeIpv4PrefixLimitPatchProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv4PrefixLimitPatchProperties object itself. + */ + public NativeIpv4PrefixLimitPatchProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv4PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv4PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv4PrefixLimitPatchProperties. + */ + public static NativeIpv4PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv4PrefixLimitPatchProperties deserializedNativeIpv4PrefixLimitPatchProperties + = new NativeIpv4PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitPatchProperties.fromJson(reader1)); + deserializedNativeIpv4PrefixLimitPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv4PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java new file mode 100644 index 000000000000..cb730a142519 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv4 prefix limit properties. + */ +@Fluent +public final class NativeIpv4PrefixLimitProperties implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv4PrefixLimitProperties class. + */ + public NativeIpv4PrefixLimitProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv4PrefixLimitProperties object itself. + */ + public NativeIpv4PrefixLimitProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv4PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv4PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv4PrefixLimitProperties. + */ + public static NativeIpv4PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv4PrefixLimitProperties deserializedNativeIpv4PrefixLimitProperties + = new NativeIpv4PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitProperties.fromJson(reader1)); + deserializedNativeIpv4PrefixLimitProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv4PrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..9fb3a567a34f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv6 prefix limits patch properties. + */ +@Fluent +public final class NativeIpv6PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv6PrefixLimitPatchProperties class. + */ + public NativeIpv6PrefixLimitPatchProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv6PrefixLimitPatchProperties object itself. + */ + public NativeIpv6PrefixLimitPatchProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv6PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv6PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv6PrefixLimitPatchProperties. + */ + public static NativeIpv6PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv6PrefixLimitPatchProperties deserializedNativeIpv6PrefixLimitPatchProperties + = new NativeIpv6PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitPatchProperties.fromJson(reader1)); + deserializedNativeIpv6PrefixLimitPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv6PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java new file mode 100644 index 000000000000..4e0c32059ecd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv6 prefix limit properties. + */ +@Fluent +public final class NativeIpv6PrefixLimitProperties implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv6PrefixLimitProperties class. + */ + public NativeIpv6PrefixLimitProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv6PrefixLimitProperties object itself. + */ + public NativeIpv6PrefixLimitProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv6PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv6PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv6PrefixLimitProperties. + */ + public static NativeIpv6PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv6PrefixLimitProperties deserializedNativeIpv6PrefixLimitProperties + = new NativeIpv6PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitProperties.fromJson(reader1)); + deserializedNativeIpv6PrefixLimitProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv6PrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java index 5fb6f92f288f..88f64bf9b6ff 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -21,6 +21,16 @@ public final class NeighborAddress implements JsonSerializable */ private String address; + /* + * BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BfdAdministrativeState bfdAdministrativeState; + + /* + * BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BgpAdministrativeState bgpAdministrativeState; + /* * Configuration state of the resource. */ @@ -53,20 +63,32 @@ public NeighborAddress withAddress(String address) { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the bfdAdministrativeState property: BFD Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. * - * @return the configurationState value. + * @return the bfdAdministrativeState value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public BfdAdministrativeState bfdAdministrativeState() { + return this.bfdAdministrativeState; } /** - * Validates the instance. + * Get the bgpAdministrativeState property: BGP Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the bgpAdministrativeState value. */ - public void validate() { + public BgpAdministrativeState bgpAdministrativeState() { + return this.bgpAdministrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } /** @@ -96,6 +118,12 @@ public static NeighborAddress fromJson(JsonReader jsonReader) throws IOException if ("address".equals(fieldName)) { deserializedNeighborAddress.address = reader.getString(); + } else if ("bfdAdministrativeState".equals(fieldName)) { + deserializedNeighborAddress.bfdAdministrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("bgpAdministrativeState".equals(fieldName)) { + deserializedNeighborAddress.bgpAdministrativeState + = BgpAdministrativeState.fromString(reader.getString()); } else if ("configurationState".equals(fieldName)) { deserializedNeighborAddress.configurationState = ConfigurationState.fromString(reader.getString()); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java new file mode 100644 index 000000000000..02cfde39a653 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address Bidirectional Forwarding Detection (BFD) Administrative Status. + */ +@Immutable +public final class NeighborAddressBfdAdministrativeStatus + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BFD Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /* + * Error message. + */ + private String error; + + /** + * Creates an instance of NeighborAddressBfdAdministrativeStatus class. + */ + private NeighborAddressBfdAdministrativeStatus() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Get the administrativeState property: BFD Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: Error message. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeStringField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressBfdAdministrativeStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressBfdAdministrativeStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressBfdAdministrativeStatus. + */ + public static NeighborAddressBfdAdministrativeStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressBfdAdministrativeStatus deserializedNeighborAddressBfdAdministrativeStatus + = new NeighborAddressBfdAdministrativeStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.error = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressBfdAdministrativeStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java new file mode 100644 index 000000000000..e28449c6d45c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address BGP Administrative Status. + */ +@Immutable +public final class NeighborAddressBgpAdministrativeStatus + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BGP Administrative state. + */ + private BgpAdministrativeState administrativeState; + + /* + * Error message. + */ + private String error; + + /** + * Creates an instance of NeighborAddressBgpAdministrativeStatus class. + */ + private NeighborAddressBgpAdministrativeStatus() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Get the administrativeState property: BGP Administrative state. + * + * @return the administrativeState value. + */ + public BgpAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: Error message. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeStringField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressBgpAdministrativeStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressBgpAdministrativeStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressBgpAdministrativeStatus. + */ + public static NeighborAddressBgpAdministrativeStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressBgpAdministrativeStatus deserializedNeighborAddressBgpAdministrativeStatus + = new NeighborAddressBgpAdministrativeStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.administrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.error = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressBgpAdministrativeStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java new file mode 100644 index 000000000000..6acaf1318bab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address properties. + */ +@Fluent +public final class NeighborAddressPatch implements JsonSerializable { + /* + * IP Address. + */ + private String address; + + /* + * BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BfdAdministrativeState bfdAdministrativeState; + + /* + * BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BgpAdministrativeState bgpAdministrativeState; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /** + * Creates an instance of NeighborAddressPatch class. + */ + public NeighborAddressPatch() { + } + + /** + * Get the address property: IP Address. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: IP Address. + * + * @param address the address value to set. + * @return the NeighborAddressPatch object itself. + */ + public NeighborAddressPatch withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the bfdAdministrativeState property: BFD Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. + * + * @return the bfdAdministrativeState value. + */ + public BfdAdministrativeState bfdAdministrativeState() { + return this.bfdAdministrativeState; + } + + /** + * Get the bgpAdministrativeState property: BGP Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. + * + * @return the bgpAdministrativeState value. + */ + public BgpAdministrativeState bgpAdministrativeState() { + return this.bgpAdministrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("address", this.address); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressPatch. + */ + public static NeighborAddressPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressPatch deserializedNeighborAddressPatch = new NeighborAddressPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("address".equals(fieldName)) { + deserializedNeighborAddressPatch.address = reader.getString(); + } else if ("bfdAdministrativeState".equals(fieldName)) { + deserializedNeighborAddressPatch.bfdAdministrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("bgpAdministrativeState".equals(fieldName)) { + deserializedNeighborAddressPatch.bgpAdministrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNeighborAddressPatch.configurationState + = ConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java index e28f941034bb..608ae83b7248 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,6 +50,13 @@ public interface NeighborGroup { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -57,6 +64,20 @@ public interface NeighborGroup { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + NeighborGroupDestination destination(); + /** * Gets the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. * @@ -72,25 +93,32 @@ public interface NeighborGroup { List networkTapRuleIds(); /** - * Gets the provisioningState property: The provisioning state of the resource. + * Gets the networkFabricIds property: Associated Network Fabric Resource IDs. * - * @return the provisioningState value. + * @return the networkFabricIds value. */ - ProvisioningState provisioningState(); + List networkFabricIds(); /** - * Gets the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Gets the lastOperation property: Details of the last operation performed on the resource. * - * @return the destination value. + * @return the lastOperation value. */ - NeighborGroupDestination destination(); + LastOperationProperties lastOperation(); /** - * Gets the annotation property: Switch configuration description. + * Gets the provisioningState property: The provisioning state of the resource. * - * @return the annotation value. + * @return the provisioningState value. */ - String annotation(); + ProvisioningState provisioningState(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); /** * Gets the region of the resource. @@ -124,7 +152,7 @@ public interface NeighborGroup { * The entirety of the NeighborGroup definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithDestination, DefinitionStages.WithCreate { } /** @@ -168,7 +196,20 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithDestination withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NeighborGroup definition allowing to specify destination. + */ + interface WithDestination { + /** + * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * + * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @return the next definition stage. + */ + WithCreate withDestination(NeighborGroupDestination destination); } /** @@ -176,7 +217,7 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithDestination, DefinitionStages.WithAnnotation { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -207,16 +248,16 @@ interface WithTags { } /** - * The stage of the NeighborGroup definition allowing to specify destination. + * The stage of the NeighborGroup definition allowing to specify identity. */ - interface WithDestination { + interface WithIdentity { /** - * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - WithCreate withDestination(NeighborGroupDestination destination); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** @@ -243,7 +284,8 @@ interface WithAnnotation { /** * The template for NeighborGroup update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDestination, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithDestination { /** * Executes the update request. * @@ -269,7 +311,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,16 +320,16 @@ interface WithTags { } /** - * The stage of the NeighborGroup update allowing to specify destination. + * The stage of the NeighborGroup update allowing to specify identity. */ - interface WithDestination { + interface WithIdentity { /** - * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - Update withDestination(NeighborGroupDestination destination); + Update withIdentity(ManagedServiceIdentityPatch identity); } /** @@ -302,6 +344,19 @@ interface WithAnnotation { */ Update withAnnotation(String annotation); } + + /** + * The stage of the NeighborGroup update allowing to specify destination. + */ + interface WithDestination { + /** + * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * + * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @return the next definition stage. + */ + Update withDestination(NeighborGroupDestinationPatch destination); + } } /** @@ -318,4 +373,24 @@ interface WithAnnotation { * @return the refreshed resource. */ NeighborGroup refresh(Context context); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NeighborGroupResyncResponse resync(); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NeighborGroupResyncResponse resync(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java index 5ad8a7c46fcc..e004a0a311f4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public NeighborGroupDestination withIpv6Addresses(List ipv6Addresses) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java new file mode 100644 index 000000000000..ac94abfc3943 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ +@Fluent +public final class NeighborGroupDestinationPatch implements JsonSerializable { + /* + * Array of IPv4 Addresses. + */ + private List ipv4Addresses; + + /* + * Array of IPv6 Addresses. + */ + private List ipv6Addresses; + + /** + * Creates an instance of NeighborGroupDestinationPatch class. + */ + public NeighborGroupDestinationPatch() { + } + + /** + * Get the ipv4Addresses property: Array of IPv4 Addresses. + * + * @return the ipv4Addresses value. + */ + public List ipv4Addresses() { + return this.ipv4Addresses; + } + + /** + * Set the ipv4Addresses property: Array of IPv4 Addresses. + * + * @param ipv4Addresses the ipv4Addresses value to set. + * @return the NeighborGroupDestinationPatch object itself. + */ + public NeighborGroupDestinationPatch withIpv4Addresses(List ipv4Addresses) { + this.ipv4Addresses = ipv4Addresses; + return this; + } + + /** + * Get the ipv6Addresses property: Array of IPv6 Addresses. + * + * @return the ipv6Addresses value. + */ + public List ipv6Addresses() { + return this.ipv6Addresses; + } + + /** + * Set the ipv6Addresses property: Array of IPv6 Addresses. + * + * @param ipv6Addresses the ipv6Addresses value to set. + * @return the NeighborGroupDestinationPatch object itself. + */ + public NeighborGroupDestinationPatch withIpv6Addresses(List ipv6Addresses) { + this.ipv6Addresses = ipv6Addresses; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Addresses", this.ipv4Addresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv6Addresses", this.ipv6Addresses, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborGroupDestinationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborGroupDestinationPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborGroupDestinationPatch. + */ + public static NeighborGroupDestinationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborGroupDestinationPatch deserializedNeighborGroupDestinationPatch + = new NeighborGroupDestinationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Addresses".equals(fieldName)) { + List ipv4Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNeighborGroupDestinationPatch.ipv4Addresses = ipv4Addresses; + } else if ("ipv6Addresses".equals(fieldName)) { + List ipv6Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNeighborGroupDestinationPatch.ipv6Addresses = ipv6Addresses; + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborGroupDestinationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java index 6acb912c3cdc..76179e76b600 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -22,6 +22,11 @@ public final class NeighborGroupPatch extends TagsUpdate { */ private NeighborGroupPatchProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of NeighborGroupPatch class. */ @@ -38,34 +43,31 @@ private NeighborGroupPatchProperties innerProperties() { } /** - * {@inheritDoc} + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. */ - @Override - public NeighborGroupPatch withTags(Map tags) { - super.withTags(tags); - return this; + public ManagedServiceIdentityPatch identity() { + return this.identity; } /** - * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Set the identity property: The managed service identities assigned to this resource. * - * @return the destination value. + * @param identity the identity value to set. + * @return the NeighborGroupPatch object itself. */ - public NeighborGroupDestination destination() { - return this.innerProperties() == null ? null : this.innerProperties().destination(); + public NeighborGroupPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; } /** - * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. - * - * @param destination the destination value to set. - * @return the NeighborGroupPatch object itself. + * {@inheritDoc} */ - public NeighborGroupPatch withDestination(NeighborGroupDestination destination) { - if (this.innerProperties() == null) { - this.innerProperties = new NeighborGroupPatchProperties(); - } - this.innerProperties().withDestination(destination); + @Override + public NeighborGroupPatch withTags(Map tags) { + super.withTags(tags); return this; } @@ -93,15 +95,26 @@ public NeighborGroupPatch withAnnotation(String annotation) { } /** - * Validates the instance. + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the destination value. */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public NeighborGroupDestinationPatch destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupPatch object itself. + */ + public NeighborGroupPatch withDestination(NeighborGroupDestinationPatch destination) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupPatchProperties(); } + this.innerProperties().withDestination(destination); + return this; } /** @@ -112,6 +125,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -135,6 +149,8 @@ public static NeighborGroupPatch fromJson(JsonReader jsonReader) throws IOExcept deserializedNeighborGroupPatch.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNeighborGroupPatch.innerProperties = NeighborGroupPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNeighborGroupPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java deleted file mode 100644 index 47817976f3c0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Neighbor Group Patchable Properties defines the patchable properties of the resource. - */ -@Fluent -public class NeighborGroupPatchableProperties implements JsonSerializable { - /* - * An array of destination IPv4 Addresses or IPv6 Addresses. - */ - private NeighborGroupDestination destination; - - /** - * Creates an instance of NeighborGroupPatchableProperties class. - */ - public NeighborGroupPatchableProperties() { - } - - /** - * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. - * - * @return the destination value. - */ - public NeighborGroupDestination destination() { - return this.destination; - } - - /** - * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. - * - * @param destination the destination value to set. - * @return the NeighborGroupPatchableProperties object itself. - */ - public NeighborGroupPatchableProperties withDestination(NeighborGroupDestination destination) { - this.destination = destination; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destination() != null) { - destination().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destination", this.destination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NeighborGroupPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NeighborGroupPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NeighborGroupPatchableProperties. - */ - public static NeighborGroupPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NeighborGroupPatchableProperties deserializedNeighborGroupPatchableProperties - = new NeighborGroupPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destination".equals(fieldName)) { - deserializedNeighborGroupPatchableProperties.destination - = NeighborGroupDestination.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNeighborGroupPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupResyncResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupResyncResponse.java new file mode 100644 index 000000000000..36d2b5fab9e5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupResyncResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NeighborGroupResyncResponse. + */ +public interface NeighborGroupResyncResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner + * object. + * + * @return the inner object. + */ + NeighborGroupResyncResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java index de3fe27e6437..8ac7670c6de7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NeighborGroups { /** - * Retrieves details of neighbor Group using GET method. - * * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Retrieves details of neighbor Group using GET method. - * * Gets the Neighbor Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NeighborGroup getByResourceGroup(String resourceGroupName, String neighborGroupName); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteByResourceGroup(String resourceGroupName, String neighborGroupName); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String neighborGroupName, Context context); /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Neighbor Groups by resource group. - * * Displays NeighborGroups list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,56 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Neighbor Groups by subscription. - * * Displays NeighborGroups list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + * @return paged collection of NeighborGroup items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Retrieves details of neighbor Group using GET method. + * Resync the Neighbor Group after a configuration change. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NeighborGroupResyncResponse resync(String resourceGroupName, String neighborGroupName); + + /** + * Resync the Neighbor Group after a configuration change. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NeighborGroupResyncResponse resync(String resourceGroupName, String neighborGroupName, Context context); + + /** * Gets the Neighbor Group. * * @param id the resource ID. @@ -134,8 +141,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NeighborGroup getById(String id); /** - * Retrieves details of neighbor Group using GET method. - * * Gets the Neighbor Group. * * @param id the resource ID. @@ -148,8 +153,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Response getByIdWithResponse(String id, Context context); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param id the resource ID. @@ -160,8 +163,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteById(String id); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevice.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevice.java new file mode 100644 index 000000000000..1e29a7611537 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevice.java @@ -0,0 +1,576 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import java.util.Map; + +/** + * An immutable client-side representation of NetworkBootstrapDevice. + */ +public interface NetworkBootstrapDevice { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the hostName property: The host name of the device. + * + * @return the hostName value. + */ + String hostName(); + + /** + * Gets the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the version property: Current version of the device as defined in SKU. + * + * @return the version value. + */ + String version(); + + /** + * Gets the networkDeviceSku property: Network Bootstrap Device SKU name. + * + * @return the networkDeviceSku value. + */ + String networkDeviceSku(); + + /** + * Gets the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the secondaryManagementIpv4Address property: Secondary Management IPv4 Address. + * + * @return the secondaryManagementIpv4Address value. + */ + String secondaryManagementIpv4Address(); + + /** + * Gets the dhcpV4ServerIpAddress property: Dhcp server IPv4 Address. + * + * @return the dhcpV4ServerIpAddress value. + */ + String dhcpV4ServerIpAddress(); + + /** + * Gets the primaryManagementIpv6Address property: Primary Management IPv6 Address. + * + * @return the primaryManagementIpv6Address value. + */ + String primaryManagementIpv6Address(); + + /** + * Gets the secondaryManagementIpv6Address property: Secondary Management IPv6 Address. + * + * @return the secondaryManagementIpv6Address value. + */ + String secondaryManagementIpv6Address(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the primaryManagementIpv4Address property: Primary Management IPv4 Address. + * + * @return the primaryManagementIpv4Address value. + */ + String primaryManagementIpv4Address(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceInner innerModel(); + + /** + * The entirety of the NetworkBootstrapDevice definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The NetworkBootstrapDevice definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NetworkBootstrapDevice definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkBootstrapDevice definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithAnnotation, + DefinitionStages.WithHostName, DefinitionStages.WithSerialNumber, DefinitionStages.WithNetworkDeviceSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkBootstrapDevice create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkBootstrapDevice create(Context context); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify hostName. + */ + interface WithHostName { + /** + * Specifies the hostName property: The host name of the device.. + * + * @param hostName The host name of the device. + * @return the next definition stage. + */ + WithCreate withHostName(String hostName); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify serialNumber. + */ + interface WithSerialNumber { + /** + * Specifies the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. + * + * @param serialNumber Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * @return the next definition stage. + */ + WithCreate withSerialNumber(String serialNumber); + } + + /** + * The stage of the NetworkBootstrapDevice definition allowing to specify networkDeviceSku. + */ + interface WithNetworkDeviceSku { + /** + * Specifies the networkDeviceSku property: Network Bootstrap Device SKU name.. + * + * @param networkDeviceSku Network Bootstrap Device SKU name. + * @return the next definition stage. + */ + WithCreate withNetworkDeviceSku(String networkDeviceSku); + } + } + + /** + * Begins update for the NetworkBootstrapDevice resource. + * + * @return the stage of resource update. + */ + NetworkBootstrapDevice.Update update(); + + /** + * The template for NetworkBootstrapDevice update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithHostName, UpdateStages.WithSerialNumber { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkBootstrapDevice apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkBootstrapDevice apply(Context context); + } + + /** + * The NetworkBootstrapDevice update stages. + */ + interface UpdateStages { + /** + * The stage of the NetworkBootstrapDevice update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the NetworkBootstrapDevice update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the NetworkBootstrapDevice update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + + /** + * The stage of the NetworkBootstrapDevice update allowing to specify hostName. + */ + interface WithHostName { + /** + * Specifies the hostName property: The host name of the device.. + * + * @param hostName The host name of the device. + * @return the next definition stage. + */ + Update withHostName(String hostName); + } + + /** + * The stage of the NetworkBootstrapDevice update allowing to specify serialNumber. + */ + interface WithSerialNumber { + /** + * Specifies the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. + * + * @param serialNumber Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * @return the next definition stage. + */ + Update withSerialNumber(String serialNumber); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkBootstrapDevice refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkBootstrapDevice refresh(Context context); + + /** + * Reboot the Network Bootstrap Device. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRebootResponse reboot(); + + /** + * Reboot the Network Bootstrap Device. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRebootResponse reboot(Context context); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(Context context); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpgradeResponse upgrade(UpdateVersion body); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpgradeResponse upgrade(UpdateVersion body, Context context); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpdateAdministrativeStateResponse + updateAdministrativeState(UpdateDeviceAdministrativeState body, Context context); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevicePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevicePatch.java new file mode 100644 index 000000000000..29a120252f36 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevicePatch.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDevicePatchProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The Network Bootstrap Device Patch Parameters defines the patch parameters of the resource. + */ +@Fluent +public final class NetworkBootstrapDevicePatch extends TagsUpdate { + /* + * Network Bootstrap Device Patch properties. + */ + private NetworkBootstrapDevicePatchProperties innerProperties; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + + /** + * Creates an instance of NetworkBootstrapDevicePatch class. + */ + public NetworkBootstrapDevicePatch() { + } + + /** + * Get the innerProperties property: Network Bootstrap Device Patch properties. + * + * @return the innerProperties value. + */ + private NetworkBootstrapDevicePatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkBootstrapDevicePatch object itself. + */ + public NetworkBootstrapDevicePatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkBootstrapDevicePatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapDevicePatch object itself. + */ + public NetworkBootstrapDevicePatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDevicePatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.innerProperties() == null ? null : this.innerProperties().hostName(); + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkBootstrapDevicePatch object itself. + */ + public NetworkBootstrapDevicePatch withHostName(String hostName) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDevicePatchProperties(); + } + this.innerProperties().withHostName(hostName); + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapDevicePatch object itself. + */ + public NetworkBootstrapDevicePatch withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapDevicePatchProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapDevicePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapDevicePatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapDevicePatch. + */ + public static NetworkBootstrapDevicePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapDevicePatch deserializedNetworkBootstrapDevicePatch = new NetworkBootstrapDevicePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkBootstrapDevicePatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetworkBootstrapDevicePatch.innerProperties + = NetworkBootstrapDevicePatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkBootstrapDevicePatch.identity = ManagedServiceIdentityPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapDevicePatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRebootResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRebootResponse.java new file mode 100644 index 000000000000..e0f89a6f13e8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRebootResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkBootstrapDeviceRebootResponse. + */ +public interface NetworkBootstrapDeviceRebootResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceRebootResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRefreshConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRefreshConfigurationResponse.java new file mode 100644 index 000000000000..421a2fc9e5f5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRefreshConfigurationResponse.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkBootstrapDeviceRefreshConfigurationResponse. + */ +public interface NetworkBootstrapDeviceRefreshConfigurationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner + * object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceRefreshConfigurationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceResyncPasswordsResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceResyncPasswordsResponse.java new file mode 100644 index 000000000000..0db34db40c2f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceResyncPasswordsResponse.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkBootstrapDeviceResyncPasswordsResponse. + */ +public interface NetworkBootstrapDeviceResyncPasswordsResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner + * object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceResyncPasswordsResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponse.java new file mode 100644 index 000000000000..f82031e640ec --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponse.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkBootstrapDeviceUpdateAdministrativeStateResponse. + */ +public interface NetworkBootstrapDeviceUpdateAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpgradeResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpgradeResponse.java new file mode 100644 index 000000000000..a5bbdd73f8b3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpgradeResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkBootstrapDeviceUpgradeResponse. + */ +public interface NetworkBootstrapDeviceUpgradeResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner object. + * + * @return the inner object. + */ + NetworkBootstrapDeviceUpgradeResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevices.java new file mode 100644 index 000000000000..45936eca19ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevices.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NetworkBootstrapDevices. + */ +public interface NetworkBootstrapDevices { + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details. + */ + NetworkBootstrapDevice getByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkBootstrapDeviceName, Context context); + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the Network Bootstrap Device resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all the Network Bootstrap Device resources in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRebootResponse reboot(String resourceGroupName, String networkBootstrapDeviceName); + + /** + * Reboot the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRebootResponse reboot(String resourceGroupName, String networkBootstrapDeviceName, + Context context); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * Refreshes the configuration of Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpgradeResponse upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body); + + /** + * Upgrades the version of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpgradeResponse upgrade(String resourceGroupName, String networkBootstrapDeviceName, + UpdateVersion body, Context context); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body); + + /** + * Updates the Administrative state of the Network Bootstrap Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, UpdateDeviceAdministrativeState body, Context context); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * Resync the latest passwords to the Network Bootstrap Device. + * + * Updates the Network Bootstrap Device to use the latest passwords. Does not generate new passwords. Allows network + * bootstrap devices missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkBootstrapDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response}. + */ + NetworkBootstrapDevice getById(String id); + + /** + * Gets a Network Bootstrap Device resource details. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Network Bootstrap Device resource details along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Network Bootstrap Device resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkBootstrapDevice resource. + * + * @param name resource name. + * @return the first stage of the new NetworkBootstrapDevice definition. + */ + NetworkBootstrapDevice.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterface.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterface.java new file mode 100644 index 000000000000..3c8bdbe92590 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterface.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; + +/** + * An immutable client-side representation of NetworkBootstrapInterface. + */ +public interface NetworkBootstrapInterface { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the physicalIdentifier property: Physical identifier of the device. + * + * @return the physicalIdentifier value. + */ + String physicalIdentifier(); + + /** + * Gets the connectedTo property: Connected to information of the device. + * + * @return the connectedTo value. + */ + String connectedTo(); + + /** + * Gets the interfaceType property: Type of the interface. + * + * @return the interfaceType value. + */ + InterfaceType interfaceType(); + + /** + * Gets the description property: Description of the interface. + * + * @return the description value. + */ + String description(); + + /** + * Gets the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + String additionalDescription(); + + /** + * Gets the ipv4Address property: IPv4Address of the interface. + * + * @return the ipv4Address value. + */ + String ipv4Address(); + + /** + * Gets the ipv6Address property: IPv6Address of the interface. + * + * @return the ipv6Address value. + */ + String ipv6Address(); + + /** + * Gets the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner + * object. + * + * @return the inner object. + */ + NetworkBootstrapInterfaceInner innerModel(); + + /** + * The entirety of the NetworkBootstrapInterface definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The NetworkBootstrapInterface definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NetworkBootstrapInterface definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the NetworkBootstrapInterface definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, networkBootstrapDeviceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @return the next definition stage. + */ + WithCreate withExistingNetworkBootstrapDevice(String resourceGroupName, String networkBootstrapDeviceName); + } + + /** + * The stage of the NetworkBootstrapInterface definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithAdditionalDescription, DefinitionStages.WithSerialNumber, + DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkBootstrapInterface create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkBootstrapInterface create(Context context); + } + + /** + * The stage of the NetworkBootstrapInterface definition allowing to specify additionalDescription. + */ + interface WithAdditionalDescription { + /** + * Specifies the additionalDescription property: Additional description of the interface.. + * + * @param additionalDescription Additional description of the interface. + * @return the next definition stage. + */ + WithCreate withAdditionalDescription(String additionalDescription); + } + + /** + * The stage of the NetworkBootstrapInterface definition allowing to specify serialNumber. + */ + interface WithSerialNumber { + /** + * Specifies the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. + * + * @param serialNumber Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * @return the next definition stage. + */ + WithCreate withSerialNumber(String serialNumber); + } + + /** + * The stage of the NetworkBootstrapInterface definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + + /** + * Begins update for the NetworkBootstrapInterface resource. + * + * @return the stage of resource update. + */ + NetworkBootstrapInterface.Update update(); + + /** + * The template for NetworkBootstrapInterface update. + */ + interface Update + extends UpdateStages.WithSerialNumber, UpdateStages.WithAdditionalDescription, UpdateStages.WithAnnotation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkBootstrapInterface apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkBootstrapInterface apply(Context context); + } + + /** + * The NetworkBootstrapInterface update stages. + */ + interface UpdateStages { + /** + * The stage of the NetworkBootstrapInterface update allowing to specify serialNumber. + */ + interface WithSerialNumber { + /** + * Specifies the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. + * + * @param serialNumber Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * @return the next definition stage. + */ + Update withSerialNumber(String serialNumber); + } + + /** + * The stage of the NetworkBootstrapInterface update allowing to specify additionalDescription. + */ + interface WithAdditionalDescription { + /** + * Specifies the additionalDescription property: Additional description of the interface.. + * + * @param additionalDescription Additional description of the interface. + * @return the next definition stage. + */ + Update withAdditionalDescription(String additionalDescription); + } + + /** + * The stage of the NetworkBootstrapInterface update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkBootstrapInterface refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkBootstrapInterface refresh(Context context); + + /** + * Update the admin state of the Network Interface. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Update the admin state of the Network Interface. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfacePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfacePatch.java new file mode 100644 index 000000000000..1af3d4aed944 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfacePatch.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfacePatchProperties; +import java.io.IOException; + +/** + * The NetworkBootstrapInterfacePatch resource definition. + */ +@Fluent +public final class NetworkBootstrapInterfacePatch implements JsonSerializable { + /* + * Network Bootstrap Interface Patch properties. + */ + private NetworkBootstrapInterfacePatchProperties innerProperties; + + /** + * Creates an instance of NetworkBootstrapInterfacePatch class. + */ + public NetworkBootstrapInterfacePatch() { + } + + /** + * Get the innerProperties property: Network Bootstrap Interface Patch properties. + * + * @return the innerProperties value. + */ + private NetworkBootstrapInterfacePatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the interface. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @param serialNumber the serialNumber value to set. + * @return the NetworkBootstrapInterfacePatch object itself. + */ + public NetworkBootstrapInterfacePatch withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfacePatchProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + public String additionalDescription() { + return this.innerProperties() == null ? null : this.innerProperties().additionalDescription(); + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkBootstrapInterfacePatch object itself. + */ + public NetworkBootstrapInterfacePatch withAdditionalDescription(String additionalDescription) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfacePatchProperties(); + } + this.innerProperties().withAdditionalDescription(additionalDescription); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkBootstrapInterfacePatch object itself. + */ + public NetworkBootstrapInterfacePatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkBootstrapInterfacePatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkBootstrapInterfacePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkBootstrapInterfacePatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkBootstrapInterfacePatch. + */ + public static NetworkBootstrapInterfacePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkBootstrapInterfacePatch deserializedNetworkBootstrapInterfacePatch + = new NetworkBootstrapInterfacePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedNetworkBootstrapInterfacePatch.innerProperties + = NetworkBootstrapInterfacePatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkBootstrapInterfacePatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfaces.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfaces.java new file mode 100644 index 000000000000..066e1b29262c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfaces.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NetworkBootstrapInterfaces. + */ +public interface NetworkBootstrapInterfaces { + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName, Context context); + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details. + */ + NetworkBootstrapInterface get(String resourceGroupName, String networkBootstrapDeviceName, + String networkBootstrapInterfaceName); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkBootstrapDeviceName, String networkBootstrapInterfaceName, + Context context); + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName); + + /** + * List all the Network Bootstrap Interface resources in a given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkBootstrapInterface list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByNetworkBootstrapDevice(String resourceGroupName, + String networkBootstrapDeviceName, Context context); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body); + + /** + * Update the admin state of the Network Interface. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkBootstrapDeviceName Name of the Network Bootstrap Device. + * @param networkBootstrapInterfaceName Name of the Network Bootstrap Interface. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, + String networkBootstrapDeviceName, String networkBootstrapInterfaceName, UpdateAdministrativeState body, + Context context); + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response}. + */ + NetworkBootstrapInterface getById(String id); + + /** + * Get the Network Bootstrap Interface resource details. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Bootstrap Interface resource details along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the Network Bootstrap Interface resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkBootstrapInterface resource. + * + * @param name resource name. + * @return the first stage of the new NetworkBootstrapInterface definition. + */ + NetworkBootstrapInterface.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java index e815f26d3c96..e2bb8ba116a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import java.util.List; import java.util.Map; /** @@ -49,6 +50,13 @@ public interface NetworkDevice { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -56,6 +64,36 @@ public interface NetworkDevice { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the hostName property: The host name of the device. + * + * @return the hostName value. + */ + String hostName(); + + /** + * Gets the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * + * @return the identitySelector value. + */ + IdentitySelector identitySelector(); + /** * Gets the version property: Current version of the device as defined in SKU. * @@ -98,6 +136,20 @@ public interface NetworkDevice { */ String managementIpv6Address(); + /** + * Gets the rwDeviceConfig property: User configured read-write configuration applied on the network devices. + * + * @return the rwDeviceConfig value. + */ + String rwDeviceConfig(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -120,26 +172,25 @@ public interface NetworkDevice { AdministrativeState administrativeState(); /** - * Gets the hostname property: The host name of the device. + * Gets the secretRotationStatus property: Secret rotation status for the device's secrets. * - * @return the hostname value. + * @return the secretRotationStatus value. */ - String hostname(); + List secretRotationStatus(); /** - * Gets the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. + * Gets the certificateRotationStatus property: Certificate rotation status for the device's certificates. * - * @return the serialNumber value. + * @return the certificateRotationStatus value. */ - String serialNumber(); + List certificateRotationStatus(); /** - * Gets the annotation property: Switch configuration description. + * Gets the networkFabricId property: Associated Network Fabric Resource ID. * - * @return the annotation value. + * @return the networkFabricId value. */ - String annotation(); + String networkFabricId(); /** * Gets the region of the resource. @@ -173,7 +224,7 @@ public interface NetworkDevice { * The entirety of the NetworkDevice definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithSerialNumber, DefinitionStages.WithCreate { } /** @@ -217,15 +268,31 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithSerialNumber withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkDevice definition allowing to specify serialNumber. + */ + interface WithSerialNumber { + /** + * Specifies the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. + * + * @param serialNumber Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * @return the next definition stage. + */ + WithCreate withSerialNumber(String serialNumber); } /** * The stage of the NetworkDevice definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithNetworkDeviceSku, - DefinitionStages.WithHostname, DefinitionStages.WithSerialNumber, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithAnnotation, DefinitionStages.WithHostName, DefinitionStages.WithIdentitySelector, + DefinitionStages.WithNetworkDeviceSku { /** * Executes the create request. * @@ -256,57 +323,70 @@ interface WithTags { } /** - * The stage of the NetworkDevice definition allowing to specify networkDeviceSku. + * The stage of the NetworkDevice definition allowing to specify identity. */ - interface WithNetworkDeviceSku { + interface WithIdentity { /** - * Specifies the networkDeviceSku property: Network Device SKU name.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param networkDeviceSku Network Device SKU name. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - WithCreate withNetworkDeviceSku(String networkDeviceSku); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the NetworkDevice definition allowing to specify hostname. + * The stage of the NetworkDevice definition allowing to specify annotation. */ - interface WithHostname { + interface WithAnnotation { /** - * Specifies the hostname property: The host name of the device.. + * Specifies the annotation property: Switch configuration description.. * - * @param hostname The host name of the device. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withHostname(String hostname); + WithCreate withAnnotation(String annotation); } /** - * The stage of the NetworkDevice definition allowing to specify serialNumber. + * The stage of the NetworkDevice definition allowing to specify hostName. */ - interface WithSerialNumber { + interface WithHostName { /** - * Specifies the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber.. + * Specifies the hostName property: The host name of the device.. * - * @param serialNumber Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. + * @param hostName The host name of the device. * @return the next definition stage. */ - WithCreate withSerialNumber(String serialNumber); + WithCreate withHostName(String hostName); } /** - * The stage of the NetworkDevice definition allowing to specify annotation. + * The stage of the NetworkDevice definition allowing to specify identitySelector. */ - interface WithAnnotation { + interface WithIdentitySelector { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the identitySelector property: The selection of the managed identity to use with this storage + * account. The identity type must be either system assigned or user assigned.. * - * @param annotation Switch configuration description. + * @param identitySelector The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withIdentitySelector(IdentitySelector identitySelector); + } + + /** + * The stage of the NetworkDevice definition allowing to specify networkDeviceSku. + */ + interface WithNetworkDeviceSku { + /** + * Specifies the networkDeviceSku property: Network Device SKU name.. + * + * @param networkDeviceSku Network Device SKU name. + * @return the next definition stage. + */ + WithCreate withNetworkDeviceSku(String networkDeviceSku); } } @@ -320,8 +400,8 @@ interface WithAnnotation { /** * The template for NetworkDevice update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithHostname, UpdateStages.WithSerialNumber, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithHostName, UpdateStages.WithSerialNumber, UpdateStages.WithIdentitySelector { /** * Executes the update request. * @@ -347,7 +427,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -356,16 +436,42 @@ interface WithTags { } /** - * The stage of the NetworkDevice update allowing to specify hostname. + * The stage of the NetworkDevice update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the NetworkDevice update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + + /** + * The stage of the NetworkDevice update allowing to specify hostName. */ - interface WithHostname { + interface WithHostName { /** - * Specifies the hostname property: The host name of the device.. + * Specifies the hostName property: The host name of the device.. * - * @param hostname The host name of the device. + * @param hostName The host name of the device. * @return the next definition stage. */ - Update withHostname(String hostname); + Update withHostName(String hostName); } /** @@ -384,16 +490,18 @@ interface WithSerialNumber { } /** - * The stage of the NetworkDevice update allowing to specify annotation. + * The stage of the NetworkDevice update allowing to specify identitySelector. */ - interface WithAnnotation { + interface WithIdentitySelector { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the identitySelector property: The selection of the managed identity to use with this storage + * account. The identity type must be either system assigned or user assigned.. * - * @param annotation Switch configuration description. + * @param identitySelector The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withIdentitySelector(IdentitySelectorPatch identitySelector); } } @@ -413,21 +521,17 @@ interface WithAnnotation { NetworkDevice refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate reboot(RebootProperties body); + OperationStatusResult reboot(RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param body Request payload. @@ -435,50 +539,42 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate reboot(RebootProperties body, Context context); + OperationStatusResult reboot(RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(); + NetworkDeviceRefreshConfigurationResponse refreshConfiguration(); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(Context context); + NetworkDeviceRefreshConfigurationResponse refreshConfiguration(Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body); + NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param body Request payload. @@ -486,27 +582,23 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body, + NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body); + NetworkDeviceUpgradeResponse upgrade(NetworkDeviceUpgradeRequest body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param body Request payload. @@ -514,7 +606,106 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdm * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. + */ + NetworkDeviceUpgradeResponse upgrade(NetworkDeviceUpgradeRequest body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body, + Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceRunRwCommandResponse runRwCommand(DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceRunRwCommandResponse runRwCommand(DeviceRwCommand body, Context context); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceResyncPasswordsResponse resyncPasswords(); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceResyncPasswordsResponse resyncPasswords(Context context); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context); + NetworkFabricResyncCertificatesResponse resyncCertificates(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java index a16603bcf9f0..a482ebb61956 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -22,6 +22,11 @@ public final class NetworkDevicePatchParameters extends TagsUpdate { */ private NetworkDevicePatchParametersProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of NetworkDevicePatchParameters class. */ @@ -37,6 +42,26 @@ private NetworkDevicePatchParametersProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkDevicePatchParameters object itself. + */ + public NetworkDevicePatchParameters withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -47,25 +72,48 @@ public NetworkDevicePatchParameters withTags(Map tags) { } /** - * Get the hostname property: The host name of the device. + * Get the annotation property: Switch configuration description. * - * @return the hostname value. + * @return the annotation value. */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the hostname property: The host name of the device. + * Set the annotation property: Switch configuration description. * - * @param hostname the hostname value to set. + * @param annotation the annotation value to set. * @return the NetworkDevicePatchParameters object itself. */ - public NetworkDevicePatchParameters withHostname(String hostname) { + public NetworkDevicePatchParameters withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new NetworkDevicePatchParametersProperties(); } - this.innerProperties().withHostname(hostname); + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.innerProperties() == null ? null : this.innerProperties().hostName(); + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkDevicePatchParameters object itself. + */ + public NetworkDevicePatchParameters withHostName(String hostName) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkDevicePatchParametersProperties(); + } + this.innerProperties().withHostName(hostName); return this; } @@ -95,40 +143,30 @@ public NetworkDevicePatchParameters withSerialNumber(String serialNumber) { } /** - * Get the annotation property: Switch configuration description. + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @return the annotation value. + * @return the identitySelector value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public IdentitySelectorPatch identitySelector() { + return this.innerProperties() == null ? null : this.innerProperties().identitySelector(); } /** - * Set the annotation property: Switch configuration description. + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @param annotation the annotation value to set. + * @param identitySelector the identitySelector value to set. * @return the NetworkDevicePatchParameters object itself. */ - public NetworkDevicePatchParameters withAnnotation(String annotation) { + public NetworkDevicePatchParameters withIdentitySelector(IdentitySelectorPatch identitySelector) { if (this.innerProperties() == null) { this.innerProperties = new NetworkDevicePatchParametersProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withIdentitySelector(identitySelector); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -137,6 +175,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -161,6 +200,8 @@ public static NetworkDevicePatchParameters fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedNetworkDevicePatchParameters.innerProperties = NetworkDevicePatchParametersProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkDevicePatchParameters.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java deleted file mode 100644 index dca1582226ac..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Device updatable properties. - */ -@Fluent -public class NetworkDevicePatchableProperties implements JsonSerializable { - /* - * The host name of the device. - */ - private String hostname; - - /* - * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. - */ - private String serialNumber; - - /** - * Creates an instance of NetworkDevicePatchableProperties class. - */ - public NetworkDevicePatchableProperties() { - } - - /** - * Get the hostname property: The host name of the device. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Set the hostname property: The host name of the device. - * - * @param hostname the hostname value to set. - * @return the NetworkDevicePatchableProperties object itself. - */ - public NetworkDevicePatchableProperties withHostname(String hostname) { - this.hostname = hostname; - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @param serialNumber the serialNumber value to set. - * @return the NetworkDevicePatchableProperties object itself. - */ - public NetworkDevicePatchableProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hostName", this.hostname); - jsonWriter.writeStringField("serialNumber", this.serialNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkDevicePatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkDevicePatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkDevicePatchableProperties. - */ - public static NetworkDevicePatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkDevicePatchableProperties deserializedNetworkDevicePatchableProperties - = new NetworkDevicePatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hostName".equals(fieldName)) { - deserializedNetworkDevicePatchableProperties.hostname = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkDevicePatchableProperties.serialNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkDevicePatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRefreshConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRefreshConfigurationResponse.java new file mode 100644 index 000000000000..4c64bc08e968 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRefreshConfigurationResponse.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkDeviceRefreshConfigurationResponse. + */ +public interface NetworkDeviceRefreshConfigurationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner + * object. + * + * @return the inner object. + */ + NetworkDeviceRefreshConfigurationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceResyncPasswordsResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceResyncPasswordsResponse.java new file mode 100644 index 000000000000..e1189ed30cf9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceResyncPasswordsResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkDeviceResyncPasswordsResponse. + */ +public interface NetworkDeviceResyncPasswordsResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner object. + * + * @return the inner object. + */ + NetworkDeviceResyncPasswordsResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java index 77f7b151d786..370fc3639108 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,27 +12,27 @@ */ public final class NetworkDeviceRole extends ExpandableStringEnum { /** - * Static value CE for NetworkDeviceRole. + * NetworkDeviceRole-CE(Customer Edge). */ public static final NetworkDeviceRole CE = fromString("CE"); /** - * Static value ToR for NetworkDeviceRole. + * NetworkDeviceRole-ToR(top of rack). */ public static final NetworkDeviceRole TOR = fromString("ToR"); /** - * Static value NPB for NetworkDeviceRole. + * NetworkDeviceRole-NPB(Network Packet Broker). */ public static final NetworkDeviceRole NPB = fromString("NPB"); /** - * Static value TS for NetworkDeviceRole. + * NetworkDeviceRole-TS(Terminal Server). */ public static final NetworkDeviceRole TS = fromString("TS"); /** - * Static value Management for NetworkDeviceRole. + * NetworkDeviceRole-Management. */ public static final NetworkDeviceRole MANAGEMENT = fromString("Management"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java index 228c6b65f696..95f6fb16ec34 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,27 +12,27 @@ */ public final class NetworkDeviceRoleName extends ExpandableStringEnum { /** - * Static value CE for NetworkDeviceRoleName. + * NetworkDeviceRoleName-CE(Customer Edge). */ public static final NetworkDeviceRoleName CE = fromString("CE"); /** - * Static value ToR for NetworkDeviceRoleName. + * NetworkDeviceRoleName-ToR(top of rack). */ public static final NetworkDeviceRoleName TOR = fromString("ToR"); /** - * Static value NPB for NetworkDeviceRoleName. + * NetworkDeviceRoleName-NPB(Network Packet Broker). */ public static final NetworkDeviceRoleName NPB = fromString("NPB"); /** - * Static value TS for NetworkDeviceRoleName. + * NetworkDeviceRoleName-TS(Terminal Server). */ public static final NetworkDeviceRoleName TS = fromString("TS"); /** - * Static value Management for NetworkDeviceRoleName. + * NetworkDeviceRoleName-Management. */ public static final NetworkDeviceRoleName MANAGEMENT = fromString("Management"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRunRwCommandResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRunRwCommandResponse.java new file mode 100644 index 000000000000..990801b4e554 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRunRwCommandResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkDeviceRunRwCommandResponse. + */ +public interface NetworkDeviceRunRwCommandResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Network Device Run Rw Command Response properties. + * + * @return the properties value. + */ + NetworkDeviceRwCommandResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner object. + * + * @return the inner object. + */ + NetworkDeviceRunRwCommandResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRwCommandResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRwCommandResponseProperties.java new file mode 100644 index 000000000000..9eeb848a9099 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRwCommandResponseProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Device Resource defines the properties of the resource. + */ +@Immutable +public final class NetworkDeviceRwCommandResponseProperties + implements JsonSerializable { + /* + * Gets the configuration state. + */ + private ConfigurationState configurationState; + + /* + * Predefined link containing Device Rw Command output. + */ + private String outputUrl; + + /** + * Creates an instance of NetworkDeviceRwCommandResponseProperties class. + */ + private NetworkDeviceRwCommandResponseProperties() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the outputUrl property: Predefined link containing Device Rw Command output. + * + * @return the outputUrl value. + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("outputUrl", this.outputUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceRwCommandResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceRwCommandResponseProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkDeviceRwCommandResponseProperties. + */ + public static NetworkDeviceRwCommandResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceRwCommandResponseProperties deserializedNetworkDeviceRwCommandResponseProperties + = new NetworkDeviceRwCommandResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedNetworkDeviceRwCommandResponseProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("outputUrl".equals(fieldName)) { + deserializedNetworkDeviceRwCommandResponseProperties.outputUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceRwCommandResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java index e53e06d10b4c..152f11ce79a6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java index adfdef9ffcf7..424128bb29b0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkDeviceSkus { /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -27,8 +25,6 @@ public interface NetworkDeviceSkus { Response getWithResponse(String networkDeviceSkuName, Context context); /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -40,26 +36,22 @@ public interface NetworkDeviceSkus { NetworkDeviceSku get(String networkDeviceSkuName); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDeviceSku items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpdateAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpdateAdministrativeStateResponse.java new file mode 100644 index 000000000000..4cc4213ac437 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpdateAdministrativeStateResponse.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkDeviceUpdateAdministrativeStateResponse. + */ +public interface NetworkDeviceUpdateAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + NetworkDeviceUpdateAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeRequest.java new file mode 100644 index 000000000000..ae6abc27d15a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeRequest.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetworkDevice Upgrade Request Properties. + */ +@Fluent +public final class NetworkDeviceUpgradeRequest implements JsonSerializable { + /* + * Version to which the device needs to be upgraded. + */ + private String version; + + /* + * URL to the file containing Read-write configuration to be applied on the device during upgrade. + */ + private String rwDeviceConfigUrl; + + /** + * Creates an instance of NetworkDeviceUpgradeRequest class. + */ + public NetworkDeviceUpgradeRequest() { + } + + /** + * Get the version property: Version to which the device needs to be upgraded. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version to which the device needs to be upgraded. + * + * @param version the version value to set. + * @return the NetworkDeviceUpgradeRequest object itself. + */ + public NetworkDeviceUpgradeRequest withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the rwDeviceConfigUrl property: URL to the file containing Read-write configuration to be applied on the + * device during upgrade. + * + * @return the rwDeviceConfigUrl value. + */ + public String rwDeviceConfigUrl() { + return this.rwDeviceConfigUrl; + } + + /** + * Set the rwDeviceConfigUrl property: URL to the file containing Read-write configuration to be applied on the + * device during upgrade. + * + * @param rwDeviceConfigUrl the rwDeviceConfigUrl value to set. + * @return the NetworkDeviceUpgradeRequest object itself. + */ + public NetworkDeviceUpgradeRequest withRwDeviceConfigUrl(String rwDeviceConfigUrl) { + this.rwDeviceConfigUrl = rwDeviceConfigUrl; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("rwDeviceConfigUrl", this.rwDeviceConfigUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceUpgradeRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceUpgradeRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceUpgradeRequest. + */ + public static NetworkDeviceUpgradeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceUpgradeRequest deserializedNetworkDeviceUpgradeRequest = new NetworkDeviceUpgradeRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedNetworkDeviceUpgradeRequest.version = reader.getString(); + } else if ("rwDeviceConfigUrl".equals(fieldName)) { + deserializedNetworkDeviceUpgradeRequest.rwDeviceConfigUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceUpgradeRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeResponse.java new file mode 100644 index 000000000000..96d7438b5fc4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkDeviceUpgradeResponse. + */ +public interface NetworkDeviceUpgradeResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner + * object. + * + * @return the inner object. + */ + NetworkDeviceUpgradeResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java index cd9cec84af52..66e20d1db0da 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkDevices { /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NetworkDevice getByResourceGroup(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteByResourceGroup(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String networkDeviceName, Context context); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkDevice items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,11 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body); + OperationStatusResult reboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,14 +127,12 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, - RebootProperties body, Context context); + OperationStatusResult reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, + Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,13 +140,11 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkDeviceName); + NetworkDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,14 +153,12 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkDeviceName, + NetworkDeviceRefreshConfigurationResponse refreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -194,14 +167,12 @@ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body); + NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -211,14 +182,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body, Context context); + NetworkDeviceUpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -227,14 +196,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body); + NetworkDeviceUpgradeResponse upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -244,14 +211,134 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. + */ + NetworkDeviceUpgradeResponse upgrade(String resourceGroupName, String networkDeviceName, + NetworkDeviceUpgradeRequest body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body, Context context); + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body); /** - * Gets a Network Device. + * Run the RO Command on the Network Device. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceRunRwCommandResponse runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceRunRwCommandResponse runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest passwords to the Network Device. + * + * Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices + * missed during a previous password rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkDeviceResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkDeviceName, + Context context); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, String networkDeviceName); + + /** + * Resync the latest certificates to the Network Device. + * + * Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, String networkDeviceName, + Context context); + + /** * Gets the Network Device resource details. * * @param id the resource ID. @@ -263,8 +350,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String NetworkDevice getById(String id); /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param id the resource ID. @@ -277,8 +362,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param id the resource ID. @@ -289,8 +372,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String void deleteById(String id); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java index ba274a1f14bc..6194640a4e59 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,6 +50,13 @@ public interface NetworkFabric { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -80,6 +87,20 @@ public interface NetworkFabric { */ List routerIds(); + /** + * Gets the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. + */ + StorageAccountConfiguration storageAccountConfiguration(); + + /** + * Gets the fabricLocks property: Network Fabric Lock details. + * + * @return the fabricLocks value. + */ + List fabricLocks(); + /** * Gets the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric * belongs. @@ -160,6 +181,77 @@ public interface NetworkFabric { */ List l3IsolationDomains(); + /** + * Gets the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to + * 100. + * + * @return the hardwareAlertThreshold value. + */ + Integer hardwareAlertThreshold(); + + /** + * Gets the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + List controlPlaneAcls(); + + /** + * Gets the featureFlags property: NetworkFabric feature flag configuration information. + * + * @return the featureFlags value. + */ + List featureFlags(); + + /** + * Gets the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + List trustedIpPrefixes(); + + /** + * Gets the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + UniqueRouteDistinguisherProperties uniqueRdConfiguration(); + + /** + * Gets the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @return the storageArrayCount value. + */ + Integer storageArrayCount(); + + /** + * Gets the activeCommitBatches property: Active commit batch identifiers. + * + * @return the activeCommitBatches value. + */ + List activeCommitBatches(); + + /** + * Gets the secretRotationSummary property: Overview of secret rotation for the Network Fabric. + * + * @return the secretRotationSummary value. + */ + SecretRotationSummary secretRotationSummary(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @return the authorizedTransceiver value. + */ + AuthorizedTransceiverProperties authorizedTransceiver(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -183,6 +275,13 @@ public interface NetworkFabric { */ AdministrativeState administrativeState(); + /** + * Gets the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @return the qosConfiguration value. + */ + QosProperties qosConfiguration(); + /** * Gets the annotation property: Switch configuration description. * @@ -379,8 +478,14 @@ WithCreate withManagementNetworkConfiguration( * The stage of the NetworkFabric definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithFabricVersion, - DefinitionStages.WithRackCount, DefinitionStages.WithIpv6Prefix, DefinitionStages.WithAnnotation { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithFabricVersion, + DefinitionStages.WithStorageAccountConfiguration, DefinitionStages.WithRackCount, + DefinitionStages.WithIpv6Prefix, DefinitionStages.WithHardwareAlertThreshold, + DefinitionStages.WithControlPlaneAcls, DefinitionStages.WithFeatureFlags, + DefinitionStages.WithTrustedIpPrefixes, DefinitionStages.WithUniqueRdConfiguration, + DefinitionStages.WithStorageArrayCount, DefinitionStages.WithAuthorizedTransceiver, + DefinitionStages.WithQosConfiguration, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -410,6 +515,19 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the NetworkFabric definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the NetworkFabric definition allowing to specify fabricVersion. */ @@ -423,6 +541,20 @@ interface WithFabricVersion { WithCreate withFabricVersion(String fabricVersion); } + /** + * The stage of the NetworkFabric definition allowing to specify storageAccountConfiguration. + */ + interface WithStorageAccountConfiguration { + /** + * Specifies the storageAccountConfiguration property: Bring your own storage account configurations for + * Network Fabric.. + * + * @param storageAccountConfiguration Bring your own storage account configurations for Network Fabric. + * @return the next definition stage. + */ + WithCreate withStorageAccountConfiguration(StorageAccountConfiguration storageAccountConfiguration); + } + /** * The stage of the NetworkFabric definition allowing to specify rackCount. */ @@ -449,6 +581,111 @@ interface WithIpv6Prefix { WithCreate withIpv6Prefix(String ipv6Prefix); } + /** + * The stage of the NetworkFabric definition allowing to specify hardwareAlertThreshold. + */ + interface WithHardwareAlertThreshold { + /** + * Specifies the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are + * from 20 to 100.. + * + * @param hardwareAlertThreshold Hardware alert threshold percentage. Possible values are from 20 to 100. + * @return the next definition stage. + */ + WithCreate withHardwareAlertThreshold(Integer hardwareAlertThreshold); + } + + /** + * The stage of the NetworkFabric definition allowing to specify controlPlaneAcls. + */ + interface WithControlPlaneAcls { + /** + * Specifies the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs.. + * + * @param controlPlaneAcls Control Plane Access Control List ARM resource IDs. + * @return the next definition stage. + */ + WithCreate withControlPlaneAcls(List controlPlaneAcls); + } + + /** + * The stage of the NetworkFabric definition allowing to specify featureFlags. + */ + interface WithFeatureFlags { + /** + * Specifies the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags NetworkFabric feature flag configuration information. + * @return the next definition stage. + */ + WithCreate withFeatureFlags(List featureFlags); + } + + /** + * The stage of the NetworkFabric definition allowing to specify trustedIpPrefixes. + */ + interface WithTrustedIpPrefixes { + /** + * Specifies the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs.. + * + * @param trustedIpPrefixes Trusted IP Prefixes ARM resource IDs. + * @return the next definition stage. + */ + WithCreate withTrustedIpPrefixes(List trustedIpPrefixes); + } + + /** + * The stage of the NetworkFabric definition allowing to specify uniqueRdConfiguration. + */ + interface WithUniqueRdConfiguration { + /** + * Specifies the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration Unique Route Distinguisher configuration. + * @return the next definition stage. + */ + WithCreate withUniqueRdConfiguration(UniqueRouteDistinguisherProperties uniqueRdConfiguration); + } + + /** + * The stage of the NetworkFabric definition allowing to specify storageArrayCount. + */ + interface WithStorageArrayCount { + /** + * Specifies the storageArrayCount property: Number of Storage arrays associated with the Network Fabric.. + * + * @param storageArrayCount Number of Storage arrays associated with the Network Fabric. + * @return the next definition stage. + */ + WithCreate withStorageArrayCount(Integer storageArrayCount); + } + + /** + * The stage of the NetworkFabric definition allowing to specify authorizedTransceiver. + */ + interface WithAuthorizedTransceiver { + /** + * Specifies the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric.. + * + * @param authorizedTransceiver Authorized transciever configuration for NetworkFabric. + * @return the next definition stage. + */ + WithCreate withAuthorizedTransceiver(AuthorizedTransceiverProperties authorizedTransceiver); + } + + /** + * The stage of the NetworkFabric definition allowing to specify qosConfiguration. + */ + interface WithQosConfiguration { + /** + * Specifies the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @param qosConfiguration NetworkFabric QoS Configuration. + * @return the next definition stage. + */ + WithCreate withQosConfiguration(QosProperties qosConfiguration); + } + /** * The stage of the NetworkFabric definition allowing to specify annotation. */ @@ -473,10 +710,13 @@ interface WithAnnotation { /** * The template for NetworkFabric update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithRackCount, UpdateStages.WithServerCountPerRack, - UpdateStages.WithIpv4Prefix, UpdateStages.WithIpv6Prefix, UpdateStages.WithFabricAsn, - UpdateStages.WithTerminalServerConfiguration, UpdateStages.WithManagementNetworkConfiguration, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithRackCount, UpdateStages.WithServerCountPerRack, UpdateStages.WithIpv4Prefix, + UpdateStages.WithIpv6Prefix, UpdateStages.WithFabricAsn, UpdateStages.WithTerminalServerConfiguration, + UpdateStages.WithManagementNetworkConfiguration, UpdateStages.WithStorageAccountConfiguration, + UpdateStages.WithHardwareAlertThreshold, UpdateStages.WithControlPlaneAcls, UpdateStages.WithTrustedIpPrefixes, + UpdateStages.WithUniqueRdConfiguration, UpdateStages.WithQosConfiguration, UpdateStages.WithFeatureFlags, + UpdateStages.WithAuthorizedTransceiver { /** * Executes the update request. * @@ -502,7 +742,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -510,6 +750,32 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the NetworkFabric update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the NetworkFabric update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + /** * The stage of the NetworkFabric update allowing to specify rackCount. */ @@ -587,8 +853,7 @@ interface WithTerminalServerConfiguration { * server. * @return the next definition stage. */ - Update withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration); + Update withTerminalServerConfiguration(TerminalServerPatchConfiguration terminalServerConfiguration); } /** @@ -602,21 +867,114 @@ interface WithManagementNetworkConfiguration { * @param managementNetworkConfiguration Configuration to be used to setup the management network. * @return the next definition stage. */ - Update withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration); + Update + withManagementNetworkConfiguration(ManagementNetworkPatchConfiguration managementNetworkConfiguration); } /** - * The stage of the NetworkFabric update allowing to specify annotation. + * The stage of the NetworkFabric update allowing to specify storageAccountConfiguration. */ - interface WithAnnotation { + interface WithStorageAccountConfiguration { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the storageAccountConfiguration property: Bring your own storage account configurations for + * Network Fabric.. * - * @param annotation Switch configuration description. + * @param storageAccountConfiguration Bring your own storage account configurations for Network Fabric. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withStorageAccountConfiguration(StorageAccountPatchConfiguration storageAccountConfiguration); + } + + /** + * The stage of the NetworkFabric update allowing to specify hardwareAlertThreshold. + */ + interface WithHardwareAlertThreshold { + /** + * Specifies the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are + * from 20 to 100.. + * + * @param hardwareAlertThreshold Hardware alert threshold percentage. Possible values are from 20 to 100. + * @return the next definition stage. + */ + Update withHardwareAlertThreshold(Integer hardwareAlertThreshold); + } + + /** + * The stage of the NetworkFabric update allowing to specify controlPlaneAcls. + */ + interface WithControlPlaneAcls { + /** + * Specifies the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs.. + * + * @param controlPlaneAcls Control Plane Access Control List ARM resource IDs. + * @return the next definition stage. + */ + Update withControlPlaneAcls(List controlPlaneAcls); + } + + /** + * The stage of the NetworkFabric update allowing to specify trustedIpPrefixes. + */ + interface WithTrustedIpPrefixes { + /** + * Specifies the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs.. + * + * @param trustedIpPrefixes Trusted IP Prefix ARM resource IDs. + * @return the next definition stage. + */ + Update withTrustedIpPrefixes(List trustedIpPrefixes); + } + + /** + * The stage of the NetworkFabric update allowing to specify uniqueRdConfiguration. + */ + interface WithUniqueRdConfiguration { + /** + * Specifies the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration Unique Route Distinguisher configuration. + * @return the next definition stage. + */ + Update withUniqueRdConfiguration(UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration); + } + + /** + * The stage of the NetworkFabric update allowing to specify qosConfiguration. + */ + interface WithQosConfiguration { + /** + * Specifies the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @param qosConfiguration NetworkFabric QoS Configuration. + * @return the next definition stage. + */ + Update withQosConfiguration(QosPatchProperties qosConfiguration); + } + + /** + * The stage of the NetworkFabric update allowing to specify featureFlags. + */ + interface WithFeatureFlags { + /** + * Specifies the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags NetworkFabric feature flag configuration information. + * @return the next definition stage. + */ + Update withFeatureFlags(List featureFlags); + } + + /** + * The stage of the NetworkFabric update allowing to specify authorizedTransceiver. + */ + interface WithAuthorizedTransceiver { + /** + * Specifies the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric.. + * + * @param authorizedTransceiver Authorized transciever configuration for NetworkFabric. + * @return the next definition stage. + */ + Update withAuthorizedTransceiver(AuthorizedTransceiverPatchProperties authorizedTransceiver); } } @@ -636,69 +994,57 @@ interface WithAnnotation { NetworkFabric refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate provision(); + OperationStatusResult provision(); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate provision(Context context); + OperationStatusResult provision(Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate deprovision(); + OperationStatusResult deprovision(); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate deprovision(Context context); + OperationStatusResult deprovision(Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param body Network Fabric properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties body); + OperationStatusResult upgrade(UpgradeNetworkFabricProperties body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param body Network Fabric properties to update. @@ -706,37 +1052,31 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties body, Context context); + OperationStatusResult upgrade(UpgradeNetworkFabricProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(); + OperationStatusResult refreshConfiguration(); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(Context context); + OperationStatusResult refreshConfiguration(Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -744,13 +1084,11 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -759,27 +1097,23 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body, + UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param body Request payload. @@ -787,27 +1121,23 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(UpdateAdministrativeState body, + UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param body Validate configuration properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param body Validate configuration properties. @@ -815,24 +1145,20 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Upd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return topology of the underlying resources in the given Network Fabric instance. */ - ValidateConfigurationResponse getTopology(); + GetTopologyResponse getTopology(); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param context The context to associate with this operation. @@ -841,29 +1167,251 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Upd * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return topology of the underlying resources in the given Network Fabric instance. */ - ValidateConfigurationResponse getTopology(Context context); + GetTopologyResponse getTopology(Context context); /** - * Implements the operation to the underlying resources. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitConfigurationResponse commitConfiguration(); + + /** * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(); + CommitConfigurationResponse commitConfiguration(CommitConfigurationRequest body, Context context); /** - * Implements the operation to the underlying resources. + * Post action: Returns a status of commit batch operation. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitBatchStatusOperationResponse commitBatchStatus(CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitBatchStatusOperationResponse commitBatchStatus(CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DiscardCommitBatchOperationResponse discardCommitBatch(DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DiscardCommitBatchOperationResponse discardCommitBatch(DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + OperationStatusResult lockFabric(NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + OperationStatusResult lockFabric(NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArmConfigurationDiffOperationResponse armConfigurationDiff(); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArmConfigurationDiffOperationResponse armConfigurationDiff(Context context); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotatePasswordsResponse rotatePasswords(); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotatePasswordsResponse rotatePasswords(Context context); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncPasswordsResponse resyncPasswords(); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncPasswordsResponse resyncPasswords(Context context); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotateCertificatesResponse rotateCertificates(); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotateCertificatesResponse rotateCertificates(Context context); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(Context context); + NetworkFabricResyncCertificatesResponse resyncCertificates(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java index 782fcca562a0..6ce2a07af63b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,6 +50,13 @@ public interface NetworkFabricController { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -57,6 +64,31 @@ public interface NetworkFabricController { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @return the infrastructureExpressRouteConnections value. + */ + List infrastructureExpressRouteConnections(); + + /** + * Gets the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @return the workloadExpressRouteConnections value. + */ + List workloadExpressRouteConnections(); + /** * Gets the infrastructureServices property: InfrastructureServices IP ranges. * @@ -86,15 +118,6 @@ public interface NetworkFabricController { */ List networkFabricIds(); - /** - * Gets the workloadManagementNetwork property: A workload management network is required for all the tenant - * (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or - * any other MSFT/Public endpoints. This is used for the backward compatibility. - * - * @return the workloadManagementNetwork value. - */ - Boolean workloadManagementNetwork(); - /** * Gets the isWorkloadManagementNetworkEnabled property: A workload management network is required for all the * tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access @@ -132,6 +155,13 @@ public interface NetworkFabricController { */ NfcSku nfcSku(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the provisioningState property: Provides you the latest status of the NFC service, whether it is Accepted, * updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC @@ -141,31 +171,6 @@ public interface NetworkFabricController { */ ProvisioningState provisioningState(); - /** - * Gets the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - List infrastructureExpressRouteConnections(); - - /** - * Gets the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - List workloadExpressRouteConnections(); - - /** - * Gets the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - String annotation(); - /** * Gets the region of the resource. * @@ -249,11 +254,12 @@ interface WithResourceGroup { * The stage of the NetworkFabricController definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedResourceGroupConfiguration, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithAnnotation, DefinitionStages.WithInfrastructureExpressRouteConnections, + DefinitionStages.WithWorkloadExpressRouteConnections, + DefinitionStages.WithManagedResourceGroupConfiguration, DefinitionStages.WithIsWorkloadManagementNetworkEnabled, DefinitionStages.WithIpv4AddressSpace, - DefinitionStages.WithIpv6AddressSpace, DefinitionStages.WithNfcSku, - DefinitionStages.WithInfrastructureExpressRouteConnections, - DefinitionStages.WithWorkloadExpressRouteConnections, DefinitionStages.WithAnnotation { + DefinitionStages.WithIpv6AddressSpace, DefinitionStages.WithNfcSku { /** * Executes the create request. * @@ -283,6 +289,69 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the NetworkFabricController definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the NetworkFabricController definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + + /** + * The stage of the NetworkFabricController definition allowing to specify + * infrastructureExpressRouteConnections. + */ + interface WithInfrastructureExpressRouteConnections { + /** + * Specifies the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure + * ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated + * for Infrastructure services. (This is a Mandatory attribute). + * + * @param infrastructureExpressRouteConnections As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for + * Infrastructure services. (This is a Mandatory attribute). + * @return the next definition stage. + */ + WithCreate withInfrastructureExpressRouteConnections( + List infrastructureExpressRouteConnections); + } + + /** + * The stage of the NetworkFabricController definition allowing to specify workloadExpressRouteConnections. + */ + interface WithWorkloadExpressRouteConnections { + /** + * Specifies the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload + * services. (This is a Mandatory attribute).. + * + * @param workloadExpressRouteConnections As part of an update, the workload ExpressRoute CircuitID should + * be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This + * is a Mandatory attribute). + * @return the next definition stage. + */ + WithCreate withWorkloadExpressRouteConnections( + List workloadExpressRouteConnections); + } + /** * The stage of the NetworkFabricController definition allowing to specify managedResourceGroupConfiguration. */ @@ -354,56 +423,6 @@ interface WithNfcSku { */ WithCreate withNfcSku(NfcSku nfcSku); } - - /** - * The stage of the NetworkFabricController definition allowing to specify - * infrastructureExpressRouteConnections. - */ - interface WithInfrastructureExpressRouteConnections { - /** - * Specifies the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure - * ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated - * for Infrastructure services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - * Infrastructure services. (This is a Mandatory attribute). - * @return the next definition stage. - */ - WithCreate withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections); - } - - /** - * The stage of the NetworkFabricController definition allowing to specify workloadExpressRouteConnections. - */ - interface WithWorkloadExpressRouteConnections { - /** - * Specifies the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload - * services. (This is a Mandatory attribute).. - * - * @param workloadExpressRouteConnections As part of an update, the workload ExpressRoute CircuitID should - * be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This - * is a Mandatory attribute). - * @return the next definition stage. - */ - WithCreate withWorkloadExpressRouteConnections( - List workloadExpressRouteConnections); - } - - /** - * The stage of the NetworkFabricController definition allowing to specify annotation. - */ - interface WithAnnotation { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -416,8 +435,8 @@ interface WithAnnotation { /** * The template for NetworkFabricController update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithInfrastructureExpressRouteConnections, - UpdateStages.WithWorkloadExpressRouteConnections { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, + UpdateStages.WithInfrastructureExpressRouteConnections, UpdateStages.WithWorkloadExpressRouteConnections { /** * Executes the update request. * @@ -443,7 +462,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -451,6 +470,19 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the NetworkFabricController update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + /** * The stage of the NetworkFabricController update allowing to specify infrastructureExpressRouteConnections. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java index 9b9481b5380d..2b778e822c3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,14 +8,12 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerPatchProperties; import java.io.IOException; import java.util.List; import java.util.Map; /** - * Network Fabric Controller patch parameters - * * The Network Fabric Controller Patch payload definition. */ @Fluent @@ -23,7 +21,12 @@ public final class NetworkFabricControllerPatch extends TagsUpdate { /* * Network Fabric Controller patch properties. */ - private NetworkFabricControllerPatchableProperties innerProperties; + private NetworkFabricControllerPatchProperties innerProperties; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; /** * Creates an instance of NetworkFabricControllerPatch class. @@ -36,10 +39,30 @@ public NetworkFabricControllerPatch() { * * @return the innerProperties value. */ - private NetworkFabricControllerPatchableProperties innerProperties() { + private NetworkFabricControllerPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkFabricControllerPatch object itself. + */ + public NetworkFabricControllerPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -71,7 +94,7 @@ public List infrastructureExpressRouteConnect public NetworkFabricControllerPatch withInfrastructureExpressRouteConnections( List infrastructureExpressRouteConnections) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerPatchableProperties(); + this.innerProperties = new NetworkFabricControllerPatchProperties(); } this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); return this; @@ -99,24 +122,12 @@ public List workloadExpressRouteConnections() public NetworkFabricControllerPatch withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerPatchableProperties(); + this.innerProperties = new NetworkFabricControllerPatchProperties(); } this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -125,6 +136,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -148,7 +160,9 @@ public static NetworkFabricControllerPatch fromJson(JsonReader jsonReader) throw deserializedNetworkFabricControllerPatch.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkFabricControllerPatch.innerProperties - = NetworkFabricControllerPatchableProperties.fromJson(reader); + = NetworkFabricControllerPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricControllerPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java index d3481ce8da48..c63b2e9ad6b2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkFabricControllers { /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resource String networkFabricControllerName, Context context); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resource NetworkFabricController getByResourceGroup(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resource void deleteByResourceGroup(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resource void delete(String resourceGroupName, String networkFabricControllerName, Context context); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricController items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resource NetworkFabricController getById(String id); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resource void deleteById(String id); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java new file mode 100644 index 000000000000..d209b2a01b8f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network fabric lock action. + */ +public final class NetworkFabricLockAction extends ExpandableStringEnum { + /** + * Perform lock operation. + */ + public static final NetworkFabricLockAction LOCK = fromString("Lock"); + + /** + * Perform unlock operation. + */ + public static final NetworkFabricLockAction UNLOCK = fromString("Unlock"); + + /** + * Creates a new instance of NetworkFabricLockAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkFabricLockAction() { + } + + /** + * Creates or finds a NetworkFabricLockAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkFabricLockAction. + */ + public static NetworkFabricLockAction fromString(String name) { + return fromString(name, NetworkFabricLockAction.class); + } + + /** + * Gets known NetworkFabricLockAction values. + * + * @return known NetworkFabricLockAction values. + */ + public static Collection values() { + return values(NetworkFabricLockAction.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java new file mode 100644 index 000000000000..a6fcd03a5cab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Fabric Lock Request. + */ +@Fluent +public final class NetworkFabricLockRequest implements JsonSerializable { + /* + * Type of lock to be applied + */ + private NetworkFabricLockType lockType; + + /* + * Action to be performed on the lock + */ + private NetworkFabricLockAction action; + + /** + * Creates an instance of NetworkFabricLockRequest class. + */ + public NetworkFabricLockRequest() { + } + + /** + * Get the lockType property: Type of lock to be applied. + * + * @return the lockType value. + */ + public NetworkFabricLockType lockType() { + return this.lockType; + } + + /** + * Set the lockType property: Type of lock to be applied. + * + * @param lockType the lockType value to set. + * @return the NetworkFabricLockRequest object itself. + */ + public NetworkFabricLockRequest withLockType(NetworkFabricLockType lockType) { + this.lockType = lockType; + return this; + } + + /** + * Get the action property: Action to be performed on the lock. + * + * @return the action value. + */ + public NetworkFabricLockAction action() { + return this.action; + } + + /** + * Set the action property: Action to be performed on the lock. + * + * @param action the action value to set. + * @return the NetworkFabricLockRequest object itself. + */ + public NetworkFabricLockRequest withAction(NetworkFabricLockAction action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lockType", this.lockType == null ? null : this.lockType.toString()); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricLockRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricLockRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkFabricLockRequest. + */ + public static NetworkFabricLockRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricLockRequest deserializedNetworkFabricLockRequest = new NetworkFabricLockRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lockType".equals(fieldName)) { + deserializedNetworkFabricLockRequest.lockType + = NetworkFabricLockType.fromString(reader.getString()); + } else if ("action".equals(fieldName)) { + deserializedNetworkFabricLockRequest.action + = NetworkFabricLockAction.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricLockRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java new file mode 100644 index 000000000000..56801da1ce27 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network fabric lock type. + */ +public final class NetworkFabricLockType extends ExpandableStringEnum { + /** + * A administrative lock/unlock operation will be performed. + */ + public static final NetworkFabricLockType ADMINISTRATIVE = fromString("Administrative"); + + /** + * A lock/unlock operation will be performed on the configuration. + */ + public static final NetworkFabricLockType CONFIGURATION = fromString("Configuration"); + + /** + * Creates a new instance of NetworkFabricLockType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkFabricLockType() { + } + + /** + * Creates or finds a NetworkFabricLockType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkFabricLockType. + */ + public static NetworkFabricLockType fromString(String name) { + return fromString(name, NetworkFabricLockType.class); + } + + /** + * Gets known NetworkFabricLockType values. + * + * @return known NetworkFabricLockType values. + */ + public static Collection values() { + return values(NetworkFabricLockType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java index 03df946e6b32..910a661315a8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricPatchProperties; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -22,6 +23,11 @@ public final class NetworkFabricPatch extends TagsUpdate { */ private NetworkFabricPatchProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of NetworkFabricPatch class. */ @@ -37,6 +43,26 @@ private NetworkFabricPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -46,6 +72,29 @@ public NetworkFabricPatch withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + /** * Get the rackCount property: Number of compute racks associated to Network Fabric. * @@ -167,7 +216,7 @@ public NetworkFabricPatch withFabricAsn(Long fabricAsn) { * * @return the terminalServerConfiguration value. */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { + public TerminalServerPatchConfiguration terminalServerConfiguration() { return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration(); } @@ -178,8 +227,8 @@ public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServe * @param terminalServerConfiguration the terminalServerConfiguration value to set. * @return the NetworkFabricPatch object itself. */ - public NetworkFabricPatch withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + public NetworkFabricPatch + withTerminalServerConfiguration(TerminalServerPatchConfiguration terminalServerConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricPatchProperties(); } @@ -192,7 +241,7 @@ public NetworkFabricPatch withTerminalServerConfiguration( * * @return the managementNetworkConfiguration value. */ - public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { + public ManagementNetworkPatchConfiguration managementNetworkConfiguration() { return this.innerProperties() == null ? null : this.innerProperties().managementNetworkConfiguration(); } @@ -202,8 +251,8 @@ public ManagementNetworkConfigurationPatchableProperties managementNetworkConfig * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. * @return the NetworkFabricPatch object itself. */ - public NetworkFabricPatch withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + public NetworkFabricPatch + withManagementNetworkConfiguration(ManagementNetworkPatchConfiguration managementNetworkConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricPatchProperties(); } @@ -212,38 +261,188 @@ public NetworkFabricPatch withManagementNetworkConfiguration( } /** - * Get the annotation property: Switch configuration description. + * Get the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. * - * @return the annotation value. + * @return the storageAccountConfiguration value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public StorageAccountPatchConfiguration storageAccountConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountConfiguration(); } /** - * Set the annotation property: Switch configuration description. + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. * - * @param annotation the annotation value to set. + * @param storageAccountConfiguration the storageAccountConfiguration value to set. * @return the NetworkFabricPatch object itself. */ - public NetworkFabricPatch withAnnotation(String annotation) { + public NetworkFabricPatch + withStorageAccountConfiguration(StorageAccountPatchConfiguration storageAccountConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withStorageAccountConfiguration(storageAccountConfiguration); return this; } /** - * Validates the instance. + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the hardwareAlertThreshold value. */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public Integer hardwareAlertThreshold() { + return this.innerProperties() == null ? null : this.innerProperties().hardwareAlertThreshold(); + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withHardwareAlertThreshold(hardwareAlertThreshold); + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAcls(); + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withControlPlaneAcls(List controlPlaneAcls) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withControlPlaneAcls(controlPlaneAcls); + return this; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.innerProperties() == null ? null : this.innerProperties().trustedIpPrefixes(); + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withTrustedIpPrefixes(List trustedIpPrefixes) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); } + this.innerProperties().withTrustedIpPrefixes(trustedIpPrefixes); + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().uniqueRdConfiguration(); + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withUniqueRdConfiguration(UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withUniqueRdConfiguration(uniqueRdConfiguration); + return this; + } + + /** + * Get the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @return the qosConfiguration value. + */ + public QosPatchProperties qosConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().qosConfiguration(); + } + + /** + * Set the qosConfiguration property: NetworkFabric QoS Configuration. + * + * @param qosConfiguration the qosConfiguration value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withQosConfiguration(QosPatchProperties qosConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withQosConfiguration(qosConfiguration); + return this; + } + + /** + * Get the featureFlags property: NetworkFabric feature flag configuration information. + * + * @return the featureFlags value. + */ + public List featureFlags() { + return this.innerProperties() == null ? null : this.innerProperties().featureFlags(); + } + + /** + * Set the featureFlags property: NetworkFabric feature flag configuration information. + * + * @param featureFlags the featureFlags value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withFeatureFlags(List featureFlags) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withFeatureFlags(featureFlags); + return this; + } + + /** + * Get the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @return the authorizedTransceiver value. + */ + public AuthorizedTransceiverPatchProperties authorizedTransceiver() { + return this.innerProperties() == null ? null : this.innerProperties().authorizedTransceiver(); + } + + /** + * Set the authorizedTransceiver property: Authorized transciever configuration for NetworkFabric. + * + * @param authorizedTransceiver the authorizedTransceiver value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withAuthorizedTransceiver(AuthorizedTransceiverPatchProperties authorizedTransceiver) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withAuthorizedTransceiver(authorizedTransceiver); + return this; } /** @@ -254,6 +453,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -277,6 +477,8 @@ public static NetworkFabricPatch fromJson(JsonReader jsonReader) throws IOExcept deserializedNetworkFabricPatch.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkFabricPatch.innerProperties = NetworkFabricPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java deleted file mode 100644 index 47452ffa4d8e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Fabric updatable properties. - */ -@Fluent -public class NetworkFabricPatchableProperties implements JsonSerializable { - /* - * Number of compute racks associated to Network Fabric. - */ - private Integer rackCount; - - /* - * Number of servers.Possible values are from 1-16. - */ - private Integer serverCountPerRack; - - /* - * IPv4Prefix for Management Network. Example: 10.1.0.0/19. - */ - private String ipv4Prefix; - - /* - * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - */ - private String ipv6Prefix; - - /* - * ASN of CE devices for CE/PE connectivity. - */ - private Long fabricAsn; - - /* - * Network and credentials configuration already applied to terminal server. - */ - private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; - - /* - * Configuration to be used to setup the management network. - */ - private ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration; - - /** - * Creates an instance of NetworkFabricPatchableProperties class. - */ - public NetworkFabricPatchableProperties() { - } - - /** - * Get the rackCount property: Number of compute racks associated to Network Fabric. - * - * @return the rackCount value. - */ - public Integer rackCount() { - return this.rackCount; - } - - /** - * Set the rackCount property: Number of compute racks associated to Network Fabric. - * - * @param rackCount the rackCount value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withRackCount(Integer rackCount) { - this.rackCount = rackCount; - return this; - } - - /** - * Get the serverCountPerRack property: Number of servers.Possible values are from 1-16. - * - * @return the serverCountPerRack value. - */ - public Integer serverCountPerRack() { - return this.serverCountPerRack; - } - - /** - * Set the serverCountPerRack property: Number of servers.Possible values are from 1-16. - * - * @param serverCountPerRack the serverCountPerRack value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withServerCountPerRack(Integer serverCountPerRack) { - this.serverCountPerRack = serverCountPerRack; - return this; - } - - /** - * Get the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - * - * @return the ipv4Prefix value. - */ - public String ipv4Prefix() { - return this.ipv4Prefix; - } - - /** - * Set the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - * - * @param ipv4Prefix the ipv4Prefix value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withIpv4Prefix(String ipv4Prefix) { - this.ipv4Prefix = ipv4Prefix; - return this; - } - - /** - * Get the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - * - * @return the ipv6Prefix value. - */ - public String ipv6Prefix() { - return this.ipv6Prefix; - } - - /** - * Set the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - * - * @param ipv6Prefix the ipv6Prefix value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withIpv6Prefix(String ipv6Prefix) { - this.ipv6Prefix = ipv6Prefix; - return this; - } - - /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @return the fabricAsn value. - */ - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @param fabricAsn the fabricAsn value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; - } - - /** - * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @return the terminalServerConfiguration value. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { - return this.terminalServerConfiguration; - } - - /** - * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { - this.terminalServerConfiguration = terminalServerConfiguration; - return this; - } - - /** - * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. - * - * @return the managementNetworkConfiguration value. - */ - public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { - return this.managementNetworkConfiguration; - } - - /** - * Set the managementNetworkConfiguration property: Configuration to be used to setup the management network. - * - * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { - this.managementNetworkConfiguration = managementNetworkConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() != null) { - managementNetworkConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("rackCount", this.rackCount); - jsonWriter.writeNumberField("serverCountPerRack", this.serverCountPerRack); - jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); - jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); - jsonWriter.writeNumberField("fabricASN", this.fabricAsn); - jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); - jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricPatchableProperties. - */ - public static NetworkFabricPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricPatchableProperties deserializedNetworkFabricPatchableProperties - = new NetworkFabricPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rackCount".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.rackCount = reader.getNullable(JsonReader::getInt); - } else if ("serverCountPerRack".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.serverCountPerRack - = reader.getNullable(JsonReader::getInt); - } else if ("ipv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.ipv4Prefix = reader.getString(); - } else if ("ipv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.ipv6Prefix = reader.getString(); - } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("terminalServerConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.terminalServerConfiguration - = NetworkFabricPatchablePropertiesTerminalServerConfiguration.fromJson(reader); - } else if ("managementNetworkConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.managementNetworkConfiguration - = ManagementNetworkConfigurationPatchableProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java deleted file mode 100644 index fd502c41a351..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network and credentials configuration already applied to terminal server. - */ -@Fluent -public final class NetworkFabricPatchablePropertiesTerminalServerConfiguration - extends TerminalServerPatchableProperties { - /* - * IPv4 Address Prefix. - */ - private String primaryIpv4Prefix; - - /* - * IPv6 Address Prefix. - */ - private String primaryIpv6Prefix; - - /* - * Secondary IPv4 Address Prefix. - */ - private String secondaryIpv4Prefix; - - /* - * Secondary IPv6 Address Prefix. - */ - private String secondaryIpv6Prefix; - - /** - * Creates an instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration class. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration() { - } - - /** - * Get the primaryIpv4Prefix property: IPv4 Address Prefix. - * - * @return the primaryIpv4Prefix value. - */ - public String primaryIpv4Prefix() { - return this.primaryIpv4Prefix; - } - - /** - * Set the primaryIpv4Prefix property: IPv4 Address Prefix. - * - * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. - * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - this.primaryIpv4Prefix = primaryIpv4Prefix; - return this; - } - - /** - * Get the primaryIpv6Prefix property: IPv6 Address Prefix. - * - * @return the primaryIpv6Prefix value. - */ - public String primaryIpv6Prefix() { - return this.primaryIpv6Prefix; - } - - /** - * Set the primaryIpv6Prefix property: IPv6 Address Prefix. - * - * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. - * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - this.primaryIpv6Prefix = primaryIpv6Prefix; - return this; - } - - /** - * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. - * - * @return the secondaryIpv4Prefix value. - */ - public String secondaryIpv4Prefix() { - return this.secondaryIpv4Prefix; - } - - /** - * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. - * - * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. - * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration - withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - this.secondaryIpv4Prefix = secondaryIpv4Prefix; - return this; - } - - /** - * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. - * - * @return the secondaryIpv6Prefix value. - */ - public String secondaryIpv6Prefix() { - return this.secondaryIpv6Prefix; - } - - /** - * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. - * - * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. - * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. - */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration - withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - this.secondaryIpv6Prefix = secondaryIpv6Prefix; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricPatchablePropertiesTerminalServerConfiguration withUsername(String username) { - super.withUsername(username); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricPatchablePropertiesTerminalServerConfiguration withSerialNumber(String serialNumber) { - super.withSerialNumber(serialNumber); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", username()); - jsonWriter.writeStringField("password", password()); - jsonWriter.writeStringField("serialNumber", serialNumber()); - jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); - jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); - jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * NetworkFabricPatchablePropertiesTerminalServerConfiguration. - */ - public static NetworkFabricPatchablePropertiesTerminalServerConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricPatchablePropertiesTerminalServerConfiguration deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - = new NetworkFabricPatchablePropertiesTerminalServerConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withUsername(reader.getString()); - } else if ("password".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withPassword(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withSerialNumber(reader.getString()); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.primaryIpv4Prefix - = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.primaryIpv6Prefix - = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.secondaryIpv4Prefix - = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.secondaryIpv6Prefix - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncCertificatesResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncCertificatesResponse.java new file mode 100644 index 000000000000..5e109a7dedaa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncCertificatesResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkFabricResyncCertificatesResponse. + */ +public interface NetworkFabricResyncCertificatesResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner object. + * + * @return the inner object. + */ + NetworkFabricResyncCertificatesResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncPasswordsResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncPasswordsResponse.java new file mode 100644 index 000000000000..448da31d6c2e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncPasswordsResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkFabricResyncPasswordsResponse. + */ +public interface NetworkFabricResyncPasswordsResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner object. + * + * @return the inner object. + */ + NetworkFabricResyncPasswordsResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotateCertificatesResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotateCertificatesResponse.java new file mode 100644 index 000000000000..a9175569468f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotateCertificatesResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkFabricRotateCertificatesResponse. + */ +public interface NetworkFabricRotateCertificatesResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner object. + * + * @return the inner object. + */ + NetworkFabricRotateCertificatesResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotatePasswordsResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotatePasswordsResponse.java new file mode 100644 index 000000000000..7af128685e07 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotatePasswordsResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkFabricRotatePasswordsResponse. + */ +public interface NetworkFabricRotatePasswordsResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner object. + * + * @return the inner object. + */ + NetworkFabricRotatePasswordsResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java index 9b0709f77ded..4ae3b18280f9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java index 17efa49be63d..94b8da9bd751 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkFabricSkus { /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -27,8 +25,6 @@ public interface NetworkFabricSkus { Response getWithResponse(String networkFabricSkuName, Context context); /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -40,26 +36,22 @@ public interface NetworkFabricSkus { NetworkFabricSku get(String networkFabricSkuName); /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Fabric SKUs by subscription. - * * Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabricSku items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java index aae3b650440d..23393c81d116 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class NetworkFabricUpgradeAction extends ExpandableStringEnum { /** - * Static value Start for NetworkFabricUpgradeAction. + * UpgradeAction-Start. */ public static final NetworkFabricUpgradeAction START = fromString("Start"); /** - * Static value Complete for NetworkFabricUpgradeAction. + * UpgradeAction -Complete. */ public static final NetworkFabricUpgradeAction COMPLETE = fromString("Complete"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java index fe663cbb7e2d..99825e953add 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkFabrics { /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NetworkFabric getByResourceGroup(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteByResourceGroup(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkFabric items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -130,13 +112,11 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName); + OperationStatusResult provision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -145,14 +125,11 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName, - Context context); + OperationStatusResult provision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -160,13 +137,11 @@ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName); + OperationStatusResult deprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,14 +150,11 @@ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName, - Context context); + OperationStatusResult deprovision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -191,14 +163,12 @@ CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, + OperationStatusResult upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,14 +178,12 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, + OperationStatusResult upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,13 +191,11 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkFabricName); + OperationStatusResult refreshConfiguration(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,14 +204,11 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkFabricName, - Context context); + OperationStatusResult refreshConfiguration(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -255,14 +218,12 @@ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric * instance. * @@ -273,14 +234,12 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponse updateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -289,14 +248,12 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -306,14 +263,12 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(String resourceGroupName, + UpdateAdministrativeStateResponse updateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -322,14 +277,12 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body); /** - * Implements the operation to the underlying resources. - * * Validates the configuration of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -339,14 +292,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -356,11 +307,9 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return topology of the underlying resources in the given Network Fabric instance. */ - ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName); + GetTopologyResponse getTopology(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Gets Topology of the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -371,26 +320,162 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return topology of the underlying resources in the given Network Fabric instance. */ - ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName, Context context); + GetTopologyResponse getTopology(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. + * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitConfigurationResponse commitConfiguration(String resourceGroupName, String networkFabricName); + + /** * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String networkFabricName); + CommitConfigurationResponse commitConfiguration(String resourceGroupName, String networkFabricName, + CommitConfigurationRequest body, Context context); /** - * Implements the operation to the underlying resources. + * Post action: Returns a status of commit batch operation. * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitBatchStatusOperationResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommitBatchStatusOperationResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DiscardCommitBatchOperationResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DiscardCommitBatchOperationResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + OperationStatusResult lockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + OperationStatusResult lockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body, + Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(String resourceGroupName, + String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ViewDeviceConfigurationOperationResponse viewDeviceConfiguration(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ArmConfigurationDiffOperationResponse armConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -398,14 +483,152 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String networkFabricName, + ArmConfigurationDiffOperationResponse armConfigurationDiff(String resourceGroupName, String networkFabricName, Context context); /** - * Gets a Network Fabric. + * Rotate all passwords on the Terminal Server and Network Devices. + * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotatePasswordsResponse rotatePasswords(String resourceGroupName, String networkFabricName); + + /** + * Rotate all passwords on the Terminal Server and Network Devices. * + * Creates new passwords, then updates the Terminal Server and Network Devices to use the new passwords. + * + * Note that disabled devices cannot be updated and must be resynchronized with the new passwords once they are + * enabled. + * + * Fails if any of the devices could not be updated with the new password. + * Failed devices should be resynchronized with the new passwords once possible. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotatePasswordsResponse rotatePasswords(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkFabricName); + + /** + * Resync the latest passwords to the Terminal Server and Network Devices. + * + * Updates the Terminal Server and all Network Devices to use the latest passwords. Does not generate new passwords. + * + * Allows devices to be brought back in sync after a partially successful password rotation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncPasswordsResponse resyncPasswords(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotateCertificatesResponse rotateCertificates(String resourceGroupName, String networkFabricName); + + /** + * Rotate all certificates on Network Devices. + * + * Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled + * devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricRotateCertificatesResponse rotateCertificates(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, String networkFabricName); + + /** + * Re-sync all certificates on Network Devices. + * + * Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network + * devices missed during a previous certificate rotation to be brought back into sync. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkFabricResyncCertificatesResponse resyncCertificates(String resourceGroupName, String networkFabricName, + Context context); + + /** * Get Network Fabric resource details. * * @param id the resource ID. @@ -417,8 +640,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN NetworkFabric getById(String id); /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param id the resource ID. @@ -431,8 +652,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param id the resource ID. @@ -443,8 +662,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java index 63c4f2ec0782..fe1f5f6cc994 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -33,6 +33,13 @@ public interface NetworkInterface { */ String type(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -75,6 +82,34 @@ public interface NetworkInterface { */ String ipv6Address(); + /** + * Gets the description property: Description of the interface. + * + * @return the description value. + */ + String description(); + + /** + * Gets the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + String additionalDescription(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the networkFabricId property: Associated Network Fabric Resource ID. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + /** * Gets the provisioningState property: Provisioning state of the resource. * @@ -89,6 +124,13 @@ public interface NetworkInterface { */ AdministrativeState administrativeState(); + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + /** * Gets the annotation property: Switch configuration description. * @@ -145,7 +187,8 @@ interface WithParentResource { * The stage of the NetworkInterface definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithIdentity, DefinitionStages.WithAdditionalDescription, + DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -162,6 +205,32 @@ interface WithCreate extends DefinitionStages.WithAnnotation { NetworkInterface create(Context context); } + /** + * The stage of the NetworkInterface definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the NetworkInterface definition allowing to specify additionalDescription. + */ + interface WithAdditionalDescription { + /** + * Specifies the additionalDescription property: Additional description of the interface.. + * + * @param additionalDescription Additional description of the interface. + * @return the next definition stage. + */ + WithCreate withAdditionalDescription(String additionalDescription); + } + /** * The stage of the NetworkInterface definition allowing to specify annotation. */ @@ -186,7 +255,8 @@ interface WithAnnotation { /** * The template for NetworkInterface update. */ - interface Update extends UpdateStages.WithAnnotation { + interface Update + extends UpdateStages.WithIdentity, UpdateStages.WithAdditionalDescription, UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -207,6 +277,32 @@ interface Update extends UpdateStages.WithAnnotation { * The NetworkInterface update stages. */ interface UpdateStages { + /** + * The stage of the NetworkInterface update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the NetworkInterface update allowing to specify additionalDescription. + */ + interface WithAdditionalDescription { + /** + * Specifies the additionalDescription property: Additional description of the interface.. + * + * @param additionalDescription Additional description of the interface. + * @return the next definition stage. + */ + Update withAdditionalDescription(String additionalDescription); + } + /** * The stage of the NetworkInterface update allowing to specify annotation. */ @@ -237,21 +333,17 @@ interface WithAnnotation { NetworkInterface refresh(Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param body Request payload. @@ -259,7 +351,7 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java index ea9ff540fe3d..a93a0286327a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -22,6 +22,11 @@ public final class NetworkInterfacePatch implements JsonSerializable getWithResponse(String resourceGroupName, String netw String networkInterfaceName, Context context); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String netw NetworkInterface get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String netw void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String netw void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,14 +86,12 @@ Response getWithResponse(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkInterface items as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -115,14 +101,12 @@ PagedIterable listByNetworkDevice(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,14 +117,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param id the resource ID. @@ -152,8 +134,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource NetworkInterface getById(String id); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param id the resource ID. @@ -166,8 +146,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param id the resource ID. @@ -178,8 +156,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource void deleteById(String id); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java new file mode 100644 index 000000000000..9c9c51c4fb5b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import java.util.Map; + +/** + * An immutable client-side representation of NetworkMonitor. + */ +public interface NetworkMonitor { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @return the bmpConfiguration value. + */ + BmpConfigurationProperties bmpConfiguration(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provides you the latest status of the NetworkMonitor resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner object. + * + * @return the inner object. + */ + NetworkMonitorInner innerModel(); + + /** + * The entirety of the NetworkMonitor definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The NetworkMonitor definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NetworkMonitor definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the NetworkMonitor definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the NetworkMonitor definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkMonitor definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithBmpConfiguration, DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkMonitor create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkMonitor create(Context context); + } + + /** + * The stage of the NetworkMonitor definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the NetworkMonitor definition allowing to specify bmpConfiguration. + */ + interface WithBmpConfiguration { + /** + * Specifies the bmpConfiguration property: BMP Configurations for the Network Fabric.. + * + * @param bmpConfiguration BMP Configurations for the Network Fabric. + * @return the next definition stage. + */ + WithCreate withBmpConfiguration(BmpConfigurationProperties bmpConfiguration); + } + + /** + * The stage of the NetworkMonitor definition allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + + /** + * Begins update for the NetworkMonitor resource. + * + * @return the stage of resource update. + */ + NetworkMonitor.Update update(); + + /** + * The template for NetworkMonitor update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithBmpConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkMonitor apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkMonitor apply(Context context); + } + + /** + * The NetworkMonitor update stages. + */ + interface UpdateStages { + /** + * The stage of the NetworkMonitor update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the NetworkMonitor update allowing to specify bmpConfiguration. + */ + interface WithBmpConfiguration { + /** + * Specifies the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network + * Monitor.. + * + * @param bmpConfiguration BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * @return the next definition stage. + */ + Update withBmpConfiguration(BmpConfigurationPatchProperties bmpConfiguration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkMonitor refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkMonitor refresh(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java new file mode 100644 index 000000000000..beb8d00e0690 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorPatchProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The Network Monitor Patch resource definition. + */ +@Fluent +public final class NetworkMonitorPatch extends TagsUpdate { + /* + * Network Monitor Patch properties. + */ + private NetworkMonitorPatchProperties innerProperties; + + /** + * Creates an instance of NetworkMonitorPatch class. + */ + public NetworkMonitorPatch() { + } + + /** + * Get the innerProperties property: Network Monitor Patch properties. + * + * @return the innerProperties value. + */ + private NetworkMonitorPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkMonitorPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationPatchProperties bmpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bmpConfiguration(); + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorPatch object itself. + */ + public NetworkMonitorPatch withBmpConfiguration(BmpConfigurationPatchProperties bmpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkMonitorPatchProperties(); + } + this.innerProperties().withBmpConfiguration(bmpConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorPatch. + */ + public static NetworkMonitorPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorPatch deserializedNetworkMonitorPatch = new NetworkMonitorPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkMonitorPatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetworkMonitorPatch.innerProperties = NetworkMonitorPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java new file mode 100644 index 000000000000..3254de166600 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NetworkMonitors. + */ +public interface NetworkMonitors { + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context); + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + NetworkMonitor getByResourceGroup(String resourceGroupName, String networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkMonitorName, Context context); + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays NetworkMonitors list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Displays NetworkMonitors list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context); + + /** + * Implements NetworkMonitor GET method. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + NetworkMonitor getById(String id); + + /** + * Implements NetworkMonitor GET method. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkMonitor resource. + * + * @param name resource name. + * @return the first stage of the new NetworkMonitor definition. + */ + NetworkMonitor.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java index 79b59fa5d58d..5327f85bcc9c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,6 +50,13 @@ public interface NetworkPacketBroker { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -93,6 +100,13 @@ public interface NetworkPacketBroker { */ List neighborGroupIds(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the provisioningState property: Provisioning state of the resource. * @@ -100,6 +114,13 @@ public interface NetworkPacketBroker { */ ProvisioningState provisioningState(); + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + /** * Gets the region of the resource. * @@ -196,7 +217,7 @@ interface WithNetworkFabricId { * The stage of the NetworkPacketBroker definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -225,6 +246,19 @@ interface WithTags { */ WithCreate withTags(Map tags); } + + /** + * The stage of the NetworkPacketBroker definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } } /** @@ -237,7 +271,7 @@ interface WithTags { /** * The template for NetworkPacketBroker update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -263,13 +297,26 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } + + /** + * The stage of the NetworkPacketBroker update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java index a2bf291f8b69..aaa1b0809beb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,6 +16,11 @@ */ @Fluent public final class NetworkPacketBrokerPatch extends TagsUpdate { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of NetworkPacketBrokerPatch class. */ @@ -23,21 +28,32 @@ public NetworkPacketBrokerPatch() { } /** - * {@inheritDoc} + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. */ - @Override - public NetworkPacketBrokerPatch withTags(Map tags) { - super.withTags(tags); - return this; + public ManagedServiceIdentityPatch identity() { + return this.identity; } /** - * Validates the instance. + * Set the identity property: The managed service identities assigned to this resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param identity the identity value to set. + * @return the NetworkPacketBrokerPatch object itself. + */ + public NetworkPacketBrokerPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { + public NetworkPacketBrokerPatch withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -47,6 +63,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -68,6 +85,8 @@ public static NetworkPacketBrokerPatch fromJson(JsonReader jsonReader) throws IO if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkPacketBrokerPatch.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedNetworkPacketBrokerPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java index 11f80c7a6186..89b2469fb2eb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkPacketBrokers { /** - * Gets a Network Packet Broker. - * * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou String networkPacketBrokerName, Context context); /** - * Gets a Network Packet Broker. - * * Retrieves details of this Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou NetworkPacketBroker getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteByResourceGroup(String resourceGroupName, String networkPacketBrokerName); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou void delete(String resourceGroupName, String networkPacketBrokerName, Context context); /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all Network Packet Brokers under resource group. - * * Displays NetworkPacketBrokers list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Packet Brokers by subscription. - * * Displays Network Packet Brokers list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkPacketBroker items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets a Network Packet Broker. - * * Retrieves details of this Network Packet Broker. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou NetworkPacketBroker getById(String id); /** - * Gets a Network Packet Broker. - * * Retrieves details of this Network Packet Broker. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java index c9f6815efbeb..0de6437bc521 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -78,6 +78,13 @@ public interface NetworkRack { */ List networkDevices(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the provisioningState property: Provisioning state of the resource. * @@ -85,6 +92,13 @@ public interface NetworkRack { */ ProvisioningState provisioningState(); + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + /** * Gets the annotation property: Switch configuration description. * @@ -282,7 +296,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java new file mode 100644 index 000000000000..ddac90eb0a88 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Network Rack patch resource definition. + */ +@Fluent +public final class NetworkRackPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of NetworkRackPatch class. + */ + public NetworkRackPatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the NetworkRackPatch object itself. + */ + public NetworkRackPatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkRackPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkRackPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkRackPatch. + */ + public static NetworkRackPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkRackPatch deserializedNetworkRackPatch = new NetworkRackPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkRackPatch.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkRackPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java index 3a0f5dbc6138..9daa9595e894 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class NetworkRackType extends ExpandableStringEnum { /** - * Static value Aggregate for NetworkRackType. + * NetworkRackType-Aggregate. */ public static final NetworkRackType AGGREGATE = fromString("Aggregate"); /** - * Static value Compute for NetworkRackType. + * NetworkRackType-Compute. */ public static final NetworkRackType COMPUTE = fromString("Compute"); /** - * Static value Combined for NetworkRackType. + * NetworkRackType-Combined. */ public static final NetworkRackType COMBINED = fromString("Combined"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java index 4e7184b637a1..bbd344b96a5c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkRacks { /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S NetworkRack getByResourceGroup(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String networkRackName, Context context); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Racks by subscription. - * * List all Network Rack resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network Racks as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkRack items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S NetworkRack getById(String id); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteById(String id); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java index ce3b909128a7..d60df9e14787 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,6 +50,13 @@ public interface NetworkTap { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -71,12 +78,19 @@ public interface NetworkTap { */ String sourceTapRuleId(); + /** + * Gets the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + List networkFabricIds(); + /** * Gets the destinations property: List of destinations to send the filter traffic. * * @return the destinations value. */ - List destinations(); + List destinations(); /** * Gets the pollingType property: Polling type. @@ -85,6 +99,13 @@ public interface NetworkTap { */ PollingType pollingType(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Gets the configurations state of the resource. * @@ -218,15 +239,15 @@ interface WithDestinations { * @param destinations List of destinations to send the filter traffic. * @return the next definition stage. */ - WithCreate withDestinations(List destinations); + WithCreate withDestinations(List destinations); } /** * The stage of the NetworkTap definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithPollingType, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithPollingType, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -256,6 +277,19 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the NetworkTap definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the NetworkTap definition allowing to specify pollingType. */ @@ -293,8 +327,8 @@ interface WithAnnotation { /** * The template for NetworkTap update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithPollingType, UpdateStages.WithDestinations, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithPollingType, + UpdateStages.WithDestinations, UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -320,7 +354,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -328,6 +362,19 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the NetworkTap update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + /** * The stage of the NetworkTap update allowing to specify pollingType. */ @@ -351,7 +398,7 @@ interface WithDestinations { * @param destinations List of destination properties to send the filter traffic. * @return the next definition stage. */ - Update withDestinationsForUpdate(List destinations); + Update withDestinationsForUpdate(List destinations); } /** @@ -384,21 +431,17 @@ interface WithAnnotation { NetworkTap refresh(Context context); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -406,31 +449,27 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(); + NetworkTapResyncResponse resync(); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(Context context); + NetworkTapResyncResponse resync(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java index 074880ede293..1aa6598c3695 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchableParameters; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchProperties; import java.io.IOException; import java.util.List; import java.util.Map; @@ -19,9 +19,14 @@ @Fluent public final class NetworkTapPatch extends TagsUpdate { /* - * Resource properties. + * NetworkTap resource patch properties. */ - private NetworkTapPatchableParameters innerProperties; + private NetworkTapPatchProperties innerProperties; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; /** * Creates an instance of NetworkTapPatch class. @@ -30,14 +35,34 @@ public NetworkTapPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: NetworkTap resource patch properties. * * @return the innerProperties value. */ - private NetworkTapPatchableParameters innerProperties() { + private NetworkTapPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkTapPatch object itself. + */ + public NetworkTapPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -64,7 +89,7 @@ public PollingType pollingType() { */ public NetworkTapPatch withPollingType(PollingType pollingType) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkTapPatchableParameters(); + this.innerProperties = new NetworkTapPatchProperties(); } this.innerProperties().withPollingType(pollingType); return this; @@ -75,7 +100,7 @@ public NetworkTapPatch withPollingType(PollingType pollingType) { * * @return the destinations value. */ - public List destinations() { + public List destinations() { return this.innerProperties() == null ? null : this.innerProperties().destinations(); } @@ -85,9 +110,9 @@ public List destinations() { * @param destinations the destinations value to set. * @return the NetworkTapPatch object itself. */ - public NetworkTapPatch withDestinations(List destinations) { + public NetworkTapPatch withDestinations(List destinations) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkTapPatchableParameters(); + this.innerProperties = new NetworkTapPatchProperties(); } this.innerProperties().withDestinations(destinations); return this; @@ -110,24 +135,12 @@ public String annotation() { */ public NetworkTapPatch withAnnotation(String annotation) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkTapPatchableParameters(); + this.innerProperties = new NetworkTapPatchProperties(); } this.innerProperties().withAnnotation(annotation); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -136,6 +149,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -158,7 +172,9 @@ public static NetworkTapPatch fromJson(JsonReader jsonReader) throws IOException Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkTapPatch.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkTapPatch.innerProperties = NetworkTapPatchableParameters.fromJson(reader); + deserializedNetworkTapPatch.innerProperties = NetworkTapPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkTapPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java deleted file mode 100644 index 056cec8a8355..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Destination. - */ -@Fluent -public final class NetworkTapPatchableParametersDestinationsItem extends DestinationProperties { - /** - * Creates an instance of NetworkTapPatchableParametersDestinationsItem class. - */ - public NetworkTapPatchableParametersDestinationsItem() { - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPatchableParametersDestinationsItem withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPatchableParametersDestinationsItem withDestinationType(DestinationType destinationType) { - super.withDestinationType(destinationType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPatchableParametersDestinationsItem withDestinationId(String destinationId) { - super.withDestinationId(destinationId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPatchableParametersDestinationsItem - withIsolationDomainProperties(IsolationDomainProperties isolationDomainProperties) { - super.withIsolationDomainProperties(isolationDomainProperties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPatchableParametersDestinationsItem withDestinationTapRuleId(String destinationTapRuleId) { - super.withDestinationTapRuleId(destinationTapRuleId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("destinationType", destinationType() == null ? null : destinationType().toString()); - jsonWriter.writeStringField("destinationId", destinationId()); - jsonWriter.writeJsonField("isolationDomainProperties", isolationDomainProperties()); - jsonWriter.writeStringField("destinationTapRuleId", destinationTapRuleId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapPatchableParametersDestinationsItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPatchableParametersDestinationsItem if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPatchableParametersDestinationsItem. - */ - public static NetworkTapPatchableParametersDestinationsItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapPatchableParametersDestinationsItem deserializedNetworkTapPatchableParametersDestinationsItem - = new NetworkTapPatchableParametersDestinationsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem.withName(reader.getString()); - } else if ("destinationType".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withDestinationType(DestinationType.fromString(reader.getString())); - } else if ("destinationId".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem.withDestinationId(reader.getString()); - } else if ("isolationDomainProperties".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withIsolationDomainProperties(IsolationDomainProperties.fromJson(reader)); - } else if ("destinationTapRuleId".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withDestinationTapRuleId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapPatchableParametersDestinationsItem; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java deleted file mode 100644 index c99b2ccc52c3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Destination. - */ -@Fluent -public final class NetworkTapPropertiesDestinationsItem extends DestinationProperties { - /** - * Creates an instance of NetworkTapPropertiesDestinationsItem class. - */ - public NetworkTapPropertiesDestinationsItem() { - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPropertiesDestinationsItem withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPropertiesDestinationsItem withDestinationType(DestinationType destinationType) { - super.withDestinationType(destinationType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPropertiesDestinationsItem withDestinationId(String destinationId) { - super.withDestinationId(destinationId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPropertiesDestinationsItem - withIsolationDomainProperties(IsolationDomainProperties isolationDomainProperties) { - super.withIsolationDomainProperties(isolationDomainProperties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkTapPropertiesDestinationsItem withDestinationTapRuleId(String destinationTapRuleId) { - super.withDestinationTapRuleId(destinationTapRuleId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("destinationType", destinationType() == null ? null : destinationType().toString()); - jsonWriter.writeStringField("destinationId", destinationId()); - jsonWriter.writeJsonField("isolationDomainProperties", isolationDomainProperties()); - jsonWriter.writeStringField("destinationTapRuleId", destinationTapRuleId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapPropertiesDestinationsItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPropertiesDestinationsItem if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPropertiesDestinationsItem. - */ - public static NetworkTapPropertiesDestinationsItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapPropertiesDestinationsItem deserializedNetworkTapPropertiesDestinationsItem - = new NetworkTapPropertiesDestinationsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withName(reader.getString()); - } else if ("destinationType".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem - .withDestinationType(DestinationType.fromString(reader.getString())); - } else if ("destinationId".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withDestinationId(reader.getString()); - } else if ("isolationDomainProperties".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem - .withIsolationDomainProperties(IsolationDomainProperties.fromJson(reader)); - } else if ("destinationTapRuleId".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withDestinationTapRuleId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapPropertiesDestinationsItem; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapResyncResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapResyncResponse.java new file mode 100644 index 000000000000..0bfe6d98dac6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapResyncResponse.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkTapResyncResponse. + */ +public interface NetworkTapResyncResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner object. + * + * @return the inner object. + */ + NetworkTapResyncResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java index dc620e53b705..a8dfc5ac09bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -51,6 +51,13 @@ public interface NetworkTapRule { */ Map tags(); + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -59,81 +66,117 @@ public interface NetworkTapRule { SystemData systemData(); /** - * Gets the networkTapId property: The ARM resource Id of the NetworkTap. + * Gets the annotation property: Switch configuration description. * - * @return the networkTapId value. + * @return the annotation value. */ - String networkTapId(); + String annotation(); /** - * Gets the pollingIntervalInSeconds property: Polling interval in seconds. + * Gets the configurationType property: Input method to configure Network Tap Rule. * - * @return the pollingIntervalInSeconds value. + * @return the configurationType value. */ - PollingIntervalInSeconds pollingIntervalInSeconds(); + ConfigurationType configurationType(); /** - * Gets the lastSyncedTime property: The last sync timestamp. + * Gets the tapRulesUrl property: Network Tap Rules file URL. * - * @return the lastSyncedTime value. + * @return the tapRulesUrl value. */ - OffsetDateTime lastSyncedTime(); + String tapRulesUrl(); /** - * Gets the configurationState property: Configuration state of the resource. + * Gets the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @return the configurationState value. + * @return the identitySelector value. */ - ConfigurationState configurationState(); + IdentitySelector identitySelector(); /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the matchConfigurations property: List of match configurations. * - * @return the provisioningState value. + * @return the matchConfigurations value. */ - ProvisioningState provisioningState(); + List matchConfigurations(); /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the dynamicMatchConfigurations property: List of dynamic match configurations. * - * @return the administrativeState value. + * @return the dynamicMatchConfigurations value. */ - AdministrativeState administrativeState(); + List dynamicMatchConfigurations(); /** - * Gets the configurationType property: Input method to configure Network Tap Rule. + * Gets the networkTapId property: The ARM resource Id of the NetworkTap. * - * @return the configurationType value. + * @return the networkTapId value. */ - ConfigurationType configurationType(); + String networkTapId(); /** - * Gets the tapRulesUrl property: Network Tap Rules file URL. + * Gets the networkTapIds property: The ARM resource Id of the NetworkTap Rules. * - * @return the tapRulesUrl value. + * @return the networkTapIds value. */ - String tapRulesUrl(); + List networkTapIds(); /** - * Gets the matchConfigurations property: List of match configurations. + * Gets the pollingIntervalInSeconds property: Polling interval in seconds. * - * @return the matchConfigurations value. + * @return the pollingIntervalInSeconds value. */ - List matchConfigurations(); + Integer pollingIntervalInSeconds(); /** - * Gets the dynamicMatchConfigurations property: List of dynamic match configurations. + * Gets the lastSyncedTime property: The last sync timestamp. * - * @return the dynamicMatchConfigurations value. + * @return the lastSyncedTime value. */ - List dynamicMatchConfigurations(); + OffsetDateTime lastSyncedTime(); /** - * Gets the annotation property: Switch configuration description. + * Gets the globalNetworkTapRuleActions property: Global network tap rule actions. * - * @return the annotation value. + * @return the globalNetworkTapRuleActions value. */ - String annotation(); + GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + + /** + * Gets the networkFabricIds property: Associated Network Fabric Resource IDs. + * + * @return the networkFabricIds value. + */ + List networkFabricIds(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); /** * Gets the region of the resource. @@ -167,7 +210,7 @@ public interface NetworkTapRule { * The entirety of the NetworkTapRule definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithConfigurationType, DefinitionStages.WithCreate { } /** @@ -211,17 +254,30 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithConfigurationType withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkTapRule definition allowing to specify configurationType. + */ + interface WithConfigurationType { + /** + * Specifies the configurationType property: Input method to configure Network Tap Rule.. + * + * @param configurationType Input method to configure Network Tap Rule. + * @return the next definition stage. + */ + WithCreate withConfigurationType(ConfigurationType configurationType); } /** * The stage of the NetworkTapRule definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPollingIntervalInSeconds, - DefinitionStages.WithConfigurationType, DefinitionStages.WithTapRulesUrl, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithAnnotation, DefinitionStages.WithTapRulesUrl, DefinitionStages.WithIdentitySelector, DefinitionStages.WithMatchConfigurations, DefinitionStages.WithDynamicMatchConfigurations, - DefinitionStages.WithAnnotation { + DefinitionStages.WithPollingIntervalInSeconds, DefinitionStages.WithGlobalNetworkTapRuleActions { /** * Executes the create request. * @@ -252,29 +308,29 @@ interface WithTags { } /** - * The stage of the NetworkTapRule definition allowing to specify pollingIntervalInSeconds. + * The stage of the NetworkTapRule definition allowing to specify identity. */ - interface WithPollingIntervalInSeconds { + interface WithIdentity { /** - * Specifies the pollingIntervalInSeconds property: Polling interval in seconds.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param pollingIntervalInSeconds Polling interval in seconds. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - WithCreate withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the NetworkTapRule definition allowing to specify configurationType. + * The stage of the NetworkTapRule definition allowing to specify annotation. */ - interface WithConfigurationType { + interface WithAnnotation { /** - * Specifies the configurationType property: Input method to configure Network Tap Rule.. + * Specifies the annotation property: Switch configuration description.. * - * @param configurationType Input method to configure Network Tap Rule. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withConfigurationType(ConfigurationType configurationType); + WithCreate withAnnotation(String annotation); } /** @@ -290,6 +346,21 @@ interface WithTapRulesUrl { WithCreate withTapRulesUrl(String tapRulesUrl); } + /** + * The stage of the NetworkTapRule definition allowing to specify identitySelector. + */ + interface WithIdentitySelector { + /** + * Specifies the identitySelector property: The selection of the managed identity to use with this storage + * account. The identity type must be either system assigned or user assigned.. + * + * @param identitySelector The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. + * @return the next definition stage. + */ + WithCreate withIdentitySelector(IdentitySelector identitySelector); + } + /** * The stage of the NetworkTapRule definition allowing to specify matchConfigurations. */ @@ -317,16 +388,30 @@ interface WithDynamicMatchConfigurations { } /** - * The stage of the NetworkTapRule definition allowing to specify annotation. + * The stage of the NetworkTapRule definition allowing to specify pollingIntervalInSeconds. */ - interface WithAnnotation { + interface WithPollingIntervalInSeconds { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the pollingIntervalInSeconds property: Polling interval in seconds.. * - * @param annotation Switch configuration description. + * @param pollingIntervalInSeconds Polling interval in seconds. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withPollingIntervalInSeconds(Integer pollingIntervalInSeconds); + } + + /** + * The stage of the NetworkTapRule definition allowing to specify globalNetworkTapRuleActions. + */ + interface WithGlobalNetworkTapRuleActions { + /** + * Specifies the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions Global network tap rule actions. + * @return the next definition stage. + */ + WithCreate + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions); } } @@ -340,8 +425,10 @@ interface WithAnnotation { /** * The template for NetworkTapRule update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithConfigurationType, UpdateStages.WithTapRulesUrl, - UpdateStages.WithMatchConfigurations, UpdateStages.WithDynamicMatchConfigurations, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithAnnotation, + UpdateStages.WithConfigurationType, UpdateStages.WithTapRulesUrl, UpdateStages.WithMatchConfigurations, + UpdateStages.WithDynamicMatchConfigurations, UpdateStages.WithIdentitySelector, + UpdateStages.WithGlobalNetworkTapRuleActions { /** * Executes the update request. * @@ -367,7 +454,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -375,6 +462,32 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the NetworkTapRule update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentityPatch identity); + } + + /** + * The stage of the NetworkTapRule update allowing to specify annotation. + */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + /** * The stage of the NetworkTapRule update allowing to specify configurationType. */ @@ -411,7 +524,7 @@ interface WithMatchConfigurations { * @param matchConfigurations List of match configurations. * @return the next definition stage. */ - Update withMatchConfigurations(List matchConfigurations); + Update withMatchConfigurationsForUpdate(List matchConfigurations); } /** @@ -424,20 +537,37 @@ interface WithDynamicMatchConfigurations { * @param dynamicMatchConfigurations List of dynamic match configurations. * @return the next definition stage. */ - Update withDynamicMatchConfigurations(List dynamicMatchConfigurations); + Update withDynamicMatchConfigurationsForUpdate( + List dynamicMatchConfigurations); } /** - * The stage of the NetworkTapRule update allowing to specify annotation. + * The stage of the NetworkTapRule update allowing to specify identitySelector. */ - interface WithAnnotation { + interface WithIdentitySelector { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the identitySelector property: The selection of the managed identity to use with this storage + * account. The identity type must be either system assigned or user assigned.. * - * @param annotation Switch configuration description. + * @param identitySelector The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withIdentitySelector(IdentitySelectorPatch identitySelector); + } + + /** + * The stage of the NetworkTapRule update allowing to specify globalNetworkTapRuleActions. + */ + interface WithGlobalNetworkTapRuleActions { + /** + * Specifies the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions Global network tap rule actions. + * @return the next definition stage. + */ + Update + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions); } } @@ -457,21 +587,17 @@ interface WithAnnotation { NetworkTapRule refresh(Context context); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -479,55 +605,47 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(); + NetworkTapRuleResyncResponse resync(); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(Context context); + NetworkTapRuleResyncResponse resync(Context context); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java index 1e55a7c525ff..077f7bb18f87 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -37,8 +37,7 @@ public final class NetworkTapRuleAction implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private TapRuleActionType type; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /* + * The parameter to enable or disable the timestamp. + */ + private BooleanEnumProperty isTimestampEnabled; + + /* + * Destination Id. The ARM resource Id may be either Network To Network Interconnect or NeighborGroup. + */ + private String destinationId; + + /* + * The name of the match configuration. This is used when Goto type is provided. + */ + private String matchConfigurationName; + + /** + * Creates an instance of NetworkTapRuleActionPatch class. + */ + public NetworkTapRuleActionPatch() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public TapRuleActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withType(TapRuleActionType type) { + this.type = type; + return this; + } + + /** + * Get the truncate property: Truncate. 0 indicates do not truncate. + * + * @return the truncate value. + */ + public String truncate() { + return this.truncate; + } + + /** + * Set the truncate property: Truncate. 0 indicates do not truncate. + * + * @param truncate the truncate value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * Get the isTimestampEnabled property: The parameter to enable or disable the timestamp. + * + * @return the isTimestampEnabled value. + */ + public BooleanEnumProperty isTimestampEnabled() { + return this.isTimestampEnabled; + } + + /** + * Set the isTimestampEnabled property: The parameter to enable or disable the timestamp. + * + * @param isTimestampEnabled the isTimestampEnabled value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withIsTimestampEnabled(BooleanEnumProperty isTimestampEnabled) { + this.isTimestampEnabled = isTimestampEnabled; + return this; + } + + /** + * Get the destinationId property: Destination Id. The ARM resource Id may be either Network To Network Interconnect + * or NeighborGroup. + * + * @return the destinationId value. + */ + public String destinationId() { + return this.destinationId; + } + + /** + * Set the destinationId property: Destination Id. The ARM resource Id may be either Network To Network Interconnect + * or NeighborGroup. + * + * @param destinationId the destinationId value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withDestinationId(String destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. This is used when Goto type is + * provided. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. This is used when Goto type is + * provided. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + jsonWriter.writeStringField("isTimestampEnabled", + this.isTimestampEnabled == null ? null : this.isTimestampEnabled.toString()); + jsonWriter.writeStringField("destinationId", this.destinationId); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleActionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleActionPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleActionPatch. + */ + public static NetworkTapRuleActionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleActionPatch deserializedNetworkTapRuleActionPatch = new NetworkTapRuleActionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.type = TapRuleActionType.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.truncate = reader.getString(); + } else if ("isTimestampEnabled".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.isTimestampEnabled + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("destinationId".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.destinationId = reader.getString(); + } else if ("matchConfigurationName".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.matchConfigurationName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleActionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java index 084195e10395..a75ddac4472b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -99,24 +99,6 @@ public NetworkTapRuleMatchCondition withIpCondition(IpMatchCondition ipCondition return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (portCondition() != null) { - portCondition().validate(); - } - if (vlanMatchCondition() != null) { - vlanMatchCondition().validate(); - } - if (ipCondition() != null) { - ipCondition().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java new file mode 100644 index 000000000000..e32901d0e171 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match condition that is supported to filter the traffic. + */ +@Fluent +public final class NetworkTapRuleMatchConditionPatch extends CommonMatchConditionsPatch { + /* + * Encapsulation Type that needs to be matched. + */ + private EncapsulationType encapsulationType; + + /* + * Defines the port condition that needs to be matched. + */ + private PortConditionPatch portCondition; + + /** + * Creates an instance of NetworkTapRuleMatchConditionPatch class. + */ + public NetworkTapRuleMatchConditionPatch() { + } + + /** + * Get the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @return the encapsulationType value. + */ + public EncapsulationType encapsulationType() { + return this.encapsulationType; + } + + /** + * Set the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @param encapsulationType the encapsulationType value to set. + * @return the NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch withEncapsulationType(EncapsulationType encapsulationType) { + this.encapsulationType = encapsulationType; + return this; + } + + /** + * Get the portCondition property: Defines the port condition that needs to be matched. + * + * @return the portCondition value. + */ + public PortConditionPatch portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Defines the port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch withPortCondition(PortConditionPatch portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkTapRuleMatchConditionPatch withProtocolTypes(List protocolTypes) { + super.withProtocolTypes(protocolTypes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkTapRuleMatchConditionPatch withVlanMatchCondition(VlanMatchConditionPatch vlanMatchCondition) { + super.withVlanMatchCondition(vlanMatchCondition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkTapRuleMatchConditionPatch withIpCondition(IpMatchConditionPatch ipCondition) { + super.withIpCondition(ipCondition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("protocolTypes", protocolTypes(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", vlanMatchCondition()); + jsonWriter.writeJsonField("ipCondition", ipCondition()); + jsonWriter.writeStringField("encapsulationType", + this.encapsulationType == null ? null : this.encapsulationType.toString()); + jsonWriter.writeJsonField("portCondition", this.portCondition); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleMatchConditionPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleMatchConditionPatch. + */ + public static NetworkTapRuleMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleMatchConditionPatch deserializedNetworkTapRuleMatchConditionPatch + = new NetworkTapRuleMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkTapRuleMatchConditionPatch.withProtocolTypes(protocolTypes); + } else if ("vlanMatchCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch + .withVlanMatchCondition(VlanMatchConditionPatch.fromJson(reader)); + } else if ("ipCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch + .withIpCondition(IpMatchConditionPatch.fromJson(reader)); + } else if ("encapsulationType".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.encapsulationType + = EncapsulationType.fromString(reader.getString()); + } else if ("portCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.portCondition = PortConditionPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java index 7c16e2c4b690..77fe5ba21053 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -148,20 +148,6 @@ public NetworkTapRuleMatchConfiguration withActions(List a return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchConditions() != null) { - matchConditions().forEach(e -> e.validate()); - } - if (actions() != null) { - actions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java new file mode 100644 index 000000000000..ead530d33448 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match configuration that are supported to filter the traffic. + */ +@Fluent +public final class NetworkTapRuleMatchConfigurationPatch + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration.. + */ + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + private IpAddressType ipAddressType; + + /* + * List of the match conditions. + */ + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + private List actions; + + /** + * Creates an instance of NetworkTapRuleMatchConfigurationPatch class. + */ + public NetworkTapRuleMatchConfigurationPatch() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration.. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration.. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConditions property: List of the match conditions. + * + * @return the matchConditions value. + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set the matchConditions property: List of the match conditions. + * + * @param matchConditions the matchConditions value to set. + * @return the NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch + withMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get the actions property: List of actions that need to be performed for the matched conditions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions that need to be performed for the matched conditions. + * + * @param actions the actions value to set. + * @return the NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConditions", this.matchConditions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleMatchConfigurationPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleMatchConfigurationPatch. + */ + public static NetworkTapRuleMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleMatchConfigurationPatch deserializedNetworkTapRuleMatchConfigurationPatch + = new NetworkTapRuleMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.matchConfigurationName = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("ipAddressType".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.ipAddressType + = IpAddressType.fromString(reader.getString()); + } else if ("matchConditions".equals(fieldName)) { + List matchConditions + = reader.readArray(reader1 -> NetworkTapRuleMatchConditionPatch.fromJson(reader1)); + deserializedNetworkTapRuleMatchConfigurationPatch.matchConditions = matchConditions; + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> NetworkTapRuleActionPatch.fromJson(reader1)); + deserializedNetworkTapRuleMatchConfigurationPatch.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleMatchConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java index 85fd517d0ff6..4949d4ca3937 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -23,6 +23,11 @@ public final class NetworkTapRulePatch extends TagsUpdate { */ private NetworkTapRulePatchProperties innerProperties; + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentityPatch identity; + /** * Creates an instance of NetworkTapRulePatch class. */ @@ -38,6 +43,26 @@ private NetworkTapRulePatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentityPatch identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; + return this; + } + /** * {@inheritDoc} */ @@ -47,6 +72,29 @@ public NetworkTapRulePatch withTags(Map tags) { return this; } + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + /** * Get the configurationType property: Input method to configure Network Tap Rule. * @@ -98,7 +146,7 @@ public NetworkTapRulePatch withTapRulesUrl(String tapRulesUrl) { * * @return the matchConfigurations value. */ - public List matchConfigurations() { + public List matchConfigurations() { return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); } @@ -108,7 +156,8 @@ public List matchConfigurations() { * @param matchConfigurations the matchConfigurations value to set. * @return the NetworkTapRulePatch object itself. */ - public NetworkTapRulePatch withMatchConfigurations(List matchConfigurations) { + public NetworkTapRulePatch + withMatchConfigurations(List matchConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapRulePatchProperties(); } @@ -121,7 +170,7 @@ public NetworkTapRulePatch withMatchConfigurations(List dynamicMatchConfigurations() { + public List dynamicMatchConfigurations() { return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); } @@ -132,7 +181,7 @@ public List dynamicMatchConfigurations() { * @return the NetworkTapRulePatch object itself. */ public NetworkTapRulePatch - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + withDynamicMatchConfigurations(List dynamicMatchConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapRulePatchProperties(); } @@ -141,38 +190,52 @@ public List dynamicMatchConfigurations() { } /** - * Get the annotation property: Switch configuration description. + * Get the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @return the annotation value. + * @return the identitySelector value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public IdentitySelectorPatch identitySelector() { + return this.innerProperties() == null ? null : this.innerProperties().identitySelector(); } /** - * Set the annotation property: Switch configuration description. + * Set the identitySelector property: The selection of the managed identity to use with this storage account. The + * identity type must be either system assigned or user assigned. * - * @param annotation the annotation value to set. + * @param identitySelector the identitySelector value to set. * @return the NetworkTapRulePatch object itself. */ - public NetworkTapRulePatch withAnnotation(String annotation) { + public NetworkTapRulePatch withIdentitySelector(IdentitySelectorPatch identitySelector) { if (this.innerProperties() == null) { this.innerProperties = new NetworkTapRulePatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withIdentitySelector(identitySelector); return this; } /** - * Validates the instance. + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the globalNetworkTapRuleActions value. */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions() { + return this.innerProperties() == null ? null : this.innerProperties().globalNetworkTapRuleActions(); + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); } + this.innerProperties().withGlobalNetworkTapRuleActions(globalNetworkTapRuleActions); + return this; } /** @@ -183,6 +246,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -206,6 +270,8 @@ public static NetworkTapRulePatch fromJson(JsonReader jsonReader) throws IOExcep deserializedNetworkTapRulePatch.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedNetworkTapRulePatch.innerProperties = NetworkTapRulePatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkTapRulePatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java deleted file mode 100644 index 2975564d3a95..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network Tap Rule updatable properties. - */ -@Fluent -public class NetworkTapRulePatchableProperties implements JsonSerializable { - /* - * Input method to configure Network Tap Rule. - */ - private ConfigurationType configurationType; - - /* - * Network Tap Rules file URL. - */ - private String tapRulesUrl; - - /* - * List of match configurations. - */ - private List matchConfigurations; - - /* - * List of dynamic match configurations. - */ - private List dynamicMatchConfigurations; - - /** - * Creates an instance of NetworkTapRulePatchableProperties class. - */ - public NetworkTapRulePatchableProperties() { - } - - /** - * Get the configurationType property: Input method to configure Network Tap Rule. - * - * @return the configurationType value. - */ - public ConfigurationType configurationType() { - return this.configurationType; - } - - /** - * Set the configurationType property: Input method to configure Network Tap Rule. - * - * @param configurationType the configurationType value to set. - * @return the NetworkTapRulePatchableProperties object itself. - */ - public NetworkTapRulePatchableProperties withConfigurationType(ConfigurationType configurationType) { - this.configurationType = configurationType; - return this; - } - - /** - * Get the tapRulesUrl property: Network Tap Rules file URL. - * - * @return the tapRulesUrl value. - */ - public String tapRulesUrl() { - return this.tapRulesUrl; - } - - /** - * Set the tapRulesUrl property: Network Tap Rules file URL. - * - * @param tapRulesUrl the tapRulesUrl value to set. - * @return the NetworkTapRulePatchableProperties object itself. - */ - public NetworkTapRulePatchableProperties withTapRulesUrl(String tapRulesUrl) { - this.tapRulesUrl = tapRulesUrl; - return this; - } - - /** - * Get the matchConfigurations property: List of match configurations. - * - * @return the matchConfigurations value. - */ - public List matchConfigurations() { - return this.matchConfigurations; - } - - /** - * Set the matchConfigurations property: List of match configurations. - * - * @param matchConfigurations the matchConfigurations value to set. - * @return the NetworkTapRulePatchableProperties object itself. - */ - public NetworkTapRulePatchableProperties - withMatchConfigurations(List matchConfigurations) { - this.matchConfigurations = matchConfigurations; - return this; - } - - /** - * Get the dynamicMatchConfigurations property: List of dynamic match configurations. - * - * @return the dynamicMatchConfigurations value. - */ - public List dynamicMatchConfigurations() { - return this.dynamicMatchConfigurations; - } - - /** - * Set the dynamicMatchConfigurations property: List of dynamic match configurations. - * - * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. - * @return the NetworkTapRulePatchableProperties object itself. - */ - public NetworkTapRulePatchableProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { - this.dynamicMatchConfigurations = dynamicMatchConfigurations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("configurationType", - this.configurationType == null ? null : this.configurationType.toString()); - jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); - jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapRulePatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapRulePatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapRulePatchableProperties. - */ - public static NetworkTapRulePatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapRulePatchableProperties deserializedNetworkTapRulePatchableProperties - = new NetworkTapRulePatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("configurationType".equals(fieldName)) { - deserializedNetworkTapRulePatchableProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("tapRulesUrl".equals(fieldName)) { - deserializedNetworkTapRulePatchableProperties.tapRulesUrl = reader.getString(); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRulePatchableProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRulePatchableProperties.dynamicMatchConfigurations - = dynamicMatchConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapRulePatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleResyncResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleResyncResponse.java new file mode 100644 index 000000000000..f8e44ec38b3e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleResyncResponse.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NetworkTapRuleResyncResponse. + */ +public interface NetworkTapRuleResyncResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner + * object. + * + * @return the inner object. + */ + NetworkTapRuleResyncResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java index 5c51ed53872a..98af807aee6e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkTapRules { /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName Context context); /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName NetworkTapRule getByResourceGroup(String resourceGroupName, String networkTapRuleName); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName void deleteByResourceGroup(String resourceGroupName, String networkTapRuleName); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName void delete(String resourceGroupName, String networkTapRuleName, Context context); /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Tap Rules by resource group. - * * List all the Network Tap Rule resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkTapRules by subscription. - * * List all the Network Tap Rule resources in the given subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTapRule items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,14 +128,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,13 +141,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName); + NetworkTapRuleResyncResponse resync(String resourceGroupName, String networkTapRuleName); /** - * Resync the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,13 +154,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName, Context context); + NetworkTapRuleResyncResponse resync(String resourceGroupName, String networkTapRuleName, Context context); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -192,13 +166,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkTapRuleName); /** - * Validates the configuration of the Network Tap Rule. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -207,14 +179,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkTapRuleName, Context context); /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param id the resource ID. @@ -226,8 +196,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St NetworkTapRule getById(String id); /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param id the resource ID. @@ -240,8 +208,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param id the resource ID. @@ -252,8 +218,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St void deleteById(String id); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java index 0eee5a2165b7..d7c2e558b6ca 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkTaps { /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St Context context); /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St NetworkTap getByResourceGroup(String resourceGroupName, String networkTapName); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St void deleteByResourceGroup(String resourceGroupName, String networkTapName); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St void delete(String resourceGroupName, String networkTapName, Context context); /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Taps by resource group. - * * Displays Network Taps list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Taps by subscription. - * * Displays Network Taps list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkTap items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,14 +128,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String networkTapName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,13 +141,11 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName); + NetworkTapResyncResponse resync(String resourceGroupName, String networkTapName); /** - * Resync operation on the Network Tap. - * * Implements the operation to the underlying resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,13 +154,11 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName, Context context); + NetworkTapResyncResponse resync(String resourceGroupName, String networkTapName, Context context); /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param id the resource ID. @@ -196,8 +170,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc NetworkTap getById(String id); /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param id the resource ID. @@ -210,8 +182,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param id the resource ID. @@ -222,8 +192,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc void deleteById(String id); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java index 7c22df9269d4..e1470e30366f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,7 +73,7 @@ public interface NetworkToNetworkInterconnect { * * @return the optionBLayer3Configuration value. */ - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration(); + OptionBLayer3Configuration optionBLayer3Configuration(); /** * Gets the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. @@ -83,14 +83,21 @@ public interface NetworkToNetworkInterconnect { NpbStaticRouteConfiguration npbStaticRouteConfiguration(); /** - * Gets the importRoutePolicy property: Import Route Policy configuration. + * Gets the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + NniStaticRouteConfiguration staticRouteConfiguration(); + + /** + * Gets the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ ImportRoutePolicyInformation importRoutePolicy(); /** - * Gets the exportRoutePolicy property: Export Route Policy configuration. + * Gets the exportRoutePolicy property: Export Route Policy information. * * @return the exportRoutePolicy value. */ @@ -110,6 +117,27 @@ public interface NetworkToNetworkInterconnect { */ String ingressAclId(); + /** + * Gets the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @return the microBfdState value. + */ + MicroBfdState microBfdState(); + + /** + * Gets the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @return the conditionalDefaultRouteConfiguration value. + */ + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration(); + + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -197,9 +225,10 @@ interface WithUseOptionB { */ interface WithCreate extends DefinitionStages.WithNniType, DefinitionStages.WithIsManagementType, DefinitionStages.WithLayer2Configuration, DefinitionStages.WithOptionBLayer3Configuration, - DefinitionStages.WithNpbStaticRouteConfiguration, DefinitionStages.WithImportRoutePolicy, - DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithEgressAclId, - DefinitionStages.WithIngressAclId { + DefinitionStages.WithNpbStaticRouteConfiguration, DefinitionStages.WithStaticRouteConfiguration, + DefinitionStages.WithImportRoutePolicy, DefinitionStages.WithExportRoutePolicy, + DefinitionStages.WithEgressAclId, DefinitionStages.WithIngressAclId, DefinitionStages.WithMicroBfdState, + DefinitionStages.WithConditionalDefaultRouteConfiguration { /** * Executes the create request. * @@ -266,8 +295,7 @@ interface WithOptionBLayer3Configuration { * @param optionBLayer3Configuration Common properties for Layer3Configuration. * @return the next definition stage. */ - WithCreate withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration); + WithCreate withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration); } /** @@ -283,14 +311,27 @@ interface WithNpbStaticRouteConfiguration { WithCreate withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration); } + /** + * The stage of the NetworkToNetworkInterconnect definition allowing to specify staticRouteConfiguration. + */ + interface WithStaticRouteConfiguration { + /** + * Specifies the staticRouteConfiguration property: Static Route Configuration.. + * + * @param staticRouteConfiguration Static Route Configuration. + * @return the next definition stage. + */ + WithCreate withStaticRouteConfiguration(NniStaticRouteConfiguration staticRouteConfiguration); + } + /** * The stage of the NetworkToNetworkInterconnect definition allowing to specify importRoutePolicy. */ interface WithImportRoutePolicy { /** - * Specifies the importRoutePolicy property: Import Route Policy configuration.. + * Specifies the importRoutePolicy property: Import Route Policy information.. * - * @param importRoutePolicy Import Route Policy configuration. + * @param importRoutePolicy Import Route Policy information. * @return the next definition stage. */ WithCreate withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy); @@ -301,9 +342,9 @@ interface WithImportRoutePolicy { */ interface WithExportRoutePolicy { /** - * Specifies the exportRoutePolicy property: Export Route Policy configuration.. + * Specifies the exportRoutePolicy property: Export Route Policy information. * - * @param exportRoutePolicy Export Route Policy configuration. + * @param exportRoutePolicy Export Route Policy information. * @return the next definition stage. */ WithCreate withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy); @@ -334,6 +375,36 @@ interface WithIngressAclId { */ WithCreate withIngressAclId(String ingressAclId); } + + /** + * The stage of the NetworkToNetworkInterconnect definition allowing to specify microBfdState. + */ + interface WithMicroBfdState { + /** + * Specifies the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled + * state.. + * + * @param microBfdState Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * @return the next definition stage. + */ + WithCreate withMicroBfdState(MicroBfdState microBfdState); + } + + /** + * The stage of the NetworkToNetworkInterconnect definition allowing to specify + * conditionalDefaultRouteConfiguration. + */ + interface WithConditionalDefaultRouteConfiguration { + /** + * Specifies the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration + * properties.. + * + * @param conditionalDefaultRouteConfiguration Conditional Default Route Configuration properties. + * @return the next definition stage. + */ + WithCreate withConditionalDefaultRouteConfiguration( + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration); + } } /** @@ -347,8 +418,9 @@ interface WithIngressAclId { * The template for NetworkToNetworkInterconnect update. */ interface Update extends UpdateStages.WithLayer2Configuration, UpdateStages.WithOptionBLayer3Configuration, - UpdateStages.WithNpbStaticRouteConfiguration, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithEgressAclId, UpdateStages.WithIngressAclId { + UpdateStages.WithNpbStaticRouteConfiguration, UpdateStages.WithStaticRouteConfiguration, + UpdateStages.WithImportRoutePolicy, UpdateStages.WithExportRoutePolicy, UpdateStages.WithEgressAclId, + UpdateStages.WithIngressAclId, UpdateStages.WithMicroBfdState { /** * Executes the update request. * @@ -379,7 +451,7 @@ interface WithLayer2Configuration { * @param layer2Configuration Common properties for Layer2Configuration. * @return the next definition stage. */ - Update withLayer2Configuration(Layer2Configuration layer2Configuration); + Update withLayer2Configuration(Layer2ConfigurationPatch layer2Configuration); } /** @@ -392,7 +464,7 @@ interface WithOptionBLayer3Configuration { * @param optionBLayer3Configuration Common properties for Layer3Configuration. * @return the next definition stage. */ - Update withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration); + Update withOptionBLayer3Configuration(OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration); } /** @@ -405,7 +477,20 @@ interface WithNpbStaticRouteConfiguration { * @param npbStaticRouteConfiguration NPB Static Route Configuration properties. * @return the next definition stage. */ - Update withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration); + Update withNpbStaticRouteConfiguration(NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration); + } + + /** + * The stage of the NetworkToNetworkInterconnect update allowing to specify staticRouteConfiguration. + */ + interface WithStaticRouteConfiguration { + /** + * Specifies the staticRouteConfiguration property: Static Route Configuration.. + * + * @param staticRouteConfiguration Static Route Configuration. + * @return the next definition stage. + */ + Update withStaticRouteConfiguration(NniStaticRoutePatchConfiguration staticRouteConfiguration); } /** @@ -418,7 +503,7 @@ interface WithImportRoutePolicy { * @param importRoutePolicy Import Route Policy information. * @return the next definition stage. */ - Update withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy); + Update withImportRoutePolicy(ImportRoutePolicyInformationPatch importRoutePolicy); } /** @@ -431,7 +516,7 @@ interface WithExportRoutePolicy { * @param exportRoutePolicy Export Route Policy information. * @return the next definition stage. */ - Update withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy); + Update withExportRoutePolicy(ExportRoutePolicyInformationPatch exportRoutePolicy); } /** @@ -459,6 +544,19 @@ interface WithIngressAclId { */ Update withIngressAclId(String ingressAclId); } + + /** + * The stage of the NetworkToNetworkInterconnect update allowing to specify microBfdState. + */ + interface WithMicroBfdState { + /** + * Specifies the microBfdState property: Micro BFD enabled/disabled state.. + * + * @param microBfdState Micro BFD enabled/disabled state. + * @return the next definition stage. + */ + Update withMicroBfdState(MicroBfdState microBfdState); + } } /** @@ -477,21 +575,17 @@ interface WithIngressAclId { NetworkToNetworkInterconnect refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param body Request payload. @@ -499,27 +593,46 @@ interface WithIngressAclId { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, + UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); + + /** * Updates the Admin State. * * @param body Request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. + * Updates the Admin State. * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(NniUpdateBfdAdministrativeStateRequest body); + + /** * Updates the Admin State. * * @param body Request payload. @@ -527,7 +640,8 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(NniUpdateBfdAdministrativeStateRequest body, + Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java index 7a42a8cb79e8..3bde3e74df21 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java @@ -1,27 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchProperties; import java.io.IOException; /** * The Network To Network Interconnect resource patch definition. */ @Fluent -public final class NetworkToNetworkInterconnectPatch extends ProxyResource { +public final class NetworkToNetworkInterconnectPatch extends ProxyResourceBase { /* * Resource properties. */ - private NetworkToNetworkInterconnectPatchableProperties innerProperties; + private NetworkToNetworkInterconnectPatchProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -29,17 +28,14 @@ public final class NetworkToNetworkInterconnectPatch extends ProxyResource { private SystemData systemData; /* - * The type of the resource. + * The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or 'Microsoft.Storage/storageAccounts' */ private String type; /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. + * Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName}' */ private String id; @@ -54,7 +50,7 @@ public NetworkToNetworkInterconnectPatch() { * * @return the innerProperties value. */ - private NetworkToNetworkInterconnectPatchableProperties innerProperties() { + private NetworkToNetworkInterconnectPatchProperties innerProperties() { return this.innerProperties; } @@ -63,12 +59,14 @@ private NetworkToNetworkInterconnectPatchableProperties innerProperties() { * * @return the systemData value. */ + @Override public SystemData systemData() { return this.systemData; } /** - * Get the type property: The type of the resource. + * Get the type property: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + * 'Microsoft.Storage/storageAccounts'. * * @return the type value. */ @@ -78,17 +76,8 @@ public String type() { } /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the id property: Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. * * @return the id value. */ @@ -102,7 +91,7 @@ public String id() { * * @return the layer2Configuration value. */ - public Layer2Configuration layer2Configuration() { + public Layer2ConfigurationPatch layer2Configuration() { return this.innerProperties() == null ? null : this.innerProperties().layer2Configuration(); } @@ -112,9 +101,9 @@ public Layer2Configuration layer2Configuration() { * @param layer2Configuration the layer2Configuration value to set. * @return the NetworkToNetworkInterconnectPatch object itself. */ - public NetworkToNetworkInterconnectPatch withLayer2Configuration(Layer2Configuration layer2Configuration) { + public NetworkToNetworkInterconnectPatch withLayer2Configuration(Layer2ConfigurationPatch layer2Configuration) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withLayer2Configuration(layer2Configuration); return this; @@ -125,7 +114,7 @@ public NetworkToNetworkInterconnectPatch withLayer2Configuration(Layer2Configura * * @return the optionBLayer3Configuration value. */ - public OptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration() { return this.innerProperties() == null ? null : this.innerProperties().optionBLayer3Configuration(); } @@ -136,9 +125,9 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * @return the NetworkToNetworkInterconnectPatch object itself. */ public NetworkToNetworkInterconnectPatch - withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { + withOptionBLayer3Configuration(OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withOptionBLayer3Configuration(optionBLayer3Configuration); return this; @@ -149,7 +138,7 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * * @return the npbStaticRouteConfiguration value. */ - public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + public NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration() { return this.innerProperties() == null ? null : this.innerProperties().npbStaticRouteConfiguration(); } @@ -160,20 +149,44 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { * @return the NetworkToNetworkInterconnectPatch object itself. */ public NetworkToNetworkInterconnectPatch - withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + withNpbStaticRouteConfiguration(NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); return this; } + /** + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch + withStaticRouteConfiguration(NniStaticRoutePatchConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); + } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + /** * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ - public ImportRoutePolicyInformation importRoutePolicy() { + public ImportRoutePolicyInformationPatch importRoutePolicy() { return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } @@ -183,9 +196,10 @@ public ImportRoutePolicyInformation importRoutePolicy() { * @param importRoutePolicy the importRoutePolicy value to set. * @return the NetworkToNetworkInterconnectPatch object itself. */ - public NetworkToNetworkInterconnectPatch withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { + public NetworkToNetworkInterconnectPatch + withImportRoutePolicy(ImportRoutePolicyInformationPatch importRoutePolicy) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; @@ -196,7 +210,7 @@ public NetworkToNetworkInterconnectPatch withImportRoutePolicy(ImportRoutePolicy * * @return the exportRoutePolicy value. */ - public ExportRoutePolicyInformation exportRoutePolicy() { + public ExportRoutePolicyInformationPatch exportRoutePolicy() { return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); } @@ -206,9 +220,10 @@ public ExportRoutePolicyInformation exportRoutePolicy() { * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the NetworkToNetworkInterconnectPatch object itself. */ - public NetworkToNetworkInterconnectPatch withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + public NetworkToNetworkInterconnectPatch + withExportRoutePolicy(ExportRoutePolicyInformationPatch exportRoutePolicy) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withExportRoutePolicy(exportRoutePolicy); return this; @@ -231,7 +246,7 @@ public String egressAclId() { */ public NetworkToNetworkInterconnectPatch withEgressAclId(String egressAclId) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withEgressAclId(egressAclId); return this; @@ -254,21 +269,33 @@ public String ingressAclId() { */ public NetworkToNetworkInterconnectPatch withIngressAclId(String ingressAclId) { if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } this.innerProperties().withIngressAclId(ingressAclId); return this; } /** - * Validates the instance. + * Get the microBfdState property: Micro BFD enabled/disabled state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the microBfdState value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public MicroBfdState microBfdState() { + return this.innerProperties() == null ? null : this.innerProperties().microBfdState(); + } + + /** + * Set the microBfdState property: Micro BFD enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withMicroBfdState(MicroBfdState microBfdState) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchProperties(); } + this.innerProperties().withMicroBfdState(microBfdState); + return this; } /** @@ -287,7 +314,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkToNetworkInterconnectPatch if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatch. */ public static NetworkToNetworkInterconnectPatch fromJson(JsonReader jsonReader) throws IOException { @@ -300,15 +326,13 @@ public static NetworkToNetworkInterconnectPatch fromJson(JsonReader jsonReader) if ("id".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatch.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatch.innerProperties - = NetworkToNetworkInterconnectPatchableProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatch.innerProperties + = NetworkToNetworkInterconnectPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java deleted file mode 100644 index 08fa9a6640f8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common properties for Layer3Configuration. - */ -@Fluent -public final class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration extends OptionBLayer3Configuration { - /* - * ASN of CE devices for CE/PE connectivity. - */ - private Long fabricAsn; - - /** - * Creates an instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration class. - */ - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() { - } - - /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @return the fabricAsn value. - */ - @Override - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withPeerAsn(Long peerAsn) { - super.withPeerAsn(peerAsn); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withVlanId(Integer vlanId) { - super.withVlanId(vlanId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeNumberField("vlanId", vlanId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration. - */ - public static NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - = new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPrimaryIpv4Prefix(reader.getString()); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPrimaryIpv6Prefix(reader.getString()); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withSecondaryIpv4Prefix(reader.getString()); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withSecondaryIpv6Prefix(reader.getString()); - } else if ("peerASN".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("vlanId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.fabricAsn - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java index 009edf979870..3aad904efc4a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkToNetworkInterconnects { /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String networkToNetworkInterconnectName, Context context); /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -46,8 +42,6 @@ NetworkToNetworkInterconnect get(String resourceGroupName, String networkFabricN String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -60,8 +54,6 @@ NetworkToNetworkInterconnect get(String resourceGroupName, String networkFabricN void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -76,8 +68,6 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo Context context); /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -85,13 +75,11 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName); /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. - * * Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -100,14 +88,12 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return paged collection of NetworkToNetworkInterconnect items as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -117,14 +103,12 @@ PagedIterable listByNetworkFabric(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the NPB Static Route BFD Administrative State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -135,15 +119,13 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + UpdateAdministrativeStateResponse updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -153,14 +135,12 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -171,14 +151,44 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); /** - * Configuration used to setup CE-PE connectivity. + * Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body); + + /** + * Updates the Admin State. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NniUpdateBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniUpdateBfdAdministrativeStateRequest body, + Context context); + + /** * Implements NetworkToNetworkInterconnects GET method. * * @param id the resource ID. @@ -190,8 +200,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource NetworkToNetworkInterconnect getById(String id); /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param id the resource ID. @@ -204,8 +212,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param id the resource ID. @@ -216,8 +222,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource void deleteById(String id); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java index ab1195463801..e37a62ef780f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class NfcSku extends ExpandableStringEnum { /** - * Static value Basic for NfcSku. + * NfcSku-Basic. */ public static final NfcSku BASIC = fromString("Basic"); /** - * Static value Standard for NfcSku. + * NfcSku-Standard. */ public static final NfcSku STANDARD = fromString("Standard"); /** - * Static value HighPerformance for NfcSku. + * NfcSku-HighPerformance. */ public static final NfcSku HIGH_PERFORMANCE = fromString("HighPerformance"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java new file mode 100644 index 000000000000..85e3b6d12a54 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) patch properties. + */ +@Fluent +public final class NniBmpPatchProperties implements JsonSerializable { + /* + * (BGP Monitoring Protocol (BMP) configuration state. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of NniBmpPatchProperties class. + */ + public NniBmpPatchProperties() { + } + + /** + * Get the configurationState property: (BGP Monitoring Protocol (BMP) configuration state. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: (BGP Monitoring Protocol (BMP) configuration state. + * + * @param configurationState the configurationState value to set. + * @return the NniBmpPatchProperties object itself. + */ + public NniBmpPatchProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBmpPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniBmpPatchProperties. + */ + public static NniBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBmpPatchProperties deserializedNniBmpPatchProperties = new NniBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedNniBmpPatchProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java new file mode 100644 index 000000000000..05175495ad55 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) properties. + */ +@Fluent +public final class NniBmpProperties implements JsonSerializable { + /* + * BGP Monitoring Protocol (BMP) Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of NniBmpProperties class. + */ + public NniBmpProperties() { + } + + /** + * Get the configurationState property: BGP Monitoring Protocol (BMP) Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BGP Monitoring Protocol (BMP) Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the NniBmpProperties object itself. + */ + public NniBmpProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBmpProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NniBmpProperties. + */ + public static NniBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBmpProperties deserializedNniBmpProperties = new NniBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedNniBmpProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBmpProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java new file mode 100644 index 000000000000..93fc41ad3da9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for NNI. + */ +@Fluent +public final class NniStaticRouteConfiguration implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NniStaticRouteConfiguration class. + */ + public NniStaticRouteConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniStaticRouteConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniStaticRouteConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniStaticRouteConfiguration. + */ + public static NniStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniStaticRouteConfiguration deserializedNniStaticRouteConfiguration = new NniStaticRouteConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNniStaticRouteConfiguration.bfdConfiguration = BfdConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedNniStaticRouteConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedNniStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNniStaticRouteConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..232a0f5a68fe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for NNI. + */ +@Fluent +public final class NniStaticRoutePatchConfiguration implements JsonSerializable { + /* + * Bidirectional Forwarding Detection (BFD) configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NniStaticRoutePatchConfiguration class. + */ + public NniStaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: Bidirectional Forwarding Detection (BFD) configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: Bidirectional Forwarding Detection (BFD) configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniStaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniStaticRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniStaticRoutePatchConfiguration. + */ + public static NniStaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniStaticRoutePatchConfiguration deserializedNniStaticRoutePatchConfiguration + = new NniStaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNniStaticRoutePatchConfiguration.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNniStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNniStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNniStaticRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java index e95f652111d8..d2d7673e5024 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class NniType extends ExpandableStringEnum { /** - * Static value CE for NniType. + * NniType-CE(Customer Edge). */ public static final NniType CE = fromString("CE"); /** - * Static value NPB for NniType. + * NniType-NPB(Network Packet Broker). */ public static final NniType NPB = fromString("NPB"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..70f0bc628ef9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateRequest.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NNI Bidirectional Forwarding Detection (BFD) Administrative State request. + */ +@Fluent +public final class NniUpdateBfdAdministrativeStateRequest + implements JsonSerializable { + /* + * Route Type. Choose either Static or OptionA. + */ + private RouteType routeType; + + /* + * State. Select either enable or disable. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of NniUpdateBfdAdministrativeStateRequest class. + */ + public NniUpdateBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type. Choose either Static or OptionA. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type. Choose either Static or OptionA. + * + * @param routeType the routeType value to set. + * @return the NniUpdateBfdAdministrativeStateRequest object itself. + */ + public NniUpdateBfdAdministrativeStateRequest withRouteType(RouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the administrativeState property: State. Select either enable or disable. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: State. Select either enable or disable. + * + * @param administrativeState the administrativeState value to set. + * @return the NniUpdateBfdAdministrativeStateRequest object itself. + */ + public NniUpdateBfdAdministrativeStateRequest withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniUpdateBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniUpdateBfdAdministrativeStateRequest if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniUpdateBfdAdministrativeStateRequest. + */ + public static NniUpdateBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniUpdateBfdAdministrativeStateRequest deserializedNniUpdateBfdAdministrativeStateRequest + = new NniUpdateBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateRequest.routeType + = RouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniUpdateBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..a352f9b7343c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of NniUpdateBfdAdministrativeStateResponse. + */ +public interface NniUpdateBfdAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Properties of the NNI BFD Administrative State response. + * + * @return the properties value. + */ + NniUpdateBfdAdministrativeStateResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner object. + * + * @return the inner object. + */ + NniUpdateBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponseProperties.java new file mode 100644 index 000000000000..2d1f67077265 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponseProperties.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NNI Bidirectional Forwarding Detection (BFD) Update Administrative State response. + */ +@Immutable +public final class NniUpdateBfdAdministrativeStateResponseProperties + implements JsonSerializable { + /* + * Route Type. Choose either Static or OptionA. + */ + private RouteType routeType; + + /* + * State. Select either enable or disable. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of NniUpdateBfdAdministrativeStateResponseProperties class. + */ + private NniUpdateBfdAdministrativeStateResponseProperties() { + } + + /** + * Get the routeType property: Route Type. Choose either Static or OptionA. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Get the administrativeState property: State. Select either enable or disable. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniUpdateBfdAdministrativeStateResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniUpdateBfdAdministrativeStateResponseProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniUpdateBfdAdministrativeStateResponseProperties. + */ + public static NniUpdateBfdAdministrativeStateResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniUpdateBfdAdministrativeStateResponseProperties deserializedNniUpdateBfdAdministrativeStateResponseProperties + = new NniUpdateBfdAdministrativeStateResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseProperties.routeType + = RouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNniUpdateBfdAdministrativeStateResponseProperties.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniUpdateBfdAdministrativeStateResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java index 9604331ae659..b4f7177e0f59 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,23 +98,6 @@ public NpbStaticRouteConfiguration withIpv6Routes(List ip return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java new file mode 100644 index 000000000000..9453d87a410e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * NPB Static Route Configuration properties. + */ +@Fluent +public final class NpbStaticRouteConfigurationPatch implements JsonSerializable { + /* + * BFD Configuration properties. + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NpbStaticRouteConfigurationPatch class. + */ + public NpbStaticRouteConfigurationPatch() { + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NpbStaticRouteConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NpbStaticRouteConfigurationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NpbStaticRouteConfigurationPatch. + */ + public static NpbStaticRouteConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NpbStaticRouteConfigurationPatch deserializedNpbStaticRouteConfigurationPatch + = new NpbStaticRouteConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNpbStaticRouteConfigurationPatch.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNpbStaticRouteConfigurationPatch.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNpbStaticRouteConfigurationPatch.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNpbStaticRouteConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java index 28e7db56a137..1625c085909f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java index f73637abeff1..4d72a4e463f5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for an operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner object. + * + * @return the inner object. + */ + OperationStatusResultInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java index b40d95ba43d7..488b4dceba0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,7 +12,7 @@ */ public interface Operations { /** - * Returns list of all operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -22,7 +22,7 @@ public interface Operations { PagedIterable list(); /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java deleted file mode 100644 index 3e7f461d4404..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peering optionA properties. - */ -@Fluent -public class OptionAProperties implements JsonSerializable { - /* - * MTU to use for option A peering. - */ - private Integer mtu; - - /* - * Vlan Id.Example : 501 - */ - private Integer vlanId; - - /* - * Peer ASN number.Example : 28 - */ - private Long peerAsn; - - /* - * BFD Configuration properties. - */ - private BfdConfiguration bfdConfiguration; - - /** - * Creates an instance of OptionAProperties class. - */ - public OptionAProperties() { - } - - /** - * Get the mtu property: MTU to use for option A peering. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.mtu; - } - - /** - * Set the mtu property: MTU to use for option A peering. - * - * @param mtu the mtu value to set. - * @return the OptionAProperties object itself. - */ - public OptionAProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * Get the vlanId property: Vlan Id.Example : 501. - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: Vlan Id.Example : 501. - * - * @param vlanId the vlanId value to set. - * @return the OptionAProperties object itself. - */ - public OptionAProperties withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * Get the peerAsn property: Peer ASN number.Example : 28. - * - * @return the peerAsn value. - */ - public Long peerAsn() { - return this.peerAsn; - } - - /** - * Set the peerAsn property: Peer ASN number.Example : 28. - * - * @param peerAsn the peerAsn value to set. - * @return the OptionAProperties object itself. - */ - public OptionAProperties withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; - return this; - } - - /** - * Get the bfdConfiguration property: BFD Configuration properties. - * - * @return the bfdConfiguration value. - */ - public BfdConfiguration bfdConfiguration() { - return this.bfdConfiguration; - } - - /** - * Set the bfdConfiguration property: BFD Configuration properties. - * - * @param bfdConfiguration the bfdConfiguration value to set. - * @return the OptionAProperties object itself. - */ - public OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { - this.bfdConfiguration = bfdConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OptionAProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OptionAProperties. - */ - public static OptionAProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OptionAProperties deserializedOptionAProperties = new OptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedOptionAProperties.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("peerASN".equals(fieldName)) { - deserializedOptionAProperties.peerAsn = reader.getNullable(JsonReader::getLong); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java index b085827cd891..4a86bd9849e0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -9,27 +9,43 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * OptionB Layer3 Configuration properties. */ @Fluent -public class OptionBLayer3Configuration extends Layer3IpPrefixProperties { +public final class OptionBLayer3Configuration extends Layer3IpPrefixProperties { /* * ASN of PE devices for CE/PE connectivity.Example : 28 */ - private Long peerAsn; + private long peerAsn; /* * VLAN for CE/PE Layer 3 connectivity.Example : 501 */ - private Integer vlanId; + private int vlanId; /* * ASN of CE devices for CE/PE connectivity. */ private Long fabricAsn; + /* + * Provider Edge (PE) Loopback IP Address. + */ + private List peLoopbackIpAddress; + + /* + * BGP Monitoring Protocol (BMP) Configuration. + */ + private NniBmpProperties bmpConfiguration; + + /* + * OptionB Layer3 prefix limit configuration. + */ + private List prefixLimits; + /** * Creates an instance of OptionBLayer3Configuration class. */ @@ -41,7 +57,7 @@ public OptionBLayer3Configuration() { * * @return the peerAsn value. */ - public Long peerAsn() { + public long peerAsn() { return this.peerAsn; } @@ -51,7 +67,7 @@ public Long peerAsn() { * @param peerAsn the peerAsn value to set. * @return the OptionBLayer3Configuration object itself. */ - public OptionBLayer3Configuration withPeerAsn(Long peerAsn) { + public OptionBLayer3Configuration withPeerAsn(long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -61,7 +77,7 @@ public OptionBLayer3Configuration withPeerAsn(Long peerAsn) { * * @return the vlanId value. */ - public Integer vlanId() { + public int vlanId() { return this.vlanId; } @@ -71,7 +87,7 @@ public Integer vlanId() { * @param vlanId the vlanId value to set. * @return the OptionBLayer3Configuration object itself. */ - public OptionBLayer3Configuration withVlanId(Integer vlanId) { + public OptionBLayer3Configuration withVlanId(int vlanId) { this.vlanId = vlanId; return this; } @@ -86,13 +102,62 @@ public Long fabricAsn() { } /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * Get the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @return the peLoopbackIpAddress value. + */ + public List peLoopbackIpAddress() { + return this.peLoopbackIpAddress; + } + + /** + * Set the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @param peLoopbackIpAddress the peLoopbackIpAddress value to set. + * @return the OptionBLayer3Configuration object itself. + */ + public OptionBLayer3Configuration withPeLoopbackIpAddress(List peLoopbackIpAddress) { + this.peLoopbackIpAddress = peLoopbackIpAddress; + return this; + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @return the bmpConfiguration value. + */ + public NniBmpProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the OptionBLayer3Configuration object itself. + */ + public OptionBLayer3Configuration withBmpConfiguration(NniBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the prefixLimits property: OptionB Layer3 prefix limit configuration. * - * @param fabricAsn the fabricAsn value to set. + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @param prefixLimits the prefixLimits value to set. * @return the OptionBLayer3Configuration object itself. */ - OptionBLayer3Configuration withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; + public OptionBLayer3Configuration withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; return this; } @@ -132,15 +197,6 @@ public OptionBLayer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Pr return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ @@ -151,8 +207,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerAsn); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeArrayField("peLoopbackIpAddress", this.peLoopbackIpAddress, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -162,6 +222,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OptionBLayer3Configuration if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OptionBLayer3Configuration. */ public static OptionBLayer3Configuration fromJson(JsonReader jsonReader) throws IOException { @@ -180,11 +241,20 @@ public static OptionBLayer3Configuration fromJson(JsonReader jsonReader) throws } else if ("secondaryIpv6Prefix".equals(fieldName)) { deserializedOptionBLayer3Configuration.withSecondaryIpv6Prefix(reader.getString()); } else if ("peerASN".equals(fieldName)) { - deserializedOptionBLayer3Configuration.peerAsn = reader.getNullable(JsonReader::getLong); + deserializedOptionBLayer3Configuration.peerAsn = reader.getLong(); } else if ("vlanId".equals(fieldName)) { - deserializedOptionBLayer3Configuration.vlanId = reader.getNullable(JsonReader::getInt); + deserializedOptionBLayer3Configuration.vlanId = reader.getInt(); } else if ("fabricASN".equals(fieldName)) { deserializedOptionBLayer3Configuration.fabricAsn = reader.getNullable(JsonReader::getLong); + } else if ("peLoopbackIpAddress".equals(fieldName)) { + List peLoopbackIpAddress = reader.readArray(reader1 -> reader1.getString()); + deserializedOptionBLayer3Configuration.peLoopbackIpAddress = peLoopbackIpAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedOptionBLayer3Configuration.bmpConfiguration = NniBmpProperties.fromJson(reader); + } else if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> OptionBLayer3PrefixLimitProperties.fromJson(reader1)); + deserializedOptionBLayer3Configuration.prefixLimits = prefixLimits; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java new file mode 100644 index 000000000000..27e5570619bf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Common properties for Layer3Configuration. + */ +@Fluent +public final class OptionBLayer3ConfigurationPatchProperties extends Layer3IpPrefixPatchProperties { + /* + * ASN of PE devices for CE/PE connectivity.Example : 28 + */ + private Long peerAsn; + + /* + * VLAN for CE/PE Layer 3 connectivity.Example : 501 + */ + private Integer vlanId; + + /* + * ASN of CE devices for CE/PE connectivity. + */ + private Long fabricAsn; + + /* + * Provider Edge (PE) Loopback IP Address. + */ + private List peLoopbackIpAddress; + + /* + * BGP Monitoring Protocol (BMP) Configuration. + */ + private NniBmpPatchProperties bmpConfiguration; + + /* + * OptionB Layer3 prefix limit configuration. + */ + private List prefixLimits; + + /** + * Creates an instance of OptionBLayer3ConfigurationPatchProperties class. + */ + public OptionBLayer3ConfigurationPatchProperties() { + } + + /** + * Get the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @return the peerAsn value. + */ + public Long peerAsn() { + return this.peerAsn; + } + + /** + * Set the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @param peerAsn the peerAsn value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withPeerAsn(Long peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Get the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @return the peLoopbackIpAddress value. + */ + public List peLoopbackIpAddress() { + return this.peLoopbackIpAddress; + } + + /** + * Set the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @param peLoopbackIpAddress the peLoopbackIpAddress value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withPeLoopbackIpAddress(List peLoopbackIpAddress) { + this.peLoopbackIpAddress = peLoopbackIpAddress; + return this; + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @return the bmpConfiguration value. + */ + public NniBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withBmpConfiguration(NniBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @param prefixLimits the prefixLimits value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties + withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OptionBLayer3ConfigurationPatchProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OptionBLayer3ConfigurationPatchProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OptionBLayer3ConfigurationPatchProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OptionBLayer3ConfigurationPatchProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); + jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); + jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); + jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeNumberField("peerASN", this.peerAsn); + jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeArrayField("peLoopbackIpAddress", this.peLoopbackIpAddress, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3ConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3ConfigurationPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3ConfigurationPatchProperties. + */ + public static OptionBLayer3ConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3ConfigurationPatchProperties deserializedOptionBLayer3ConfigurationPatchProperties + = new OptionBLayer3ConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.withPrimaryIpv4Prefix(reader.getString()); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.withPrimaryIpv6Prefix(reader.getString()); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.withSecondaryIpv4Prefix(reader.getString()); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.withSecondaryIpv6Prefix(reader.getString()); + } else if ("peerASN".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.peerAsn + = reader.getNullable(JsonReader::getLong); + } else if ("vlanId".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.vlanId + = reader.getNullable(JsonReader::getInt); + } else if ("fabricASN".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.fabricAsn + = reader.getNullable(JsonReader::getLong); + } else if ("peLoopbackIpAddress".equals(fieldName)) { + List peLoopbackIpAddress = reader.readArray(reader1 -> reader1.getString()); + deserializedOptionBLayer3ConfigurationPatchProperties.peLoopbackIpAddress = peLoopbackIpAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.bmpConfiguration + = NniBmpPatchProperties.fromJson(reader); + } else if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> OptionBLayer3PrefixLimitPatchProperties.fromJson(reader1)); + deserializedOptionBLayer3ConfigurationPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3ConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..eb0c3c00959f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * OptionB Layer3 prefix limit patch properties. + */ +@Fluent +public final class OptionBLayer3PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Maximum number of routes allowed. + */ + private Integer maximumRoutes; + + /** + * Creates an instance of OptionBLayer3PrefixLimitPatchProperties class. + */ + public OptionBLayer3PrefixLimitPatchProperties() { + } + + /** + * Get the maximumRoutes property: Maximum number of routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum number of routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the OptionBLayer3PrefixLimitPatchProperties object itself. + */ + public OptionBLayer3PrefixLimitPatchProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3PrefixLimitPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3PrefixLimitPatchProperties. + */ + public static OptionBLayer3PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3PrefixLimitPatchProperties deserializedOptionBLayer3PrefixLimitPatchProperties + = new OptionBLayer3PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedOptionBLayer3PrefixLimitPatchProperties.maximumRoutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java new file mode 100644 index 000000000000..ff54cadb1a42 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * OptionB Layer3 prefix limit properties. + */ +@Fluent +public final class OptionBLayer3PrefixLimitProperties implements JsonSerializable { + /* + * Maximum number of routes allowed. + */ + private Integer maximumRoutes; + + /** + * Creates an instance of OptionBLayer3PrefixLimitProperties class. + */ + public OptionBLayer3PrefixLimitProperties() { + } + + /** + * Get the maximumRoutes property: Maximum number of routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum number of routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the OptionBLayer3PrefixLimitProperties object itself. + */ + public OptionBLayer3PrefixLimitProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3PrefixLimitProperties. + */ + public static OptionBLayer3PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3PrefixLimitProperties deserializedOptionBLayer3PrefixLimitProperties + = new OptionBLayer3PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedOptionBLayer3PrefixLimitProperties.maximumRoutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3PrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java index 6ed0f533a4df..4b36de86bf56 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java index 910225e6b517..242e48158c3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PeeringOption extends ExpandableStringEnum { /** - * Static value OptionA for PeeringOption. + * PeeringOption-OptionA. */ public static final PeeringOption OPTIONA = fromString("OptionA"); /** - * Static value OptionB for PeeringOption. + * PeeringOption-OptionB. */ public static final PeeringOption OPTIONB = fromString("OptionB"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java new file mode 100644 index 000000000000..43287b69552a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Police rate configuration properties. + */ +@Fluent +public final class PoliceRateConfigurationProperties implements JsonSerializable { + /* + * Rate limit in bits per second. + */ + private BitRate bitRate; + + /* + * Burst size in packets. + */ + private BurstSize burstSize; + + /** + * Creates an instance of PoliceRateConfigurationProperties class. + */ + public PoliceRateConfigurationProperties() { + } + + /** + * Get the bitRate property: Rate limit in bits per second. + * + * @return the bitRate value. + */ + public BitRate bitRate() { + return this.bitRate; + } + + /** + * Set the bitRate property: Rate limit in bits per second. + * + * @param bitRate the bitRate value to set. + * @return the PoliceRateConfigurationProperties object itself. + */ + public PoliceRateConfigurationProperties withBitRate(BitRate bitRate) { + this.bitRate = bitRate; + return this; + } + + /** + * Get the burstSize property: Burst size in packets. + * + * @return the burstSize value. + */ + public BurstSize burstSize() { + return this.burstSize; + } + + /** + * Set the burstSize property: Burst size in packets. + * + * @param burstSize the burstSize value to set. + * @return the PoliceRateConfigurationProperties object itself. + */ + public PoliceRateConfigurationProperties withBurstSize(BurstSize burstSize) { + this.burstSize = burstSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bitRate", this.bitRate); + jsonWriter.writeJsonField("burstSize", this.burstSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoliceRateConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoliceRateConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PoliceRateConfigurationProperties. + */ + public static PoliceRateConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoliceRateConfigurationProperties deserializedPoliceRateConfigurationProperties + = new PoliceRateConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bitRate".equals(fieldName)) { + deserializedPoliceRateConfigurationProperties.bitRate = BitRate.fromJson(reader); + } else if ("burstSize".equals(fieldName)) { + deserializedPoliceRateConfigurationProperties.burstSize = BurstSize.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPoliceRateConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java deleted file mode 100644 index e4638372eec2..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableEnum; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; - -/** - * Polling interval in seconds. - */ -public final class PollingIntervalInSeconds implements ExpandableEnum { - private static final Map VALUES = new ConcurrentHashMap<>(); - - private static final Function NEW_INSTANCE = PollingIntervalInSeconds::new; - - /** - * Static value 30 for PollingIntervalInSeconds. - */ - public static final PollingIntervalInSeconds THREE_ZERO = fromValue(30); - - /** - * Static value 60 for PollingIntervalInSeconds. - */ - public static final PollingIntervalInSeconds SIX_ZERO = fromValue(60); - - /** - * Static value 90 for PollingIntervalInSeconds. - */ - public static final PollingIntervalInSeconds NINE_ZERO = fromValue(90); - - /** - * Static value 120 for PollingIntervalInSeconds. - */ - public static final PollingIntervalInSeconds ONE_TWO_ZERO = fromValue(120); - - private final Integer value; - - private PollingIntervalInSeconds(Integer value) { - this.value = value; - } - - /** - * Creates or finds a PollingIntervalInSeconds. - * - * @param value a value to look for. - * @return the corresponding PollingIntervalInSeconds. - */ - public static PollingIntervalInSeconds fromValue(Integer value) { - Objects.requireNonNull(value, "'value' cannot be null."); - return VALUES.computeIfAbsent(value, NEW_INSTANCE); - } - - /** - * Gets known PollingIntervalInSeconds values. - * - * @return Known PollingIntervalInSeconds values. - */ - public static Collection values() { - return new ArrayList<>(VALUES.values()); - } - - /** - * Gets the value of the PollingIntervalInSeconds instance. - * - * @return the value of the PollingIntervalInSeconds instance. - */ - @Override - public Integer getValue() { - return this.value; - } - - @Override - public String toString() { - return Objects.toString(this.value); - } - - @Override - public boolean equals(Object obj) { - return this == obj; - } - - @Override - public int hashCode() { - return Objects.hashCode(this.value); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java index a75293caa975..bef8ca6c8898 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PollingType extends ExpandableStringEnum { /** - * Static value Pull for PollingType. + * PollingType-Pull. */ public static final PollingType PULL = fromString("Pull"); /** - * Static value Push for PollingType. + * PollingType-Push. */ public static final PollingType PUSH = fromString("Push"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java index 07931e51e643..d456b270ed2e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -124,20 +123,6 @@ public PortCondition withPortGroupNames(List portGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (layer4Protocol() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property layer4Protocol in model PortCondition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PortCondition.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java new file mode 100644 index 000000000000..5fddf061c1b0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Port condition that needs to be matched. + */ +@Fluent +public class PortConditionPatch implements JsonSerializable { + /* + * Port type that needs to be matched. + */ + private PortType portType; + + /* + * Layer4 protocol type that needs to be matched. + */ + private Layer4Protocol layer4Protocol; + + /* + * List of the Ports that need to be matched. + */ + private List ports; + + /* + * List of the port Group Names that need to be matched. + */ + private List portGroupNames; + + /** + * Creates an instance of PortConditionPatch class. + */ + public PortConditionPatch() { + } + + /** + * Get the portType property: Port type that needs to be matched. + * + * @return the portType value. + */ + public PortType portType() { + return this.portType; + } + + /** + * Set the portType property: Port type that needs to be matched. + * + * @param portType the portType value to set. + * @return the PortConditionPatch object itself. + */ + public PortConditionPatch withPortType(PortType portType) { + this.portType = portType; + return this; + } + + /** + * Get the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @return the layer4Protocol value. + */ + public Layer4Protocol layer4Protocol() { + return this.layer4Protocol; + } + + /** + * Set the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @param layer4Protocol the layer4Protocol value to set. + * @return the PortConditionPatch object itself. + */ + public PortConditionPatch withLayer4Protocol(Layer4Protocol layer4Protocol) { + this.layer4Protocol = layer4Protocol; + return this; + } + + /** + * Get the ports property: List of the Ports that need to be matched. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: List of the Ports that need to be matched. + * + * @param ports the ports value to set. + * @return the PortConditionPatch object itself. + */ + public PortConditionPatch withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the portGroupNames property: List of the port Group Names that need to be matched. + * + * @return the portGroupNames value. + */ + public List portGroupNames() { + return this.portGroupNames; + } + + /** + * Set the portGroupNames property: List of the port Group Names that need to be matched. + * + * @param portGroupNames the portGroupNames value to set. + * @return the PortConditionPatch object itself. + */ + public PortConditionPatch withPortGroupNames(List portGroupNames) { + this.portGroupNames = portGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("portType", this.portType == null ? null : this.portType.toString()); + jsonWriter.writeStringField("layer4Protocol", + this.layer4Protocol == null ? null : this.layer4Protocol.toString()); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("portGroupNames", this.portGroupNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortConditionPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PortConditionPatch. + */ + public static PortConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortConditionPatch deserializedPortConditionPatch = new PortConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portType".equals(fieldName)) { + deserializedPortConditionPatch.portType = PortType.fromString(reader.getString()); + } else if ("layer4Protocol".equals(fieldName)) { + deserializedPortConditionPatch.layer4Protocol = Layer4Protocol.fromString(reader.getString()); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedPortConditionPatch.ports = ports; + } else if ("portGroupNames".equals(fieldName)) { + List portGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPortConditionPatch.portGroupNames = portGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPortConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java new file mode 100644 index 000000000000..767d402166c1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Port Group Properties. + */ +@Fluent +public final class PortGroupPatchProperties implements JsonSerializable { + /* + * The name of the port group. + */ + private String name; + + /* + * List of the ports that need to be matched. + */ + private List ports; + + /** + * Creates an instance of PortGroupPatchProperties class. + */ + public PortGroupPatchProperties() { + } + + /** + * Get the name property: The name of the port group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the port group. + * + * @param name the name value to set. + * @return the PortGroupPatchProperties object itself. + */ + public PortGroupPatchProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ports property: List of the ports that need to be matched. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: List of the ports that need to be matched. + * + * @param ports the ports value to set. + * @return the PortGroupPatchProperties object itself. + */ + public PortGroupPatchProperties withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PortGroupPatchProperties. + */ + public static PortGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortGroupPatchProperties deserializedPortGroupPatchProperties = new PortGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPortGroupPatchProperties.name = reader.getString(); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedPortGroupPatchProperties.ports = ports; + } else { + reader.skipChildren(); + } + } + + return deserializedPortGroupPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java index 771695980075..7d996b12886e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public PortGroupProperties withPorts(List ports) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java index ccc5bc9b2e14..4ed02f0ceb2a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class PortType extends ExpandableStringEnum { /** - * Static value SourcePort for PortType. + * PortType SourcePort. */ public static final PortType SOURCE_PORT = fromString("SourcePort"); /** - * Static value DestinationPort for PortType. + * PortType DestinationPort. */ public static final PortType DESTINATION_PORT = fromString("DestinationPort"); + /** + * PortType Bidirectional. + */ + public static final PortType BIDIRECTIONAL = fromString("Bidirectional"); + /** * Creates a new instance of PortType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..43d457f723ef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Prefix Limit Patch properties. + */ +@Fluent +public final class PrefixLimitPatchProperties implements JsonSerializable { + /* + * Maximum routes allowed. + */ + private Integer maximumRoutes; + + /* + * Limit at which route prefixes a warning is generate. + */ + private Integer threshold; + + /* + * Idle time expiry in seconds. + */ + private Integer idleTimeExpiry; + + /** + * Creates an instance of PrefixLimitPatchProperties class. + */ + public PrefixLimitPatchProperties() { + } + + /** + * Get the maximumRoutes property: Maximum routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * Get the threshold property: Limit at which route prefixes a warning is generate. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Limit at which route prefixes a warning is generate. + * + * @param threshold the threshold value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Get the idleTimeExpiry property: Idle time expiry in seconds. + * + * @return the idleTimeExpiry value. + */ + public Integer idleTimeExpiry() { + return this.idleTimeExpiry; + } + + /** + * Set the idleTimeExpiry property: Idle time expiry in seconds. + * + * @param idleTimeExpiry the idleTimeExpiry value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withIdleTimeExpiry(Integer idleTimeExpiry) { + this.idleTimeExpiry = idleTimeExpiry; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + jsonWriter.writeNumberField("threshold", this.threshold); + jsonWriter.writeNumberField("idleTimeExpiry", this.idleTimeExpiry); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrefixLimitPatchProperties. + */ + public static PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrefixLimitPatchProperties deserializedPrefixLimitPatchProperties = new PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.maximumRoutes = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.threshold = reader.getNullable(JsonReader::getInt); + } else if ("idleTimeExpiry".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.idleTimeExpiry = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java new file mode 100644 index 000000000000..7df256dc9fe0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Prefix Limit properties. + */ +@Fluent +public final class PrefixLimitProperties implements JsonSerializable { + /* + * Maximum routes allowed. + */ + private Integer maximumRoutes; + + /* + * Limit at which route prefixes a warning is generate. + */ + private Integer threshold; + + /* + * Idle Time Expiry in seconds, default is 60. + */ + private Integer idleTimeExpiry; + + /** + * Creates an instance of PrefixLimitProperties class. + */ + public PrefixLimitProperties() { + } + + /** + * Get the maximumRoutes property: Maximum routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * Get the threshold property: Limit at which route prefixes a warning is generate. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Limit at which route prefixes a warning is generate. + * + * @param threshold the threshold value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Get the idleTimeExpiry property: Idle Time Expiry in seconds, default is 60. + * + * @return the idleTimeExpiry value. + */ + public Integer idleTimeExpiry() { + return this.idleTimeExpiry; + } + + /** + * Set the idleTimeExpiry property: Idle Time Expiry in seconds, default is 60. + * + * @param idleTimeExpiry the idleTimeExpiry value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withIdleTimeExpiry(Integer idleTimeExpiry) { + this.idleTimeExpiry = idleTimeExpiry; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + jsonWriter.writeNumberField("threshold", this.threshold); + jsonWriter.writeNumberField("idleTimeExpiry", this.idleTimeExpiry); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrefixLimitProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrefixLimitProperties. + */ + public static PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrefixLimitProperties deserializedPrefixLimitProperties = new PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedPrefixLimitProperties.maximumRoutes = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedPrefixLimitProperties.threshold = reader.getNullable(JsonReader::getInt); + } else if ("idleTimeExpiry".equals(fieldName)) { + deserializedPrefixLimitProperties.idleTimeExpiry = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java index 1558ca07434c..d1b53d04fa7a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PrefixType extends ExpandableStringEnum { /** - * Static value Prefix for PrefixType. + * PrefixType Prefix. */ public static final PrefixType PREFIX = fromString("Prefix"); /** - * Static value LongestPrefix for PrefixType. + * PrefixType LongestPrefix. */ public static final PrefixType LONGEST_PREFIX = fromString("LongestPrefix"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java index e0b83fe63e0d..302b23c2d82a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,32 +12,32 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value Accepted for ProvisioningState. + * Accepted Provisioning State. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Succeeded for ProvisioningState. + * Succeeded Provisioning State. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for ProvisioningState. + * Updating Provisioning State. */ public static final ProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ProvisioningState. + * Deleting Provisioning State. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for ProvisioningState. + * Failed Provisioning State. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ProvisioningState. + * Canceled Provisioning State. */ public static final ProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProxyResourceBase.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProxyResourceBase.java new file mode 100644 index 000000000000..62230f9bdbf5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProxyResourceBase.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ProxyResourceBase with no property bag. + */ +@Immutable +public class ProxyResourceBase implements JsonSerializable { + /* + * Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName}' + */ + private String id; + + /* + * The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or 'Microsoft.Storage/storageAccounts' + */ + private String type; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /** + * Creates an instance of ProxyResourceBase class. + */ + public ProxyResourceBase() { + } + + /** + * Get the id property: Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. + * + * @param id the id value to set. + * @return the ProxyResourceBase object itself. + */ + ProxyResourceBase withId(String id) { + this.id = id; + return this; + } + + /** + * Get the type property: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + * 'Microsoft.Storage/storageAccounts'. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + * 'Microsoft.Storage/storageAccounts'. + * + * @param type the type value to set. + * @return the ProxyResourceBase object itself. + */ + ProxyResourceBase withType(String type) { + this.type = type; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the ProxyResourceBase object itself. + */ + ProxyResourceBase withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyResourceBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyResourceBase if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ProxyResourceBase. + */ + public static ProxyResourceBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyResourceBase deserializedProxyResourceBase = new ProxyResourceBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProxyResourceBase.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProxyResourceBase.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProxyResourceBase.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyResourceBase; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosConfigurationState.java new file mode 100644 index 000000000000..ed0ce2f48b2b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NetworkFabric QoS ConfigurationState. + */ +public final class QosConfigurationState extends ExpandableStringEnum { + /** + * QosConfigurationState-Disabled. + */ + public static final QosConfigurationState DISABLED = fromString("Disabled"); + + /** + * QosConfigurationState-Enabled. + */ + public static final QosConfigurationState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of QosConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public QosConfigurationState() { + } + + /** + * Creates or finds a QosConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding QosConfigurationState. + */ + public static QosConfigurationState fromString(String name) { + return fromString(name, QosConfigurationState.class); + } + + /** + * Gets known QosConfigurationState values. + * + * @return known QosConfigurationState values. + */ + public static Collection values() { + return values(QosConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosPatchProperties.java new file mode 100644 index 000000000000..0db223fccee6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosPatchProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetworkFabric QoS Patch Properties. + */ +@Fluent +public final class QosPatchProperties implements JsonSerializable { + /* + * QoS configuration state. Default is Disabled. + */ + private QosConfigurationState qosConfigurationState; + + /** + * Creates an instance of QosPatchProperties class. + */ + public QosPatchProperties() { + } + + /** + * Get the qosConfigurationState property: QoS configuration state. Default is Disabled. + * + * @return the qosConfigurationState value. + */ + public QosConfigurationState qosConfigurationState() { + return this.qosConfigurationState; + } + + /** + * Set the qosConfigurationState property: QoS configuration state. Default is Disabled. + * + * @param qosConfigurationState the qosConfigurationState value to set. + * @return the QosPatchProperties object itself. + */ + public QosPatchProperties withQosConfigurationState(QosConfigurationState qosConfigurationState) { + this.qosConfigurationState = qosConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("qosConfigurationState", + this.qosConfigurationState == null ? null : this.qosConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QosPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QosPatchProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QosPatchProperties. + */ + public static QosPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QosPatchProperties deserializedQosPatchProperties = new QosPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("qosConfigurationState".equals(fieldName)) { + deserializedQosPatchProperties.qosConfigurationState + = QosConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedQosPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosProperties.java new file mode 100644 index 000000000000..32040e5eb882 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetworkFabric QoS Properties. + */ +@Fluent +public final class QosProperties implements JsonSerializable { + /* + * QoS configuration state. Default is Disabled. + */ + private QosConfigurationState qosConfigurationState; + + /** + * Creates an instance of QosProperties class. + */ + public QosProperties() { + } + + /** + * Get the qosConfigurationState property: QoS configuration state. Default is Disabled. + * + * @return the qosConfigurationState value. + */ + public QosConfigurationState qosConfigurationState() { + return this.qosConfigurationState; + } + + /** + * Set the qosConfigurationState property: QoS configuration state. Default is Disabled. + * + * @param qosConfigurationState the qosConfigurationState value to set. + * @return the QosProperties object itself. + */ + public QosProperties withQosConfigurationState(QosConfigurationState qosConfigurationState) { + this.qosConfigurationState = qosConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("qosConfigurationState", + this.qosConfigurationState == null ? null : this.qosConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QosProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QosProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QosProperties. + */ + public static QosProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QosProperties deserializedQosProperties = new QosProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("qosConfigurationState".equals(fieldName)) { + deserializedQosProperties.qosConfigurationState + = QosConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedQosProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java index b69c5c51385d..8d7c37449fd6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,14 +47,6 @@ public RebootProperties withRebootType(RebootType rebootType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java index 582b51f4c749..84efd8c20271 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class RebootType extends ExpandableStringEnum { /** - * Static value GracefulRebootWithZTP for RebootType. + * RebootType GracefulRebootWithZTP. */ public static final RebootType GRACEFUL_REBOOT_WITH_ZTP = fromString("GracefulRebootWithZTP"); /** - * Static value GracefulRebootWithoutZTP for RebootType. + * RebootType GracefulRebootWithoutZTP. */ public static final RebootType GRACEFUL_REBOOT_WITHOUT_ZTP = fromString("GracefulRebootWithoutZTP"); /** - * Static value UngracefulRebootWithZTP for RebootType. + * RebootType UngracefulRebootWithZTP. */ public static final RebootType UNGRACEFUL_REBOOT_WITH_ZTP = fromString("UngracefulRebootWithZTP"); /** - * Static value UngracefulRebootWithoutZTP for RebootType. + * RebootType UngracefulRebootWithoutZTP. */ public static final RebootType UNGRACEFUL_REBOOT_WITHOUT_ZTP = fromString("UngracefulRebootWithoutZTP"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java index 564c1514c174..4862a1439e0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RedistributeConnectedSubnets extends ExpandableStringEnum { /** - * Static value True for RedistributeConnectedSubnets. + * RedistributeConnectedSubnets-True. */ public static final RedistributeConnectedSubnets TRUE = fromString("True"); /** - * Static value False for RedistributeConnectedSubnets. + * RedistributeConnectedSubnets-False. */ public static final RedistributeConnectedSubnets FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java index 02c504a3e2a2..3f00c2b1461c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RedistributeStaticRoutes extends ExpandableStringEnum { /** - * Static value True for RedistributeStaticRoutes. + * RedistributeStaticRoutes-True. */ public static final RedistributeStaticRoutes TRUE = fromString("True"); /** - * Static value False for RedistributeStaticRoutes. + * RedistributeStaticRoutes-False. */ public static final RedistributeStaticRoutes FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java index c5e6907151a8..5bdd86ed7844 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface RoutePolicies { /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S RoutePolicy getByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String routePolicyName, Context context); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return paged collection of RoutePolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,9 +128,9 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String routePolicyName, + UpdateAdministrativeStateResponse updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); /** @@ -161,7 +141,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String routePolicyName); @@ -174,14 +154,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String routePolicyName, Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -189,13 +167,11 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String routePolicyName); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -204,14 +180,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String routePolicyName, Context context); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN RoutePolicy getById(String id); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java index 017ef104b849..c1a59748a2ff 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -57,6 +57,28 @@ public interface RoutePolicy { */ SystemData systemData(); + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @return the defaultAction value. + */ + CommunityActionTypes defaultAction(); + + /** + * Gets the statements property: Route Policy statements. + * + * @return the statements value. + */ + List statements(); + /** * Gets the networkFabricId property: Arm Resource ID of Network Fabric. * @@ -72,6 +94,13 @@ public interface RoutePolicy { */ AddressFamilyType addressFamilyType(); + /** + * Gets the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + LastOperationProperties lastOperation(); + /** * Gets the configurationState property: Configuration state of the resource. * @@ -93,28 +122,6 @@ public interface RoutePolicy { */ AdministrativeState administrativeState(); - /** - * Gets the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - CommunityActionTypes defaultAction(); - - /** - * Gets the statements property: Route Policy statements. - * - * @return the statements value. - */ - List statements(); - - /** - * Gets the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - String annotation(); - /** * Gets the region of the resource. * @@ -146,8 +153,9 @@ public interface RoutePolicy { /** * The entirety of the RoutePolicy definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithStatements, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { } /** @@ -191,7 +199,20 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithStatements withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the RoutePolicy definition allowing to specify statements. + */ + interface WithStatements { + /** + * Specifies the statements property: Route Policy statements.. + * + * @param statements Route Policy statements. + * @return the next definition stage. + */ + WithNetworkFabricId withStatements(List statements); } /** @@ -211,8 +232,8 @@ interface WithNetworkFabricId { * The stage of the RoutePolicy definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAddressFamilyType, - DefinitionStages.WithDefaultAction, DefinitionStages.WithStatements, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation, + DefinitionStages.WithDefaultAction, DefinitionStages.WithAddressFamilyType { /** * Executes the create request. * @@ -243,18 +264,16 @@ interface WithTags { } /** - * The stage of the RoutePolicy definition allowing to specify addressFamilyType. + * The stage of the RoutePolicy definition allowing to specify annotation. */ - interface WithAddressFamilyType { + interface WithAnnotation { /** - * Specifies the addressFamilyType property: AddressFamilyType. This parameter decides whether the given - * ipv4 or ipv6 route policy.. + * Specifies the annotation property: Switch configuration description.. * - * @param addressFamilyType AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route - * policy. + * @param annotation Switch configuration description. * @return the next definition stage. */ - WithCreate withAddressFamilyType(AddressFamilyType addressFamilyType); + WithCreate withAnnotation(String annotation); } /** @@ -273,29 +292,18 @@ interface WithDefaultAction { } /** - * The stage of the RoutePolicy definition allowing to specify statements. - */ - interface WithStatements { - /** - * Specifies the statements property: Route Policy statements.. - * - * @param statements Route Policy statements. - * @return the next definition stage. - */ - WithCreate withStatements(List statements); - } - - /** - * The stage of the RoutePolicy definition allowing to specify annotation. + * The stage of the RoutePolicy definition allowing to specify addressFamilyType. */ - interface WithAnnotation { + interface WithAddressFamilyType { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the addressFamilyType property: AddressFamilyType. This parameter decides whether the given + * ipv4 or ipv6 route policy.. * - * @param annotation Switch configuration description. + * @param addressFamilyType AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route + * policy. * @return the next definition stage. */ - WithCreate withAnnotation(String annotation); + WithCreate withAddressFamilyType(AddressFamilyType addressFamilyType); } } @@ -335,7 +343,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -368,7 +376,7 @@ interface WithStatements { * @param statements Route Policy statements. * @return the next definition stage. */ - Update withStatements(List statements); + Update withStatementsForUpdate(List statements); } } @@ -388,21 +396,17 @@ interface WithStatements { RoutePolicy refresh(Context context); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param body Request payload. @@ -410,16 +414,16 @@ interface WithStatements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for device updates. + * @return the response. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + UpdateAdministrativeStateResponse updateAdministrativeState(UpdateAdministrativeState body, Context context); /** * Validates the configuration of the resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -430,31 +434,27 @@ interface WithStatements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(Context context); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(); /** - * Execute the commit on the resources. - * * Commits the configuration of the given resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java index 026a27dddf36..cc83a8f13d41 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class RoutePolicyActionType extends ExpandableStringEnum { /** - * Static value Permit for RoutePolicyActionType. + * RoutePolicyActionType-Permit. */ public static final RoutePolicyActionType PERMIT = fromString("Permit"); /** - * Static value Deny for RoutePolicyActionType. + * RoutePolicyActionType-Deny. */ public static final RoutePolicyActionType DENY = fromString("Deny"); /** - * Static value Continue for RoutePolicyActionType. + * RoutePolicyActionType-Continue. */ public static final RoutePolicyActionType CONTINUE = fromString("Continue"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java index 39d42ef5d7e1..677ea1571e74 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RoutePolicyConditionType extends ExpandableStringEnum { /** - * Static value Or for RoutePolicyConditionType. + * RoutePolicyConditionType-Or. */ public static final RoutePolicyConditionType OR = fromString("Or"); /** - * Static value And for RoutePolicyConditionType. + * RoutePolicyConditionType-And. */ public static final RoutePolicyConditionType AND = fromString("And"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java index c7bf64ffba7b..6b4c25eec72d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -77,7 +77,7 @@ public RoutePolicyPatch withDefaultAction(CommunityActionTypes defaultAction) { * * @return the statements value. */ - public List statements() { + public List statements() { return this.innerProperties() == null ? null : this.innerProperties().statements(); } @@ -87,7 +87,7 @@ public List statements() { * @param statements the statements value to set. * @return the RoutePolicyPatch object itself. */ - public RoutePolicyPatch withStatements(List statements) { + public RoutePolicyPatch withStatements(List statements) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyPatchableProperties(); } @@ -95,18 +95,6 @@ public RoutePolicyPatch withStatements(List stat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java new file mode 100644 index 000000000000..38431a05511f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Route Policy Statement properties. + */ +@Fluent +public final class RoutePolicyStatementPatchProperties extends AnnotationResource { + /* + * Sequence to insert to/delete from existing route. + */ + private long sequenceNumber; + + /* + * Route policy condition properties. + */ + private StatementConditionPatchProperties condition; + + /* + * Route policy action properties. + */ + private StatementActionPatchProperties action; + + /** + * Creates an instance of RoutePolicyStatementPatchProperties class. + */ + public RoutePolicyStatementPatchProperties() { + } + + /** + * Get the sequenceNumber property: Sequence to insert to/delete from existing route. + * + * @return the sequenceNumber value. + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence to insert to/delete from existing route. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the condition property: Route policy condition properties. + * + * @return the condition value. + */ + public StatementConditionPatchProperties condition() { + return this.condition; + } + + /** + * Set the condition property: Route policy condition properties. + * + * @param condition the condition value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withCondition(StatementConditionPatchProperties condition) { + this.condition = condition; + return this; + } + + /** + * Get the action property: Route policy action properties. + * + * @return the action value. + */ + public StatementActionPatchProperties action() { + return this.action; + } + + /** + * Set the action property: Route policy action properties. + * + * @param action the action value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withAction(StatementActionPatchProperties action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public RoutePolicyStatementPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeLongField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeJsonField("condition", this.condition); + jsonWriter.writeJsonField("action", this.action); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePolicyStatementPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePolicyStatementPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoutePolicyStatementPatchProperties. + */ + public static RoutePolicyStatementPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePolicyStatementPatchProperties deserializedRoutePolicyStatementPatchProperties + = new RoutePolicyStatementPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.withAnnotation(reader.getString()); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.sequenceNumber = reader.getLong(); + } else if ("condition".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.condition + = StatementConditionPatchProperties.fromJson(reader); + } else if ("action".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.action + = StatementActionPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePolicyStatementPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java index 77eb1f0d5c65..5818679d8a5d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -106,31 +105,6 @@ public RoutePolicyStatementProperties withAnnotation(String annotation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (condition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property condition in model RoutePolicyStatementProperties")); - } else { - condition().validate(); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property action in model RoutePolicyStatementProperties")); - } else { - action().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyStatementProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java new file mode 100644 index 000000000000..41e627034f61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * VRP Limit patch configuration. + */ +@Fluent +public final class RoutePrefixLimitPatchProperties implements JsonSerializable { + /* + * Hard limit for the routes. + */ + private Integer hardLimit; + + /* + * Threshold for the routes. + */ + private Integer threshold; + + /** + * Creates an instance of RoutePrefixLimitPatchProperties class. + */ + public RoutePrefixLimitPatchProperties() { + } + + /** + * Get the hardLimit property: Hard limit for the routes. + * + * @return the hardLimit value. + */ + public Integer hardLimit() { + return this.hardLimit; + } + + /** + * Set the hardLimit property: Hard limit for the routes. + * + * @param hardLimit the hardLimit value to set. + * @return the RoutePrefixLimitPatchProperties object itself. + */ + public RoutePrefixLimitPatchProperties withHardLimit(Integer hardLimit) { + this.hardLimit = hardLimit; + return this; + } + + /** + * Get the threshold property: Threshold for the routes. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Threshold for the routes. + * + * @param threshold the threshold value to set. + * @return the RoutePrefixLimitPatchProperties object itself. + */ + public RoutePrefixLimitPatchProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("hardLimit", this.hardLimit); + jsonWriter.writeNumberField("threshold", this.threshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutePrefixLimitPatchProperties. + */ + public static RoutePrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePrefixLimitPatchProperties deserializedRoutePrefixLimitPatchProperties + = new RoutePrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hardLimit".equals(fieldName)) { + deserializedRoutePrefixLimitPatchProperties.hardLimit = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedRoutePrefixLimitPatchProperties.threshold = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java new file mode 100644 index 000000000000..231c6fc762c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Layer3 Route prefix limit configuration. + */ +@Fluent +public final class RoutePrefixLimitProperties implements JsonSerializable { + /* + * Hard limit for the routes. + */ + private Integer hardLimit; + + /* + * Threshold for the routes. + */ + private Integer threshold; + + /** + * Creates an instance of RoutePrefixLimitProperties class. + */ + public RoutePrefixLimitProperties() { + } + + /** + * Get the hardLimit property: Hard limit for the routes. + * + * @return the hardLimit value. + */ + public Integer hardLimit() { + return this.hardLimit; + } + + /** + * Set the hardLimit property: Hard limit for the routes. + * + * @param hardLimit the hardLimit value to set. + * @return the RoutePrefixLimitProperties object itself. + */ + public RoutePrefixLimitProperties withHardLimit(Integer hardLimit) { + this.hardLimit = hardLimit; + return this; + } + + /** + * Get the threshold property: Threshold for the routes. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Threshold for the routes. + * + * @param threshold the threshold value to set. + * @return the RoutePrefixLimitProperties object itself. + */ + public RoutePrefixLimitProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("hardLimit", this.hardLimit); + jsonWriter.writeNumberField("threshold", this.threshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePrefixLimitProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutePrefixLimitProperties. + */ + public static RoutePrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePrefixLimitProperties deserializedRoutePrefixLimitProperties = new RoutePrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hardLimit".equals(fieldName)) { + deserializedRoutePrefixLimitProperties.hardLimit = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedRoutePrefixLimitProperties.threshold = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java index 3098dda5ea4f..44887558c492 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -123,14 +123,6 @@ public RouteTargetInformation withExportIpv6RouteTargets(List exportIpv6 return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java new file mode 100644 index 000000000000..af79afca3238 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route Target Configuration. + */ +@Fluent +public final class RouteTargetPatchInformation implements JsonSerializable { + /* + * Route Targets to be applied for incoming routes into CE. + */ + private List importIpv4RouteTargets; + + /* + * Route Targets to be applied for incoming routes from CE. + */ + private List importIpv6RouteTargets; + + /* + * Route Targets to be applied for outgoing routes into CE. + */ + private List exportIpv4RouteTargets; + + /* + * Route Targets to be applied for outgoing routes from CE. + */ + private List exportIpv6RouteTargets; + + /** + * Creates an instance of RouteTargetPatchInformation class. + */ + public RouteTargetPatchInformation() { + } + + /** + * Get the importIpv4RouteTargets property: Route Targets to be applied for incoming routes into CE. + * + * @return the importIpv4RouteTargets value. + */ + public List importIpv4RouteTargets() { + return this.importIpv4RouteTargets; + } + + /** + * Set the importIpv4RouteTargets property: Route Targets to be applied for incoming routes into CE. + * + * @param importIpv4RouteTargets the importIpv4RouteTargets value to set. + * @return the RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation withImportIpv4RouteTargets(List importIpv4RouteTargets) { + this.importIpv4RouteTargets = importIpv4RouteTargets; + return this; + } + + /** + * Get the importIpv6RouteTargets property: Route Targets to be applied for incoming routes from CE. + * + * @return the importIpv6RouteTargets value. + */ + public List importIpv6RouteTargets() { + return this.importIpv6RouteTargets; + } + + /** + * Set the importIpv6RouteTargets property: Route Targets to be applied for incoming routes from CE. + * + * @param importIpv6RouteTargets the importIpv6RouteTargets value to set. + * @return the RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation withImportIpv6RouteTargets(List importIpv6RouteTargets) { + this.importIpv6RouteTargets = importIpv6RouteTargets; + return this; + } + + /** + * Get the exportIpv4RouteTargets property: Route Targets to be applied for outgoing routes into CE. + * + * @return the exportIpv4RouteTargets value. + */ + public List exportIpv4RouteTargets() { + return this.exportIpv4RouteTargets; + } + + /** + * Set the exportIpv4RouteTargets property: Route Targets to be applied for outgoing routes into CE. + * + * @param exportIpv4RouteTargets the exportIpv4RouteTargets value to set. + * @return the RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation withExportIpv4RouteTargets(List exportIpv4RouteTargets) { + this.exportIpv4RouteTargets = exportIpv4RouteTargets; + return this; + } + + /** + * Get the exportIpv6RouteTargets property: Route Targets to be applied for outgoing routes from CE. + * + * @return the exportIpv6RouteTargets value. + */ + public List exportIpv6RouteTargets() { + return this.exportIpv6RouteTargets; + } + + /** + * Set the exportIpv6RouteTargets property: Route Targets to be applied for outgoing routes from CE. + * + * @param exportIpv6RouteTargets the exportIpv6RouteTargets value to set. + * @return the RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation withExportIpv6RouteTargets(List exportIpv6RouteTargets) { + this.exportIpv6RouteTargets = exportIpv6RouteTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importIpv4RouteTargets", this.importIpv4RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("importIpv6RouteTargets", this.importIpv6RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportIpv4RouteTargets", this.exportIpv4RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportIpv6RouteTargets", this.exportIpv6RouteTargets, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RouteTargetPatchInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RouteTargetPatchInformation if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RouteTargetPatchInformation. + */ + public static RouteTargetPatchInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RouteTargetPatchInformation deserializedRouteTargetPatchInformation = new RouteTargetPatchInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RouteTargets".equals(fieldName)) { + List importIpv4RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.importIpv4RouteTargets = importIpv4RouteTargets; + } else if ("importIpv6RouteTargets".equals(fieldName)) { + List importIpv6RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.importIpv6RouteTargets = importIpv6RouteTargets; + } else if ("exportIpv4RouteTargets".equals(fieldName)) { + List exportIpv4RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.exportIpv4RouteTargets = exportIpv4RouteTargets; + } else if ("exportIpv6RouteTargets".equals(fieldName)) { + List exportIpv6RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.exportIpv6RouteTargets = exportIpv6RouteTargets; + } else { + reader.skipChildren(); + } + } + + return deserializedRouteTargetPatchInformation; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java new file mode 100644 index 000000000000..39ae553fe04b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Route type to be used. + */ +public final class RouteType extends ExpandableStringEnum { + /** + * RouteType-Static. + */ + public static final RouteType STATIC = fromString("Static"); + + /** + * RouteType-OptionA. + */ + public static final RouteType OPTIONA = fromString("OptionA"); + + /** + * Creates a new instance of RouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RouteType() { + } + + /** + * Creates or finds a RouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RouteType. + */ + public static RouteType fromString(String name) { + return fromString(name, RouteType.class); + } + + /** + * Gets known RouteType values. + * + * @return known RouteType values. + */ + public static Collection values() { + return values(RouteType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java new file mode 100644 index 000000000000..2f1f3d528ab7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify Rule condition. + */ +public final class RuleCondition extends ExpandableStringEnum { + /** + * And Rule-Condition. + */ + public static final RuleCondition AND = fromString("And"); + + /** + * Or Rule-Condition. + */ + public static final RuleCondition OR = fromString("Or"); + + /** + * Creates a new instance of RuleCondition value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleCondition() { + } + + /** + * Creates or finds a RuleCondition from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleCondition. + */ + public static RuleCondition fromString(String name) { + return fromString(name, RuleCondition.class); + } + + /** + * Gets known RuleCondition values. + * + * @return known RuleCondition values. + */ + public static Collection values() { + return values(RuleCondition.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java index 0bb8a01abe9b..46332f81d540 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -28,6 +27,26 @@ public final class RuleProperties implements JsonSerializable { */ private List addressList; + /* + * Specify rule condition. + */ + private RuleCondition condition; + + /* + * List of Addresses to be allowed or denied. + */ + private List destinationAddressList; + + /* + * List of source IPv4 and IPv6 address to be allowed or denied. + */ + private List sourceAddressList; + + /* + * List of header Name and source addresses associated with the header. + */ + private List headerAddressList; + /** * Creates an instance of RuleProperties class. */ @@ -75,22 +94,84 @@ public RuleProperties withAddressList(List addressList) { } /** - * Validates the instance. + * Get the condition property: Specify rule condition. + * + * @return the condition value. + */ + public RuleCondition condition() { + return this.condition; + } + + /** + * Set the condition property: Specify rule condition. + * + * @param condition the condition value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withCondition(RuleCondition condition) { + this.condition = condition; + return this; + } + + /** + * Get the destinationAddressList property: List of Addresses to be allowed or denied. + * + * @return the destinationAddressList value. + */ + public List destinationAddressList() { + return this.destinationAddressList; + } + + /** + * Set the destinationAddressList property: List of Addresses to be allowed or denied. + * + * @param destinationAddressList the destinationAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withDestinationAddressList(List destinationAddressList) { + this.destinationAddressList = destinationAddressList; + return this; + } + + /** + * Get the sourceAddressList property: List of source IPv4 and IPv6 address to be allowed or denied. + * + * @return the sourceAddressList value. + */ + public List sourceAddressList() { + return this.sourceAddressList; + } + + /** + * Set the sourceAddressList property: List of source IPv4 and IPv6 address to be allowed or denied. + * + * @param sourceAddressList the sourceAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withSourceAddressList(List sourceAddressList) { + this.sourceAddressList = sourceAddressList; + return this; + } + + /** + * Get the headerAddressList property: List of header Name and source addresses associated with the header. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model RuleProperties")); - } - if (addressList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property addressList in model RuleProperties")); - } + * @return the headerAddressList value. + */ + public List headerAddressList() { + return this.headerAddressList; } - private static final ClientLogger LOGGER = new ClientLogger(RuleProperties.class); + /** + * Set the headerAddressList property: List of header Name and source addresses associated with the header. + * + * @param headerAddressList the headerAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withHeaderAddressList(List headerAddressList) { + this.headerAddressList = headerAddressList; + return this; + } /** * {@inheritDoc} @@ -100,6 +181,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); jsonWriter.writeArrayField("addressList", this.addressList, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("condition", this.condition == null ? null : this.condition.toString()); + jsonWriter.writeArrayField("destinationAddressList", this.destinationAddressList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("sourceAddressList", this.sourceAddressList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("headerAddressList", this.headerAddressList, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -124,6 +212,18 @@ public static RuleProperties fromJson(JsonReader jsonReader) throws IOException } else if ("addressList".equals(fieldName)) { List addressList = reader.readArray(reader1 -> reader1.getString()); deserializedRuleProperties.addressList = addressList; + } else if ("condition".equals(fieldName)) { + deserializedRuleProperties.condition = RuleCondition.fromString(reader.getString()); + } else if ("destinationAddressList".equals(fieldName)) { + List destinationAddressList = reader.readArray(reader1 -> reader1.getString()); + deserializedRuleProperties.destinationAddressList = destinationAddressList; + } else if ("sourceAddressList".equals(fieldName)) { + List sourceAddressList = reader.readArray(reader1 -> reader1.getString()); + deserializedRuleProperties.sourceAddressList = sourceAddressList; + } else if ("headerAddressList".equals(fieldName)) { + List headerAddressList + = reader.readArray(reader1 -> HeaderAddressProperties.fromJson(reader1)); + deserializedRuleProperties.headerAddressList = headerAddressList; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretArchiveReference.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretArchiveReference.java new file mode 100644 index 000000000000..462e040a2c64 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretArchiveReference.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A reference to a version of a secret in a key vault. + */ +@Immutable +public final class SecretArchiveReference implements JsonSerializable { + /* + * A Uniform Resource Identifier (URI) for the secret in the key vault. + */ + private String keyVaultUri; + + /* + * The resource ID of the key vault containing the secret. + */ + private String keyVaultId; + + /* + * The name of the secret in the key vault. + */ + private String secretName; + + /* + * The version of the secret in the key vault. + */ + private String secretVersion; + + /** + * Creates an instance of SecretArchiveReference class. + */ + private SecretArchiveReference() { + } + + /** + * Get the keyVaultUri property: A Uniform Resource Identifier (URI) for the secret in the key vault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Get the keyVaultId property: The resource ID of the key vault containing the secret. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Get the secretName property: The name of the secret in the key vault. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Get the secretVersion property: The version of the secret in the key vault. + * + * @return the secretVersion value. + */ + public String secretVersion() { + return this.secretVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretArchiveReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretArchiveReference if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretArchiveReference. + */ + public static SecretArchiveReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretArchiveReference deserializedSecretArchiveReference = new SecretArchiveReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedSecretArchiveReference.keyVaultUri = reader.getString(); + } else if ("keyVaultId".equals(fieldName)) { + deserializedSecretArchiveReference.keyVaultId = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedSecretArchiveReference.secretName = reader.getString(); + } else if ("secretVersion".equals(fieldName)) { + deserializedSecretArchiveReference.secretVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretArchiveReference; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationStatus.java new file mode 100644 index 000000000000..7ea65f823441 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationStatus.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Status of a secret rotation for a device (Network Device or Terminal Server). + */ +@Immutable +public final class SecretRotationStatus implements JsonSerializable { + /* + * The date and time when the secret was last changed. + */ + private OffsetDateTime lastRotationTime; + + /* + * Whether the device has been configured with the latest version of the secret. + */ + private SynchronizationStatus synchronizationStatus; + + /* + * Reference to the currently configured version of the secret in a key vault. + */ + private SecretArchiveReference secretArchiveReference; + + /* + * Identifies the secret according to its purpose. + */ + private String secretType; + + /** + * Creates an instance of SecretRotationStatus class. + */ + private SecretRotationStatus() { + } + + /** + * Get the lastRotationTime property: The date and time when the secret was last changed. + * + * @return the lastRotationTime value. + */ + public OffsetDateTime lastRotationTime() { + return this.lastRotationTime; + } + + /** + * Get the synchronizationStatus property: Whether the device has been configured with the latest version of the + * secret. + * + * @return the synchronizationStatus value. + */ + public SynchronizationStatus synchronizationStatus() { + return this.synchronizationStatus; + } + + /** + * Get the secretArchiveReference property: Reference to the currently configured version of the secret in a key + * vault. + * + * @return the secretArchiveReference value. + */ + public SecretArchiveReference secretArchiveReference() { + return this.secretArchiveReference; + } + + /** + * Get the secretType property: Identifies the secret according to its purpose. + * + * @return the secretType value. + */ + public String secretType() { + return this.secretType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretRotationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretRotationStatus if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretRotationStatus. + */ + public static SecretRotationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretRotationStatus deserializedSecretRotationStatus = new SecretRotationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastRotationTime".equals(fieldName)) { + deserializedSecretRotationStatus.lastRotationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("synchronizationStatus".equals(fieldName)) { + deserializedSecretRotationStatus.synchronizationStatus + = SynchronizationStatus.fromString(reader.getString()); + } else if ("secretArchiveReference".equals(fieldName)) { + deserializedSecretRotationStatus.secretArchiveReference = SecretArchiveReference.fromJson(reader); + } else if ("secretType".equals(fieldName)) { + deserializedSecretRotationStatus.secretType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretRotationStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationSummary.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationSummary.java new file mode 100644 index 000000000000..c910dcb1ed0a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationSummary.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Overview of secret rotation for the Network Fabric. + */ +@Immutable +public final class SecretRotationSummary implements JsonSerializable { + /* + * The number of active password sets configured on the devices. + */ + private Long activePasswordSetCount; + + /** + * Creates an instance of SecretRotationSummary class. + */ + private SecretRotationSummary() { + } + + /** + * Get the activePasswordSetCount property: The number of active password sets configured on the devices. + * + * @return the activePasswordSetCount value. + */ + public Long activePasswordSetCount() { + return this.activePasswordSetCount; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretRotationSummary from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretRotationSummary if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretRotationSummary. + */ + public static SecretRotationSummary fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretRotationSummary deserializedSecretRotationSummary = new SecretRotationSummary(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activePasswordSetCount".equals(fieldName)) { + deserializedSecretRotationSummary.activePasswordSetCount = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretRotationSummary; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java index c4dab671b860..f873891c701d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class SourceDestinationType extends ExpandableStringEnum { /** - * Static value SourceIP for SourceDestinationType. + * SourceDestinationType SourceIP. */ public static final SourceDestinationType SOURCE_IP = fromString("SourceIP"); /** - * Static value DestinationIP for SourceDestinationType. + * SourceDestinationType DestinationIP. */ public static final SourceDestinationType DESTINATION_IP = fromString("DestinationIP"); + /** + * SourceDestinationType Bidirectional. + */ + public static final SourceDestinationType BIDIRECTIONAL = fromString("Bidirectional"); + /** * Creates a new instance of SourceDestinationType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java new file mode 100644 index 000000000000..f6cca2575aa4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Route policy action properties. + */ +@Fluent +public final class StatementActionPatchProperties implements JsonSerializable { + /* + * Local Preference of the route policy. + */ + private Long localPreference; + + /* + * Action type. Example: Permit | Deny | Continue. + */ + private RoutePolicyActionType actionType; + + /* + * IP Community Properties. + */ + private ActionIpCommunityPatchProperties ipCommunityProperties; + + /* + * IP Extended Community Properties. + */ + private ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties; + + /** + * Creates an instance of StatementActionPatchProperties class. + */ + public StatementActionPatchProperties() { + } + + /** + * Get the localPreference property: Local Preference of the route policy. + * + * @return the localPreference value. + */ + public Long localPreference() { + return this.localPreference; + } + + /** + * Set the localPreference property: Local Preference of the route policy. + * + * @param localPreference the localPreference value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties withLocalPreference(Long localPreference) { + this.localPreference = localPreference; + return this; + } + + /** + * Get the actionType property: Action type. Example: Permit | Deny | Continue. + * + * @return the actionType value. + */ + public RoutePolicyActionType actionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action type. Example: Permit | Deny | Continue. + * + * @param actionType the actionType value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties withActionType(RoutePolicyActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the ipCommunityProperties property: IP Community Properties. + * + * @return the ipCommunityProperties value. + */ + public ActionIpCommunityPatchProperties ipCommunityProperties() { + return this.ipCommunityProperties; + } + + /** + * Set the ipCommunityProperties property: IP Community Properties. + * + * @param ipCommunityProperties the ipCommunityProperties value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties + withIpCommunityProperties(ActionIpCommunityPatchProperties ipCommunityProperties) { + this.ipCommunityProperties = ipCommunityProperties; + return this; + } + + /** + * Get the ipExtendedCommunityProperties property: IP Extended Community Properties. + * + * @return the ipExtendedCommunityProperties value. + */ + public ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties() { + return this.ipExtendedCommunityProperties; + } + + /** + * Set the ipExtendedCommunityProperties property: IP Extended Community Properties. + * + * @param ipExtendedCommunityProperties the ipExtendedCommunityProperties value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties + withIpExtendedCommunityProperties(ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties) { + this.ipExtendedCommunityProperties = ipExtendedCommunityProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); + jsonWriter.writeNumberField("localPreference", this.localPreference); + jsonWriter.writeJsonField("ipCommunityProperties", this.ipCommunityProperties); + jsonWriter.writeJsonField("ipExtendedCommunityProperties", this.ipExtendedCommunityProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatementActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatementActionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the StatementActionPatchProperties. + */ + public static StatementActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatementActionPatchProperties deserializedStatementActionPatchProperties + = new StatementActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionType".equals(fieldName)) { + deserializedStatementActionPatchProperties.actionType + = RoutePolicyActionType.fromString(reader.getString()); + } else if ("localPreference".equals(fieldName)) { + deserializedStatementActionPatchProperties.localPreference + = reader.getNullable(JsonReader::getLong); + } else if ("ipCommunityProperties".equals(fieldName)) { + deserializedStatementActionPatchProperties.ipCommunityProperties + = ActionIpCommunityPatchProperties.fromJson(reader); + } else if ("ipExtendedCommunityProperties".equals(fieldName)) { + deserializedStatementActionPatchProperties.ipExtendedCommunityProperties + = ActionIpExtendedCommunityPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStatementActionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java index 54917bb87e0e..734d5c4394bf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -124,27 +123,6 @@ public ActionIpExtendedCommunityProperties ipExtendedCommunityProperties() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property actionType in model StatementActionProperties")); - } - if (ipCommunityProperties() != null) { - ipCommunityProperties().validate(); - } - if (ipExtendedCommunityProperties() != null) { - ipExtendedCommunityProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StatementActionProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java new file mode 100644 index 000000000000..ec5570eea4e7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route policy statement condition properties. + */ +@Fluent +public final class StatementConditionPatchProperties implements JsonSerializable { + /* + * List of IP Community resource IDs. + */ + private List ipCommunityIds; + + /* + * List of IP Extended Community resource IDs. + */ + private List ipExtendedCommunityIds; + + /* + * Type of the condition used. + */ + private RoutePolicyConditionType type; + + /* + * Arm Resource Id of IpPrefix. + */ + private String ipPrefixId; + + /** + * Creates an instance of StatementConditionPatchProperties class. + */ + public StatementConditionPatchProperties() { + } + + /** + * Get the ipCommunityIds property: List of IP Community resource IDs. + * + * @return the ipCommunityIds value. + */ + public List ipCommunityIds() { + return this.ipCommunityIds; + } + + /** + * Set the ipCommunityIds property: List of IP Community resource IDs. + * + * @param ipCommunityIds the ipCommunityIds value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpCommunityIds(List ipCommunityIds) { + this.ipCommunityIds = ipCommunityIds; + return this; + } + + /** + * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * + * @return the ipExtendedCommunityIds value. + */ + public List ipExtendedCommunityIds() { + return this.ipExtendedCommunityIds; + } + + /** + * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * + * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { + this.ipExtendedCommunityIds = ipExtendedCommunityIds; + return this; + } + + /** + * Get the type property: Type of the condition used. + * + * @return the type value. + */ + public RoutePolicyConditionType type() { + return this.type; + } + + /** + * Set the type property: Type of the condition used. + * + * @param type the type value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withType(RoutePolicyConditionType type) { + this.type = type; + return this; + } + + /** + * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @return the ipPrefixId value. + */ + public String ipPrefixId() { + return this.ipPrefixId; + } + + /** + * Set the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @param ipPrefixId the ipPrefixId value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpPrefixId(String ipPrefixId) { + this.ipPrefixId = ipPrefixId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipCommunityIds", this.ipCommunityIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipExtendedCommunityIds", this.ipExtendedCommunityIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatementConditionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatementConditionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StatementConditionPatchProperties. + */ + public static StatementConditionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatementConditionPatchProperties deserializedStatementConditionPatchProperties + = new StatementConditionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipCommunityIds".equals(fieldName)) { + List ipCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionPatchProperties.ipCommunityIds = ipCommunityIds; + } else if ("ipExtendedCommunityIds".equals(fieldName)) { + List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionPatchProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; + } else if ("type".equals(fieldName)) { + deserializedStatementConditionPatchProperties.type + = RoutePolicyConditionType.fromString(reader.getString()); + } else if ("ipPrefixId".equals(fieldName)) { + deserializedStatementConditionPatchProperties.ipPrefixId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStatementConditionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java index 016fe4864401..dd5354707f7e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,17 @@ * Route policy statement condition properties. */ @Fluent -public final class StatementConditionProperties extends IpCommunityIdList { +public final class StatementConditionProperties implements JsonSerializable { + /* + * List of IP Community resource IDs. + */ + private List ipCommunityIds; + + /* + * List of IP Extended Community resource IDs. + */ + private List ipExtendedCommunityIds; + /* * Type of the condition used. */ @@ -26,11 +37,6 @@ public final class StatementConditionProperties extends IpCommunityIdList { */ private String ipPrefixId; - /* - * List of IP Extended Community resource IDs. - */ - private List ipExtendedCommunityIds; - /** * Creates an instance of StatementConditionProperties class. */ @@ -38,81 +44,83 @@ public StatementConditionProperties() { } /** - * Get the type property: Type of the condition used. + * Get the ipCommunityIds property: List of IP Community resource IDs. * - * @return the type value. + * @return the ipCommunityIds value. */ - public RoutePolicyConditionType type() { - return this.type; + public List ipCommunityIds() { + return this.ipCommunityIds; } /** - * Set the type property: Type of the condition used. + * Set the ipCommunityIds property: List of IP Community resource IDs. * - * @param type the type value to set. + * @param ipCommunityIds the ipCommunityIds value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withType(RoutePolicyConditionType type) { - this.type = type; + public StatementConditionProperties withIpCommunityIds(List ipCommunityIds) { + this.ipCommunityIds = ipCommunityIds; return this; } /** - * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. * - * @return the ipPrefixId value. + * @return the ipExtendedCommunityIds value. */ - public String ipPrefixId() { - return this.ipPrefixId; + public List ipExtendedCommunityIds() { + return this.ipExtendedCommunityIds; } /** - * Set the ipPrefixId property: Arm Resource Id of IpPrefix. + * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. * - * @param ipPrefixId the ipPrefixId value to set. + * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withIpPrefixId(String ipPrefixId) { - this.ipPrefixId = ipPrefixId; + public StatementConditionProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { + this.ipExtendedCommunityIds = ipExtendedCommunityIds; return this; } /** - * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * Get the type property: Type of the condition used. * - * @return the ipExtendedCommunityIds value. + * @return the type value. */ - public List ipExtendedCommunityIds() { - return this.ipExtendedCommunityIds; + public RoutePolicyConditionType type() { + return this.type; } /** - * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * Set the type property: Type of the condition used. * - * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. + * @param type the type value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { - this.ipExtendedCommunityIds = ipExtendedCommunityIds; + public StatementConditionProperties withType(RoutePolicyConditionType type) { + this.type = type; return this; } /** - * {@inheritDoc} + * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @return the ipPrefixId value. */ - @Override - public StatementConditionProperties withIpCommunityIds(List ipCommunityIds) { - super.withIpCommunityIds(ipCommunityIds); - return this; + public String ipPrefixId() { + return this.ipPrefixId; } /** - * Validates the instance. + * Set the ipPrefixId property: Arm Resource Id of IpPrefix. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipPrefixId the ipPrefixId value to set. + * @return the StatementConditionProperties object itself. */ - @Override - public void validate() { + public StatementConditionProperties withIpPrefixId(String ipPrefixId) { + this.ipPrefixId = ipPrefixId; + return this; } /** @@ -121,12 +129,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipCommunityIds", ipCommunityIds(), + jsonWriter.writeArrayField("ipCommunityIds", this.ipCommunityIds, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); jsonWriter.writeArrayField("ipExtendedCommunityIds", this.ipExtendedCommunityIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); return jsonWriter.writeEndObject(); } @@ -147,15 +155,15 @@ public static StatementConditionProperties fromJson(JsonReader jsonReader) throw if ("ipCommunityIds".equals(fieldName)) { List ipCommunityIds = reader.readArray(reader1 -> reader1.getString()); - deserializedStatementConditionProperties.withIpCommunityIds(ipCommunityIds); + deserializedStatementConditionProperties.ipCommunityIds = ipCommunityIds; + } else if ("ipExtendedCommunityIds".equals(fieldName)) { + List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; } else if ("type".equals(fieldName)) { deserializedStatementConditionProperties.type = RoutePolicyConditionType.fromString(reader.getString()); } else if ("ipPrefixId".equals(fieldName)) { deserializedStatementConditionProperties.ipPrefixId = reader.getString(); - } else if ("ipExtendedCommunityIds".equals(fieldName)) { - List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); - deserializedStatementConditionProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java index a049d7d7124a..aac0553dba17 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * Static Route Configuration properties. */ @Fluent -public class StaticRouteConfiguration implements JsonSerializable { +public final class StaticRouteConfiguration implements JsonSerializable { /* * BFD configuration properties */ @@ -32,6 +32,11 @@ public class StaticRouteConfiguration implements JsonSerializable ipv6Routes; + /* + * Extension. Example: NoExtension | NPB. + */ + private Extension extension; + /** * Creates an instance of StaticRouteConfiguration class. */ @@ -99,20 +104,23 @@ public StaticRouteConfiguration withIpv6Routes(List ipv6R } /** - * Validates the instance. + * Get the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + public Extension extension() { + return this.extension; + } + + /** + * Set the extension property: Extension. Example: NoExtension | NPB. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param extension the extension value to set. + * @return the StaticRouteConfiguration object itself. */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } + public StaticRouteConfiguration withExtension(Extension extension) { + this.extension = extension; + return this; } /** @@ -124,6 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); return jsonWriter.writeEndObject(); } @@ -152,6 +161,8 @@ public static StaticRouteConfiguration fromJson(JsonReader jsonReader) throws IO List ipv6Routes = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); deserializedStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else if ("extension".equals(fieldName)) { + deserializedStaticRouteConfiguration.extension = Extension.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..ec400d4dbe4a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties. + */ +@Fluent +public final class StaticRoutePatchConfiguration implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of StaticRoutePatchConfiguration class. + */ + public StaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRoutePatchConfiguration. + */ + public static StaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRoutePatchConfiguration deserializedStaticRoutePatchConfiguration + = new StaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedStaticRoutePatchConfiguration.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java new file mode 100644 index 000000000000..2863e1d9d4ed --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route Properties. + */ +@Fluent +public final class StaticRoutePatchProperties implements JsonSerializable { + /* + * Prefix of the route. + */ + private String prefix; + + /* + * List of next hop addresses. + */ + private List nextHop; + + /** + * Creates an instance of StaticRoutePatchProperties class. + */ + public StaticRoutePatchProperties() { + } + + /** + * Get the prefix property: Prefix of the route. + * + * @return the prefix value. + */ + public String prefix() { + return this.prefix; + } + + /** + * Set the prefix property: Prefix of the route. + * + * @param prefix the prefix value to set. + * @return the StaticRoutePatchProperties object itself. + */ + public StaticRoutePatchProperties withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the nextHop property: List of next hop addresses. + * + * @return the nextHop value. + */ + public List nextHop() { + return this.nextHop; + } + + /** + * Set the nextHop property: List of next hop addresses. + * + * @param nextHop the nextHop value to set. + * @return the StaticRoutePatchProperties object itself. + */ + public StaticRoutePatchProperties withNextHop(List nextHop) { + this.nextHop = nextHop; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("prefix", this.prefix); + jsonWriter.writeArrayField("nextHop", this.nextHop, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRoutePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRoutePatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the StaticRoutePatchProperties. + */ + public static StaticRoutePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRoutePatchProperties deserializedStaticRoutePatchProperties = new StaticRoutePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefix".equals(fieldName)) { + deserializedStaticRoutePatchProperties.prefix = reader.getString(); + } else if ("nextHop".equals(fieldName)) { + List nextHop = reader.readArray(reader1 -> reader1.getString()); + deserializedStaticRoutePatchProperties.nextHop = nextHop; + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRoutePatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java index 9a64fbc1a62d..491d6b17ab87 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,24 +73,6 @@ public StaticRouteProperties withNextHop(List nextHop) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model StaticRouteProperties")); - } - if (nextHop() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property nextHop in model StaticRouteProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StaticRouteProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java new file mode 100644 index 000000000000..9730b3b7d80a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Static Route - route policy properties. + */ +@Fluent +public final class StaticRouteRoutePolicy implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicy exportRoutePolicy; + + /** + * Creates an instance of StaticRouteRoutePolicy class. + */ + public StaticRouteRoutePolicy() { + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the StaticRouteRoutePolicy object itself. + */ + public StaticRouteRoutePolicy withExportRoutePolicy(L3ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRouteRoutePolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRouteRoutePolicy if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRouteRoutePolicy. + */ + public static StaticRouteRoutePolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRouteRoutePolicy deserializedStaticRouteRoutePolicy = new StaticRouteRoutePolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedStaticRouteRoutePolicy.exportRoutePolicy = L3ExportRoutePolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRouteRoutePolicy; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java new file mode 100644 index 000000000000..08118a06e103 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Static Route - route policy properties. + */ +@Fluent +public final class StaticRouteRoutePolicyPatch implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicyPatch exportRoutePolicy; + + /** + * Creates an instance of StaticRouteRoutePolicyPatch class. + */ + public StaticRouteRoutePolicyPatch() { + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicyPatch exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the StaticRouteRoutePolicyPatch object itself. + */ + public StaticRouteRoutePolicyPatch withExportRoutePolicy(L3ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRouteRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRouteRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRouteRoutePolicyPatch. + */ + public static StaticRouteRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRouteRoutePolicyPatch deserializedStaticRouteRoutePolicyPatch = new StaticRouteRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedStaticRouteRoutePolicyPatch.exportRoutePolicy + = L3ExportRoutePolicyPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRouteRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java new file mode 100644 index 000000000000..9d144f4d07e1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Station Configuration State. + */ +public final class StationConfigurationState extends ExpandableStringEnum { + /** + * StationConfigurationState Enabled. + */ + public static final StationConfigurationState ENABLED = fromString("Enabled"); + + /** + * StationConfigurationState Disabled. + */ + public static final StationConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StationConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StationConfigurationState() { + } + + /** + * Creates or finds a StationConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding StationConfigurationState. + */ + public static StationConfigurationState fromString(String name) { + return fromString(name, StationConfigurationState.class); + } + + /** + * Gets known StationConfigurationState values. + * + * @return known StationConfigurationState values. + */ + public static Collection values() { + return values(StationConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java new file mode 100644 index 000000000000..8309b1d8e65f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Station Connection Mode. + */ +public final class StationConnectionMode extends ExpandableStringEnum { + /** + * StationConnectionMode Active. + */ + public static final StationConnectionMode ACTIVE = fromString("Active"); + + /** + * StationConnectionMode Passive. + */ + public static final StationConnectionMode PASSIVE = fromString("Passive"); + + /** + * Creates a new instance of StationConnectionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StationConnectionMode() { + } + + /** + * Creates or finds a StationConnectionMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding StationConnectionMode. + */ + public static StationConnectionMode fromString(String name) { + return fromString(name, StationConnectionMode.class); + } + + /** + * Gets known StationConnectionMode values. + * + * @return known StationConnectionMode values. + */ + public static Collection values() { + return values(StationConnectionMode.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java new file mode 100644 index 000000000000..268293d5b708 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Station Connection PATCH Properties. + */ +@Fluent +public final class StationConnectionPatchProperties implements JsonSerializable { + /* + * Connection keepalive idle time in seconds + */ + private Integer keepaliveIdleTime; + + /* + * Probe interval in seconds, default value is 60 + */ + private Integer probeInterval; + + /* + * Probe count, default value is 10 + */ + private Integer probeCount; + + /** + * Creates an instance of StationConnectionPatchProperties class. + */ + public StationConnectionPatchProperties() { + } + + /** + * Get the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @return the keepaliveIdleTime value. + */ + public Integer keepaliveIdleTime() { + return this.keepaliveIdleTime; + } + + /** + * Set the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @param keepaliveIdleTime the keepaliveIdleTime value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withKeepaliveIdleTime(Integer keepaliveIdleTime) { + this.keepaliveIdleTime = keepaliveIdleTime; + return this; + } + + /** + * Get the probeInterval property: Probe interval in seconds, default value is 60. + * + * @return the probeInterval value. + */ + public Integer probeInterval() { + return this.probeInterval; + } + + /** + * Set the probeInterval property: Probe interval in seconds, default value is 60. + * + * @param probeInterval the probeInterval value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withProbeInterval(Integer probeInterval) { + this.probeInterval = probeInterval; + return this; + } + + /** + * Get the probeCount property: Probe count, default value is 10. + * + * @return the probeCount value. + */ + public Integer probeCount() { + return this.probeCount; + } + + /** + * Set the probeCount property: Probe count, default value is 10. + * + * @param probeCount the probeCount value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withProbeCount(Integer probeCount) { + this.probeCount = probeCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("keepaliveIdleTime", this.keepaliveIdleTime); + jsonWriter.writeNumberField("probeInterval", this.probeInterval); + jsonWriter.writeNumberField("probeCount", this.probeCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StationConnectionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StationConnectionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StationConnectionPatchProperties. + */ + public static StationConnectionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StationConnectionPatchProperties deserializedStationConnectionPatchProperties + = new StationConnectionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keepaliveIdleTime".equals(fieldName)) { + deserializedStationConnectionPatchProperties.keepaliveIdleTime + = reader.getNullable(JsonReader::getInt); + } else if ("probeInterval".equals(fieldName)) { + deserializedStationConnectionPatchProperties.probeInterval = reader.getNullable(JsonReader::getInt); + } else if ("probeCount".equals(fieldName)) { + deserializedStationConnectionPatchProperties.probeCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedStationConnectionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java new file mode 100644 index 000000000000..29310a751918 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Station Connection Properties. + */ +@Fluent +public final class StationConnectionProperties implements JsonSerializable { + /* + * Connection keepalive idle time in seconds + */ + private Integer keepaliveIdleTime; + + /* + * Probe interval in seconds, default value is 60 + */ + private Integer probeInterval; + + /* + * Probe count, default value is 10 + */ + private Integer probeCount; + + /** + * Creates an instance of StationConnectionProperties class. + */ + public StationConnectionProperties() { + } + + /** + * Get the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @return the keepaliveIdleTime value. + */ + public Integer keepaliveIdleTime() { + return this.keepaliveIdleTime; + } + + /** + * Set the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @param keepaliveIdleTime the keepaliveIdleTime value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withKeepaliveIdleTime(Integer keepaliveIdleTime) { + this.keepaliveIdleTime = keepaliveIdleTime; + return this; + } + + /** + * Get the probeInterval property: Probe interval in seconds, default value is 60. + * + * @return the probeInterval value. + */ + public Integer probeInterval() { + return this.probeInterval; + } + + /** + * Set the probeInterval property: Probe interval in seconds, default value is 60. + * + * @param probeInterval the probeInterval value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withProbeInterval(Integer probeInterval) { + this.probeInterval = probeInterval; + return this; + } + + /** + * Get the probeCount property: Probe count, default value is 10. + * + * @return the probeCount value. + */ + public Integer probeCount() { + return this.probeCount; + } + + /** + * Set the probeCount property: Probe count, default value is 10. + * + * @param probeCount the probeCount value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withProbeCount(Integer probeCount) { + this.probeCount = probeCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("keepaliveIdleTime", this.keepaliveIdleTime); + jsonWriter.writeNumberField("probeInterval", this.probeInterval); + jsonWriter.writeNumberField("probeCount", this.probeCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StationConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StationConnectionProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StationConnectionProperties. + */ + public static StationConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StationConnectionProperties deserializedStationConnectionProperties = new StationConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keepaliveIdleTime".equals(fieldName)) { + deserializedStationConnectionProperties.keepaliveIdleTime = reader.getNullable(JsonReader::getInt); + } else if ("probeInterval".equals(fieldName)) { + deserializedStationConnectionProperties.probeInterval = reader.getNullable(JsonReader::getInt); + } else if ("probeCount".equals(fieldName)) { + deserializedStationConnectionProperties.probeCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedStationConnectionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java new file mode 100644 index 000000000000..da8a2300b5ba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Storage account configuration. + */ +@Fluent +public final class StorageAccountConfiguration implements JsonSerializable { + /* + * Network Fabric storage account resource identifier. + */ + private String storageAccountId; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelector storageAccountIdentity; + + /** + * Creates an instance of StorageAccountConfiguration class. + */ + public StorageAccountConfiguration() { + } + + /** + * Get the storageAccountId property: Network Fabric storage account resource identifier. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: Network Fabric storage account resource identifier. + * + * @param storageAccountId the storageAccountId value to set. + * @return the StorageAccountConfiguration object itself. + */ + public StorageAccountConfiguration withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @return the storageAccountIdentity value. + */ + public IdentitySelector storageAccountIdentity() { + return this.storageAccountIdentity; + } + + /** + * Set the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @param storageAccountIdentity the storageAccountIdentity value to set. + * @return the StorageAccountConfiguration object itself. + */ + public StorageAccountConfiguration withStorageAccountIdentity(IdentitySelector storageAccountIdentity) { + this.storageAccountIdentity = storageAccountIdentity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountId", this.storageAccountId); + jsonWriter.writeJsonField("storageAccountIdentity", this.storageAccountIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageAccountConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageAccountConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageAccountConfiguration. + */ + public static StorageAccountConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageAccountConfiguration deserializedStorageAccountConfiguration = new StorageAccountConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountId".equals(fieldName)) { + deserializedStorageAccountConfiguration.storageAccountId = reader.getString(); + } else if ("storageAccountIdentity".equals(fieldName)) { + deserializedStorageAccountConfiguration.storageAccountIdentity = IdentitySelector.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageAccountConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java new file mode 100644 index 000000000000..29a8d34a8f9c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Storage account configuration. + */ +@Fluent +public final class StorageAccountPatchConfiguration implements JsonSerializable { + /* + * Network Fabric storage account resource identifier. + */ + private String storageAccountId; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelectorPatch storageAccountIdentity; + + /** + * Creates an instance of StorageAccountPatchConfiguration class. + */ + public StorageAccountPatchConfiguration() { + } + + /** + * Get the storageAccountId property: Network Fabric storage account resource identifier. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: Network Fabric storage account resource identifier. + * + * @param storageAccountId the storageAccountId value to set. + * @return the StorageAccountPatchConfiguration object itself. + */ + public StorageAccountPatchConfiguration withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @return the storageAccountIdentity value. + */ + public IdentitySelectorPatch storageAccountIdentity() { + return this.storageAccountIdentity; + } + + /** + * Set the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @param storageAccountIdentity the storageAccountIdentity value to set. + * @return the StorageAccountPatchConfiguration object itself. + */ + public StorageAccountPatchConfiguration withStorageAccountIdentity(IdentitySelectorPatch storageAccountIdentity) { + this.storageAccountIdentity = storageAccountIdentity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountId", this.storageAccountId); + jsonWriter.writeJsonField("storageAccountIdentity", this.storageAccountIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageAccountPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageAccountPatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageAccountPatchConfiguration. + */ + public static StorageAccountPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageAccountPatchConfiguration deserializedStorageAccountPatchConfiguration + = new StorageAccountPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountId".equals(fieldName)) { + deserializedStorageAccountPatchConfiguration.storageAccountId = reader.getString(); + } else if ("storageAccountIdentity".equals(fieldName)) { + deserializedStorageAccountPatchConfiguration.storageAccountIdentity + = IdentitySelectorPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageAccountPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java index fa99be93440e..2ef88f06e769 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Supported connector properties. */ -@Fluent +@Immutable public final class SupportedConnectorProperties implements JsonSerializable { /* * Type of connector used. Example: Optical. @@ -29,7 +29,7 @@ public final class SupportedConnectorProperties implements JsonSerializable { /* * Operating system and firmware combined versions. @@ -40,7 +40,7 @@ public final class SupportedVersionProperties implements JsonSerializable { + /** + * The device has been configured with the latest version of the secret. + */ + public static final SynchronizationStatus IN_SYNC = fromString("InSync"); + + /** + * The device is being reconfigured with the latest version of the secret. + * + * While in this state, the secret archive reference may not match the secret configured on the device. + */ + public static final SynchronizationStatus SYNCHRONIZING = fromString("Synchronizing"); + + /** + * The device has not been configured with the latest version of the secret. + */ + public static final SynchronizationStatus OUT_OF_SYNC = fromString("OutOfSync"); + + /** + * Creates a new instance of SynchronizationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SynchronizationStatus() { + } + + /** + * Creates or finds a SynchronizationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SynchronizationStatus. + */ + public static SynchronizationStatus fromString(String name) { + return fromString(name, SynchronizationStatus.class); + } + + /** + * Gets known SynchronizationStatus values. + * + * @return known SynchronizationStatus values. + */ + public static Collection values() { + return values(SynchronizationStatus.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java index 1da9ff2bed9c..eb806999dd68 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -18,7 +18,7 @@ @Fluent public class TagsUpdate implements JsonSerializable { /* - * Resource tags + * Resource tags. */ private Map tags; @@ -48,14 +48,6 @@ public TagsUpdate withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java index 7f570bc25ea0..cd9fff4e70ea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,37 +12,37 @@ */ public final class TapRuleActionType extends ExpandableStringEnum { /** - * Static value Drop for TapRuleActionType. + * TapRuleActionType-Drop. */ public static final TapRuleActionType DROP = fromString("Drop"); /** - * Static value Count for TapRuleActionType. + * TapRuleActionType-Count. */ public static final TapRuleActionType COUNT = fromString("Count"); /** - * Static value Log for TapRuleActionType. + * TapRuleActionType-Log. */ public static final TapRuleActionType LOG = fromString("Log"); /** - * Static value Replicate for TapRuleActionType. + * TapRuleActionType-Replicate. */ public static final TapRuleActionType REPLICATE = fromString("Replicate"); /** - * Static value Goto for TapRuleActionType. + * TapRuleActionType-Goto. */ public static final TapRuleActionType GOTO = fromString("Goto"); /** - * Static value Redirect for TapRuleActionType. + * TapRuleActionType-Redirect. */ public static final TapRuleActionType REDIRECT = fromString("Redirect"); /** - * Static value Mirror for TapRuleActionType. + * TapRuleActionType-Mirror. */ public static final TapRuleActionType MIRROR = fromString("Mirror"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java index dc0c9f8a50d9..0232e42a6d66 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java @@ -1,24 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Network and credentials configuration currently applied to terminal server. */ @Fluent -public final class TerminalServerConfiguration extends TerminalServerPatchableProperties { +public final class TerminalServerConfiguration implements JsonSerializable { /* - * ARM Resource ID used for the NetworkDevice. + * Username for the terminal server connection. */ - private String networkDeviceId; + private String username; + + /* + * Password for the terminal server connection. + */ + private String password; + + /* + * Serial Number of Terminal server. + */ + private String serialNumber; /* * IPv4 Address Prefix. @@ -40,6 +52,16 @@ public final class TerminalServerConfiguration extends TerminalServerPatchablePr */ private String secondaryIpv6Prefix; + /* + * ARM Resource ID used for the NetworkDevice. + */ + private String networkDeviceId; + + /* + * Secret rotation status for the terminal server's secrets. + */ + private List secretRotationStatus; + /** * Creates an instance of TerminalServerConfiguration class. */ @@ -47,12 +69,63 @@ public TerminalServerConfiguration() { } /** - * Get the networkDeviceId property: ARM Resource ID used for the NetworkDevice. + * Get the username property: Username for the terminal server connection. * - * @return the networkDeviceId value. + * @return the username value. */ - public String networkDeviceId() { - return this.networkDeviceId; + public String username() { + return this.username; + } + + /** + * Set the username property: Username for the terminal server connection. + * + * @param username the username value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Password for the terminal server connection. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password for the terminal server connection. + * + * @param password the password value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the serialNumber property: Serial Number of Terminal server. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial Number of Terminal server. + * + * @param serialNumber the serialNumber value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; } /** @@ -136,39 +209,21 @@ public TerminalServerConfiguration withSecondaryIpv6Prefix(String secondaryIpv6P } /** - * {@inheritDoc} - */ - @Override - public TerminalServerConfiguration withUsername(String username) { - super.withUsername(username); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TerminalServerConfiguration withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * {@inheritDoc} + * Get the networkDeviceId property: ARM Resource ID used for the NetworkDevice. + * + * @return the networkDeviceId value. */ - @Override - public TerminalServerConfiguration withSerialNumber(String serialNumber) { - super.withSerialNumber(serialNumber); - return this; + public String networkDeviceId() { + return this.networkDeviceId; } /** - * Validates the instance. + * Get the secretRotationStatus property: Secret rotation status for the terminal server's secrets. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the secretRotationStatus value. */ - @Override - public void validate() { + public List secretRotationStatus() { + return this.secretRotationStatus; } /** @@ -177,12 +232,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", username()); - jsonWriter.writeStringField("password", password()); - jsonWriter.writeStringField("serialNumber", serialNumber()); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); return jsonWriter.writeEndObject(); } @@ -193,6 +248,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TerminalServerConfiguration if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TerminalServerConfiguration. */ public static TerminalServerConfiguration fromJson(JsonReader jsonReader) throws IOException { @@ -203,21 +259,25 @@ public static TerminalServerConfiguration fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("username".equals(fieldName)) { - deserializedTerminalServerConfiguration.withUsername(reader.getString()); + deserializedTerminalServerConfiguration.username = reader.getString(); } else if ("password".equals(fieldName)) { - deserializedTerminalServerConfiguration.withPassword(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedTerminalServerConfiguration.withSerialNumber(reader.getString()); - } else if ("networkDeviceId".equals(fieldName)) { - deserializedTerminalServerConfiguration.networkDeviceId = reader.getString(); + deserializedTerminalServerConfiguration.password = reader.getString(); } else if ("primaryIpv4Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.primaryIpv4Prefix = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedTerminalServerConfiguration.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.secondaryIpv4Prefix = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedTerminalServerConfiguration.serialNumber = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerConfiguration.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.secondaryIpv6Prefix = reader.getString(); + } else if ("networkDeviceId".equals(fieldName)) { + deserializedTerminalServerConfiguration.networkDeviceId = reader.getString(); + } else if ("secretRotationStatus".equals(fieldName)) { + List secretRotationStatus + = reader.readArray(reader1 -> SecretRotationStatus.fromJson(reader1)); + deserializedTerminalServerConfiguration.secretRotationStatus = secretRotationStatus; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java new file mode 100644 index 000000000000..3fddf6b65a67 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network and credentials configuration already applied to terminal server. + */ +@Fluent +public final class TerminalServerPatchConfiguration implements JsonSerializable { + /* + * Username for the terminal server connection. + */ + private String username; + + /* + * Password for the terminal server connection. + */ + private String password; + + /* + * Serial Number of Terminal server. + */ + private String serialNumber; + + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /** + * Creates an instance of TerminalServerPatchConfiguration class. + */ + public TerminalServerPatchConfiguration() { + } + + /** + * Get the username property: Username for the terminal server connection. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username for the terminal server connection. + * + * @param username the username value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Password for the terminal server connection. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password for the terminal server connection. + * + * @param password the password value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the serialNumber property: Serial Number of Terminal server. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial Number of Terminal server. + * + * @param serialNumber the serialNumber value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TerminalServerPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TerminalServerPatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TerminalServerPatchConfiguration. + */ + public static TerminalServerPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TerminalServerPatchConfiguration deserializedTerminalServerPatchConfiguration + = new TerminalServerPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.password = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.serialNumber = reader.getString(); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.secondaryIpv6Prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTerminalServerPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java deleted file mode 100644 index dd38ad6651d8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network and credential configuration currently applied on terminal server. - */ -@Fluent -public class TerminalServerPatchableProperties implements JsonSerializable { - /* - * Username for the terminal server connection. - */ - private String username; - - /* - * Password for the terminal server connection. - */ - private String password; - - /* - * Serial Number of Terminal server. - */ - private String serialNumber; - - /** - * Creates an instance of TerminalServerPatchableProperties class. - */ - public TerminalServerPatchableProperties() { - } - - /** - * Get the username property: Username for the terminal server connection. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username for the terminal server connection. - * - * @param username the username value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password for the terminal server connection. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password for the terminal server connection. - * - * @param password the password value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the serialNumber property: Serial Number of Terminal server. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: Serial Number of Terminal server. - * - * @param serialNumber the serialNumber value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("serialNumber", this.serialNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TerminalServerPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TerminalServerPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TerminalServerPatchableProperties. - */ - public static TerminalServerPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TerminalServerPatchableProperties deserializedTerminalServerPatchableProperties - = new TerminalServerPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.password = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.serialNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTerminalServerPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java new file mode 100644 index 000000000000..027b8479ab48 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unique Route Distinguisher Configuration State. + */ +public final class UniqueRouteDistinguisherConfigurationState + extends ExpandableStringEnum { + /** + * UniqueRouteDistinguisherConfigurationState Enabled. + */ + public static final UniqueRouteDistinguisherConfigurationState ENABLED = fromString("Enabled"); + + /** + * UniqueRouteDistinguisherConfigurationState Disabled. + */ + public static final UniqueRouteDistinguisherConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of UniqueRouteDistinguisherConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UniqueRouteDistinguisherConfigurationState() { + } + + /** + * Creates or finds a UniqueRouteDistinguisherConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding UniqueRouteDistinguisherConfigurationState. + */ + public static UniqueRouteDistinguisherConfigurationState fromString(String name) { + return fromString(name, UniqueRouteDistinguisherConfigurationState.class); + } + + /** + * Gets known UniqueRouteDistinguisherConfigurationState values. + * + * @return known UniqueRouteDistinguisherConfigurationState values. + */ + public static Collection values() { + return values(UniqueRouteDistinguisherConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java new file mode 100644 index 000000000000..70dfdaeaa290 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Unique Route Distinguisher configuration properties. + */ +@Fluent +public final class UniqueRouteDistinguisherPatchProperties + implements JsonSerializable { + /* + * Unique Route Distinguisher configuration state. Default is Enabled. + */ + private UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState; + + /* + * NNI derived unique Route Distinguisher state. Default is Disabled. + */ + private NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState; + + /** + * Creates an instance of UniqueRouteDistinguisherPatchProperties class. + */ + public UniqueRouteDistinguisherPatchProperties() { + } + + /** + * Get the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @return the uniqueRdConfigurationState value. + */ + public UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState() { + return this.uniqueRdConfigurationState; + } + + /** + * Set the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @param uniqueRdConfigurationState the uniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherPatchProperties object itself. + */ + public UniqueRouteDistinguisherPatchProperties + withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState) { + this.uniqueRdConfigurationState = uniqueRdConfigurationState; + return this; + } + + /** + * Get the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @return the nniDerivedUniqueRdConfigurationState value. + */ + public NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState() { + return this.nniDerivedUniqueRdConfigurationState; + } + + /** + * Set the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @param nniDerivedUniqueRdConfigurationState the nniDerivedUniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherPatchProperties object itself. + */ + public UniqueRouteDistinguisherPatchProperties withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState) { + this.nniDerivedUniqueRdConfigurationState = nniDerivedUniqueRdConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uniqueRdConfigurationState", + this.uniqueRdConfigurationState == null ? null : this.uniqueRdConfigurationState.toString()); + jsonWriter.writeStringField("nniDerivedUniqueRdConfigurationState", + this.nniDerivedUniqueRdConfigurationState == null + ? null + : this.nniDerivedUniqueRdConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UniqueRouteDistinguisherPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UniqueRouteDistinguisherPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UniqueRouteDistinguisherPatchProperties. + */ + public static UniqueRouteDistinguisherPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UniqueRouteDistinguisherPatchProperties deserializedUniqueRouteDistinguisherPatchProperties + = new UniqueRouteDistinguisherPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherPatchProperties.uniqueRdConfigurationState + = UniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else if ("nniDerivedUniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherPatchProperties.nniDerivedUniqueRdConfigurationState + = NNIDerivedUniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUniqueRouteDistinguisherPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java new file mode 100644 index 000000000000..253e164ec457 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Unique Route Distinguisher properties. + */ +@Fluent +public final class UniqueRouteDistinguisherProperties implements JsonSerializable { + /* + * Unique Route Distinguisher configuration state. Default is Enabled. + */ + private UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState; + + /* + * List of Unique Route Distinguisher addresses. + */ + private List uniqueRds; + + /* + * NNI derived unique Route Distinguisher state. Default is Disabled. + */ + private NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState; + + /** + * Creates an instance of UniqueRouteDistinguisherProperties class. + */ + public UniqueRouteDistinguisherProperties() { + } + + /** + * Get the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @return the uniqueRdConfigurationState value. + */ + public UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState() { + return this.uniqueRdConfigurationState; + } + + /** + * Set the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @param uniqueRdConfigurationState the uniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherProperties object itself. + */ + public UniqueRouteDistinguisherProperties + withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState) { + this.uniqueRdConfigurationState = uniqueRdConfigurationState; + return this; + } + + /** + * Get the uniqueRds property: List of Unique Route Distinguisher addresses. + * + * @return the uniqueRds value. + */ + public List uniqueRds() { + return this.uniqueRds; + } + + /** + * Get the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @return the nniDerivedUniqueRdConfigurationState value. + */ + public NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState() { + return this.nniDerivedUniqueRdConfigurationState; + } + + /** + * Set the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @param nniDerivedUniqueRdConfigurationState the nniDerivedUniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherProperties object itself. + */ + public UniqueRouteDistinguisherProperties withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState) { + this.nniDerivedUniqueRdConfigurationState = nniDerivedUniqueRdConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uniqueRdConfigurationState", + this.uniqueRdConfigurationState == null ? null : this.uniqueRdConfigurationState.toString()); + jsonWriter.writeStringField("nniDerivedUniqueRdConfigurationState", + this.nniDerivedUniqueRdConfigurationState == null + ? null + : this.nniDerivedUniqueRdConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UniqueRouteDistinguisherProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UniqueRouteDistinguisherProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UniqueRouteDistinguisherProperties. + */ + public static UniqueRouteDistinguisherProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UniqueRouteDistinguisherProperties deserializedUniqueRouteDistinguisherProperties + = new UniqueRouteDistinguisherProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherProperties.uniqueRdConfigurationState + = UniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else if ("uniqueRds".equals(fieldName)) { + List uniqueRds = reader.readArray(reader1 -> reader1.getString()); + deserializedUniqueRouteDistinguisherProperties.uniqueRds = uniqueRds; + } else if ("nniDerivedUniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherProperties.nniDerivedUniqueRdConfigurationState + = NNIDerivedUniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUniqueRouteDistinguisherProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java index 18a68849f193..1a4b9526b59f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -56,15 +56,6 @@ public UpdateAdministrativeState withResourceIds(List resourceIds) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponse.java new file mode 100644 index 000000000000..98ae7183b552 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponse.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of UpdateAdministrativeStateResponse. + */ +public interface UpdateAdministrativeStateResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: Response properties in case of successful administrative state update. + * + * @return the properties value. + */ + UpdateAdministrativeStateResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner object. + * + * @return the inner object. + */ + UpdateAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponseProperties.java new file mode 100644 index 000000000000..49e3ff75d94e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponseProperties.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Update Administrative State Response Properties. + */ +@Immutable +public final class UpdateAdministrativeStateResponseProperties + implements JsonSerializable { + /* + * List of ARM Resource IDs for which the given action applied successfully. + */ + private List successfulResources; + + /* + * List of ARM Resource IDs for which the given action failed to apply. + */ + private List failedResources; + + /** + * Creates an instance of UpdateAdministrativeStateResponseProperties class. + */ + private UpdateAdministrativeStateResponseProperties() { + } + + /** + * Get the successfulResources property: List of ARM Resource IDs for which the given action applied successfully. + * + * @return the successfulResources value. + */ + public List successfulResources() { + return this.successfulResources; + } + + /** + * Get the failedResources property: List of ARM Resource IDs for which the given action failed to apply. + * + * @return the failedResources value. + */ + public List failedResources() { + return this.failedResources; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("successfulResources", this.successfulResources, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("failedResources", this.failedResources, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateAdministrativeStateResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateAdministrativeStateResponseProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UpdateAdministrativeStateResponseProperties. + */ + public static UpdateAdministrativeStateResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateAdministrativeStateResponseProperties deserializedUpdateAdministrativeStateResponseProperties + = new UpdateAdministrativeStateResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("successfulResources".equals(fieldName)) { + List successfulResources = reader.readArray(reader1 -> reader1.getString()); + deserializedUpdateAdministrativeStateResponseProperties.successfulResources = successfulResources; + } else if ("failedResources".equals(fieldName)) { + List failedResources = reader.readArray(reader1 -> reader1.getString()); + deserializedUpdateAdministrativeStateResponseProperties.failedResources = failedResources; + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateAdministrativeStateResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java index bc626724e047..001962ce0554 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -56,15 +56,6 @@ public UpdateDeviceAdministrativeState withResourceIds(List resourceIds) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java index fd7c1d6b226e..05a4d4da2424 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,14 +47,6 @@ public UpdateVersion withVersion(String version) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java index 81d6e40dc7f0..6cdc7edd05be 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The UpgradeNetworkFabricProperties model. + * Model used for Upgrade Network Fabric Properties. */ @Fluent public final class UpgradeNetworkFabricProperties extends UpdateVersion { @@ -55,15 +55,6 @@ public UpgradeNetworkFabricProperties withVersion(String version) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java new file mode 100644 index 000000000000..600c07c40d56 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * User assigned identity properties. + */ +@Immutable +public final class UserAssignedIdentity implements JsonSerializable { + /* + * The principal ID of the assigned identity. + */ + private String principalId; + + /* + * The client ID of the assigned identity. + */ + private String clientId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the principalId property: The principal ID of the assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java new file mode 100644 index 000000000000..e7ac5b28023a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * V4 over V6 BGP session state. + */ +public final class V4OverV6BgpSessionState extends ExpandableStringEnum { + /** + * V4OverV6BgpSessionState-Enabled. + */ + public static final V4OverV6BgpSessionState ENABLED = fromString("Enabled"); + + /** + * V4OverV6BgpSessionState-Disabled. + */ + public static final V4OverV6BgpSessionState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of V4OverV6BgpSessionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public V4OverV6BgpSessionState() { + } + + /** + * Creates or finds a V4OverV6BgpSessionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding V4OverV6BgpSessionState. + */ + public static V4OverV6BgpSessionState fromString(String name) { + return fromString(name, V4OverV6BgpSessionState.class); + } + + /** + * Gets known V4OverV6BgpSessionState values. + * + * @return known V4OverV6BgpSessionState values. + */ + public static Collection values() { + return values(V4OverV6BgpSessionState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java new file mode 100644 index 000000000000..a57c75dbfd0c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * V6 over V4 BGP session state. + */ +public final class V6OverV4BgpSessionState extends ExpandableStringEnum { + /** + * V6OverV4BgpSessionState-Enabled. + */ + public static final V6OverV4BgpSessionState ENABLED = fromString("Enabled"); + + /** + * V6OverV4BgpSessionState-Disabled. + */ + public static final V6OverV4BgpSessionState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of V6OverV4BgpSessionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public V6OverV4BgpSessionState() { + } + + /** + * Creates or finds a V6OverV4BgpSessionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding V6OverV4BgpSessionState. + */ + public static V6OverV4BgpSessionState fromString(String name) { + return fromString(name, V6OverV4BgpSessionState.class); + } + + /** + * Gets known V6OverV4BgpSessionState values. + * + * @return known V6OverV4BgpSessionState values. + */ + public static Collection values() { + return values(V6OverV4BgpSessionState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java index abd16fb60d40..2a0e4a2547bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class ValidateAction extends ExpandableStringEnum { /** - * Static value Cabling for ValidateAction. + * ValidateAction-Cabling. */ public static final ValidateAction CABLING = fromString("Cabling"); /** - * Static value Configuration for ValidateAction. + * ValidateAction-Configuration. */ public static final ValidateAction CONFIGURATION = fromString("Configuration"); /** - * Static value Connectivity for ValidateAction. + * ValidateAction-Connectivity. */ public static final ValidateAction CONNECTIVITY = fromString("Connectivity"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java index cefa8f24ac00..a90fbe4e52cb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,14 +47,6 @@ public ValidateConfigurationProperties withValidateAction(ValidateAction validat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java index 11ce5afedcbf..fadc479db10a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -11,6 +11,13 @@ * An immutable client-side representation of ValidateConfigurationResponse. */ public interface ValidateConfigurationResponse { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + /** * Gets the configurationState property: Gets the configuration state. * @@ -25,13 +32,6 @@ public interface ValidateConfigurationResponse { */ String url(); - /** - * Gets the error property: The error object. - * - * @return the error value. - */ - ManagementError error(); - /** * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner * object. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationOperationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationOperationResponse.java new file mode 100644 index 000000000000..a5ea4dd970f2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationOperationResponse.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of ViewDeviceConfigurationOperationResponse. + */ +public interface ViewDeviceConfigurationOperationResponse { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the properties property: View Device Configuration Response Properties. + * + * @return the properties value. + */ + ViewDeviceConfigurationResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner + * object. + * + * @return the inner object. + */ + ViewDeviceConfigurationOperationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponseProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponseProperties.java new file mode 100644 index 000000000000..11a6578361d2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponseProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * View Device Configuration Response Properties. + */ +@Immutable +public final class ViewDeviceConfigurationResponseProperties + implements JsonSerializable { + /* + * Storage URL to the device configuration file. + */ + private String deviceConfigurationUrl; + + /** + * Creates an instance of ViewDeviceConfigurationResponseProperties class. + */ + private ViewDeviceConfigurationResponseProperties() { + } + + /** + * Get the deviceConfigurationUrl property: Storage URL to the device configuration file. + * + * @return the deviceConfigurationUrl value. + */ + public String deviceConfigurationUrl() { + return this.deviceConfigurationUrl; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("deviceConfigurationUrl", this.deviceConfigurationUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ViewDeviceConfigurationResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ViewDeviceConfigurationResponseProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ViewDeviceConfigurationResponseProperties. + */ + public static ViewDeviceConfigurationResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ViewDeviceConfigurationResponseProperties deserializedViewDeviceConfigurationResponseProperties + = new ViewDeviceConfigurationResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deviceConfigurationUrl".equals(fieldName)) { + deserializedViewDeviceConfigurationResponseProperties.deviceConfigurationUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedViewDeviceConfigurationResponseProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java new file mode 100644 index 000000000000..f2efaf21acdc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Vlan group properties. + */ +@Fluent +public final class VlanGroupPatchProperties implements JsonSerializable { + /* + * Vlan group name. + */ + private String name; + + /* + * List of vlans. + */ + private List vlans; + + /** + * Creates an instance of VlanGroupPatchProperties class. + */ + public VlanGroupPatchProperties() { + } + + /** + * Get the name property: Vlan group name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Vlan group name. + * + * @param name the name value to set. + * @return the VlanGroupPatchProperties object itself. + */ + public VlanGroupPatchProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the vlans property: List of vlans. + * + * @return the vlans value. + */ + public List vlans() { + return this.vlans; + } + + /** + * Set the vlans property: List of vlans. + * + * @param vlans the vlans value to set. + * @return the VlanGroupPatchProperties object itself. + */ + public VlanGroupPatchProperties withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("vlans", this.vlans, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VlanGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VlanGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VlanGroupPatchProperties. + */ + public static VlanGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VlanGroupPatchProperties deserializedVlanGroupPatchProperties = new VlanGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVlanGroupPatchProperties.name = reader.getString(); + } else if ("vlans".equals(fieldName)) { + List vlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanGroupPatchProperties.vlans = vlans; + } else { + reader.skipChildren(); + } + } + + return deserializedVlanGroupPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java index fa65343f95de..5dcae72b3551 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public VlanGroupProperties withVlans(List vlans) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java index a4e54fd76fd3..d83e0d006a3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -18,12 +18,12 @@ @Fluent public final class VlanMatchCondition implements JsonSerializable { /* - * List of vlans that need to be matched. + * List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. */ private List vlans; /* - * List of inner vlans that need to be matched. + * List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans. */ private List innerVlans; @@ -39,7 +39,7 @@ public VlanMatchCondition() { } /** - * Get the vlans property: List of vlans that need to be matched. + * Get the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. * * @return the vlans value. */ @@ -48,7 +48,7 @@ public List vlans() { } /** - * Set the vlans property: List of vlans that need to be matched. + * Set the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. * * @param vlans the vlans value to set. * @return the VlanMatchCondition object itself. @@ -59,7 +59,8 @@ public VlanMatchCondition withVlans(List vlans) { } /** - * Get the innerVlans property: List of inner vlans that need to be matched. + * Get the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. * * @return the innerVlans value. */ @@ -68,7 +69,8 @@ public List innerVlans() { } /** - * Set the innerVlans property: List of inner vlans that need to be matched. + * Set the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. * * @param innerVlans the innerVlans value to set. * @return the VlanMatchCondition object itself. @@ -98,14 +100,6 @@ public VlanMatchCondition withVlanGroupNames(List vlanGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java new file mode 100644 index 000000000000..0fcd8caddc5a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The vlan match conditions that need to be matched. + */ +@Fluent +public final class VlanMatchConditionPatch implements JsonSerializable { + /* + * List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + */ + private List vlans; + + /* + * List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans. + */ + private List innerVlans; + + /* + * List of vlan group names that need to be matched. + */ + private List vlanGroupNames; + + /** + * Creates an instance of VlanMatchConditionPatch class. + */ + public VlanMatchConditionPatch() { + } + + /** + * Get the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + * + * @return the vlans value. + */ + public List vlans() { + return this.vlans; + } + + /** + * Set the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + * + * @param vlans the vlans value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * Get the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. + * + * @return the innerVlans value. + */ + public List innerVlans() { + return this.innerVlans; + } + + /** + * Set the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. + * + * @param innerVlans the innerVlans value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withInnerVlans(List innerVlans) { + this.innerVlans = innerVlans; + return this; + } + + /** + * Get the vlanGroupNames property: List of vlan group names that need to be matched. + * + * @return the vlanGroupNames value. + */ + public List vlanGroupNames() { + return this.vlanGroupNames; + } + + /** + * Set the vlanGroupNames property: List of vlan group names that need to be matched. + * + * @param vlanGroupNames the vlanGroupNames value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withVlanGroupNames(List vlanGroupNames) { + this.vlanGroupNames = vlanGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("vlans", this.vlans, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("innerVlans", this.innerVlans, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("vlanGroupNames", this.vlanGroupNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VlanMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VlanMatchConditionPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VlanMatchConditionPatch. + */ + public static VlanMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VlanMatchConditionPatch deserializedVlanMatchConditionPatch = new VlanMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vlans".equals(fieldName)) { + List vlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.vlans = vlans; + } else if ("innerVlans".equals(fieldName)) { + List innerVlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.innerVlans = innerVlans; + } else if ("vlanGroupNames".equals(fieldName)) { + List vlanGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.vlanGroupNames = vlanGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedVlanMatchConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java index bb1086a4b81c..e235cee31842 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -30,12 +30,12 @@ public final class VpnConfigurationPatchableProperties /* * option B properties */ - private OptionBProperties optionBProperties; + private VpnOptionBPatchProperties optionBProperties; /* * option A properties */ - private VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties; + private VpnOptionAPatchProperties optionAProperties; /** * Creates an instance of VpnConfigurationPatchableProperties class. @@ -89,7 +89,7 @@ public VpnConfigurationPatchableProperties withPeeringOption(PeeringOption peeri * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public VpnOptionBPatchProperties optionBProperties() { return this.optionBProperties; } @@ -99,7 +99,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the VpnConfigurationPatchableProperties object itself. */ - public VpnConfigurationPatchableProperties withOptionBProperties(OptionBProperties optionBProperties) { + public VpnConfigurationPatchableProperties withOptionBProperties(VpnOptionBPatchProperties optionBProperties) { this.optionBProperties = optionBProperties; return this; } @@ -109,7 +109,7 @@ public VpnConfigurationPatchableProperties withOptionBProperties(OptionBProperti * * @return the optionAProperties value. */ - public VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties() { + public VpnOptionAPatchProperties optionAProperties() { return this.optionAProperties; } @@ -119,26 +119,11 @@ public VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties() * @param optionAProperties the optionAProperties value to set. * @return the VpnConfigurationPatchableProperties object itself. */ - public VpnConfigurationPatchableProperties - withOptionAProperties(VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties) { + public VpnConfigurationPatchableProperties withOptionAProperties(VpnOptionAPatchProperties optionAProperties) { this.optionAProperties = optionAProperties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (optionBProperties() != null) { - optionBProperties().validate(); - } - if (optionAProperties() != null) { - optionAProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -175,10 +160,10 @@ public static VpnConfigurationPatchableProperties fromJson(JsonReader jsonReader = PeeringOption.fromString(reader.getString()); } else if ("optionBProperties".equals(fieldName)) { deserializedVpnConfigurationPatchableProperties.optionBProperties - = OptionBProperties.fromJson(reader); + = VpnOptionBPatchProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedVpnConfigurationPatchableProperties.optionAProperties - = VpnConfigurationPatchablePropertiesOptionAProperties.fromJson(reader); + = VpnOptionAPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java deleted file mode 100644 index c37967b6d8d6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * option A properties. - */ -@Fluent -public final class VpnConfigurationPatchablePropertiesOptionAProperties extends OptionAProperties { - /* - * IPv4 Address Prefix. - */ - private String primaryIpv4Prefix; - - /* - * IPv6 Address Prefix. - */ - private String primaryIpv6Prefix; - - /* - * Secondary IPv4 Address Prefix. - */ - private String secondaryIpv4Prefix; - - /* - * Secondary IPv6 Address Prefix. - */ - private String secondaryIpv6Prefix; - - /** - * Creates an instance of VpnConfigurationPatchablePropertiesOptionAProperties class. - */ - public VpnConfigurationPatchablePropertiesOptionAProperties() { - } - - /** - * Get the primaryIpv4Prefix property: IPv4 Address Prefix. - * - * @return the primaryIpv4Prefix value. - */ - public String primaryIpv4Prefix() { - return this.primaryIpv4Prefix; - } - - /** - * Set the primaryIpv4Prefix property: IPv4 Address Prefix. - * - * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. - * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. - */ - public VpnConfigurationPatchablePropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - this.primaryIpv4Prefix = primaryIpv4Prefix; - return this; - } - - /** - * Get the primaryIpv6Prefix property: IPv6 Address Prefix. - * - * @return the primaryIpv6Prefix value. - */ - public String primaryIpv6Prefix() { - return this.primaryIpv6Prefix; - } - - /** - * Set the primaryIpv6Prefix property: IPv6 Address Prefix. - * - * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. - * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. - */ - public VpnConfigurationPatchablePropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - this.primaryIpv6Prefix = primaryIpv6Prefix; - return this; - } - - /** - * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. - * - * @return the secondaryIpv4Prefix value. - */ - public String secondaryIpv4Prefix() { - return this.secondaryIpv4Prefix; - } - - /** - * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. - * - * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. - * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. - */ - public VpnConfigurationPatchablePropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - this.secondaryIpv4Prefix = secondaryIpv4Prefix; - return this; - } - - /** - * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. - * - * @return the secondaryIpv6Prefix value. - */ - public String secondaryIpv6Prefix() { - return this.secondaryIpv6Prefix; - } - - /** - * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. - * - * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. - * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. - */ - public VpnConfigurationPatchablePropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - this.secondaryIpv6Prefix = secondaryIpv6Prefix; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VpnConfigurationPatchablePropertiesOptionAProperties withMtu(Integer mtu) { - super.withMtu(mtu); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VpnConfigurationPatchablePropertiesOptionAProperties withVlanId(Integer vlanId) { - super.withVlanId(vlanId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VpnConfigurationPatchablePropertiesOptionAProperties withPeerAsn(Long peerAsn) { - super.withPeerAsn(peerAsn); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VpnConfigurationPatchablePropertiesOptionAProperties - withBfdConfiguration(BfdConfiguration bfdConfiguration) { - super.withBfdConfiguration(bfdConfiguration); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", mtu()); - jsonWriter.writeNumberField("vlanId", vlanId()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); - jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); - jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VpnConfigurationPatchablePropertiesOptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VpnConfigurationPatchablePropertiesOptionAProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VpnConfigurationPatchablePropertiesOptionAProperties. - */ - public static VpnConfigurationPatchablePropertiesOptionAProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VpnConfigurationPatchablePropertiesOptionAProperties deserializedVpnConfigurationPatchablePropertiesOptionAProperties - = new VpnConfigurationPatchablePropertiesOptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withMtu(reader.getNullable(JsonReader::getInt)); - } else if ("vlanId".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("peerASN".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.primaryIpv4Prefix - = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.primaryIpv6Prefix - = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.secondaryIpv4Prefix - = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.secondaryIpv6Prefix - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVpnConfigurationPatchablePropertiesOptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java index aa65f9f2f325..eb535eaed057 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -35,12 +34,12 @@ public final class VpnConfigurationProperties implements JsonSerializable { - VpnConfigurationPropertiesOptionAProperties deserializedVpnConfigurationPropertiesOptionAProperties - = new VpnConfigurationPropertiesOptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withMtu(reader.getNullable(JsonReader::getInt)); - } else if ("vlanId".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("peerASN".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.secondaryIpv4Prefix = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.secondaryIpv6Prefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVpnConfigurationPropertiesOptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java new file mode 100644 index 000000000000..74560b54e063 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Peering optionA properties. + */ +@Fluent +public final class VpnOptionAPatchProperties extends Layer3IpPrefixPatchProperties { + /* + * MTU to use for option A peering. + */ + private Integer mtu; + + /* + * Vlan Id.Example : 501 + */ + private Integer vlanId; + + /* + * Peer ASN number.Example : 28 + */ + private Long peerASN; + + /* + * BFD Configuration properties. + */ + private BfdPatchConfiguration bfdConfiguration; + + /** + * Creates an instance of VpnOptionAPatchProperties class. + */ + public VpnOptionAPatchProperties() { + } + + /** + * Get the mtu property: MTU to use for option A peering. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU to use for option A peering. + * + * @param mtu the mtu value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the vlanId property: Vlan Id.Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan Id.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the peerASN property: Peer ASN number.Example : 28. + * + * @return the peerASN value. + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN property: Peer ASN number.Example : 28. + * + * @param peerASN the peerASN value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAPatchProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAPatchProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAPatchProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAPatchProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); + jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); + jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); + jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeNumberField("peerASN", this.peerASN); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionAPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionAPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionAPatchProperties. + */ + public static VpnOptionAPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionAPatchProperties deserializedVpnOptionAPatchProperties = new VpnOptionAPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.withPrimaryIpv4Prefix(reader.getString()); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.withPrimaryIpv6Prefix(reader.getString()); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.withSecondaryIpv4Prefix(reader.getString()); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.withSecondaryIpv6Prefix(reader.getString()); + } else if ("mtu".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("vlanId".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.vlanId = reader.getNullable(JsonReader::getInt); + } else if ("peerASN".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.peerASN = reader.getNullable(JsonReader::getLong); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionAPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java new file mode 100644 index 000000000000..543b6111ac97 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * option A properties. + */ +@Fluent +public final class VpnOptionAProperties extends Layer3IpPrefixProperties { + /* + * MTU to use for option A peering. + */ + private Integer mtu; + + /* + * Vlan Id.Example : 501 + */ + private int vlanId; + + /* + * Peer ASN number.Example : 28 + */ + private long peerASN; + + /* + * BFD Configuration properties. + */ + private BfdConfiguration bfdConfiguration; + + /** + * Creates an instance of VpnOptionAProperties class. + */ + public VpnOptionAProperties() { + } + + /** + * Get the mtu property: MTU to use for option A peering. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU to use for option A peering. + * + * @param mtu the mtu value to set. + * @return the VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the vlanId property: Vlan Id.Example : 501. + * + * @return the vlanId value. + */ + public int vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan Id.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withVlanId(int vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the peerASN property: Peer ASN number.Example : 28. + * + * @return the peerASN value. + */ + public long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN property: Peer ASN number.Example : 28. + * + * @param peerASN the peerASN value to set. + * @return the VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withPeerASN(long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VpnOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); + jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); + jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); + jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerASN); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionAProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionAProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VpnOptionAProperties. + */ + public static VpnOptionAProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionAProperties deserializedVpnOptionAProperties = new VpnOptionAProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.withPrimaryIpv4Prefix(reader.getString()); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.withPrimaryIpv6Prefix(reader.getString()); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.withSecondaryIpv4Prefix(reader.getString()); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.withSecondaryIpv6Prefix(reader.getString()); + } else if ("vlanId".equals(fieldName)) { + deserializedVpnOptionAProperties.vlanId = reader.getInt(); + } else if ("peerASN".equals(fieldName)) { + deserializedVpnOptionAProperties.peerASN = reader.getLong(); + } else if ("mtu".equals(fieldName)) { + deserializedVpnOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedVpnOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionAProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java new file mode 100644 index 000000000000..651f749fb4ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Option B configuration to be used for Management VPN. + */ +@Fluent +public final class VpnOptionBPatchProperties implements JsonSerializable { + /* + * Route Targets to be applied for incoming routes into CE. This is for backward compatibility. + */ + private List importRouteTargets; + + /* + * Route Targets to be applied for outgoing routes from CE. This is for backward compatibility. + */ + private List exportRouteTargets; + + /* + * Route Targets to be applied. + */ + private RouteTargetPatchInformation routeTargets; + + /** + * Creates an instance of VpnOptionBPatchProperties class. + */ + public VpnOptionBPatchProperties() { + } + + /** + * Get the importRouteTargets property: Route Targets to be applied for incoming routes into CE. This is for + * backward compatibility. + * + * @return the importRouteTargets value. + */ + public List importRouteTargets() { + return this.importRouteTargets; + } + + /** + * Set the importRouteTargets property: Route Targets to be applied for incoming routes into CE. This is for + * backward compatibility. + * + * @param importRouteTargets the importRouteTargets value to set. + * @return the VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withImportRouteTargets(List importRouteTargets) { + this.importRouteTargets = importRouteTargets; + return this; + } + + /** + * Get the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. This is for + * backward compatibility. + * + * @return the exportRouteTargets value. + */ + public List exportRouteTargets() { + return this.exportRouteTargets; + } + + /** + * Set the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. This is for + * backward compatibility. + * + * @param exportRouteTargets the exportRouteTargets value to set. + * @return the VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withExportRouteTargets(List exportRouteTargets) { + this.exportRouteTargets = exportRouteTargets; + return this; + } + + /** + * Get the routeTargets property: Route Targets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetPatchInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: Route Targets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withRouteTargets(RouteTargetPatchInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importRouteTargets", this.importRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportRouteTargets", this.exportRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("routeTargets", this.routeTargets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionBPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionBPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionBPatchProperties. + */ + public static VpnOptionBPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionBPatchProperties deserializedVpnOptionBPatchProperties = new VpnOptionBPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importRouteTargets".equals(fieldName)) { + List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedVpnOptionBPatchProperties.importRouteTargets = importRouteTargets; + } else if ("exportRouteTargets".equals(fieldName)) { + List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedVpnOptionBPatchProperties.exportRouteTargets = exportRouteTargets; + } else if ("routeTargets".equals(fieldName)) { + deserializedVpnOptionBPatchProperties.routeTargets = RouteTargetPatchInformation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionBPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java index 07a81c05b6fc..a860bb788289 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * Option B configuration to be used for Management VPN. */ @Fluent -public final class OptionBProperties implements JsonSerializable { +public final class VpnOptionBProperties implements JsonSerializable { /* * Route Targets to be applied for incoming routes into CE. This is for backward compatibility. */ @@ -33,9 +33,9 @@ public final class OptionBProperties implements JsonSerializable importRouteTargets() { * backward compatibility. * * @param importRouteTargets the importRouteTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withImportRouteTargets(List importRouteTargets) { + public VpnOptionBProperties withImportRouteTargets(List importRouteTargets) { this.importRouteTargets = importRouteTargets; return this; } @@ -75,9 +75,9 @@ public List exportRouteTargets() { * backward compatibility. * * @param exportRouteTargets the exportRouteTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withExportRouteTargets(List exportRouteTargets) { + public VpnOptionBProperties withExportRouteTargets(List exportRouteTargets) { this.exportRouteTargets = exportRouteTargets; return this; } @@ -95,24 +95,13 @@ public RouteTargetInformation routeTargets() { * Set the routeTargets property: Route Targets to be applied. * * @param routeTargets the routeTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) { + public VpnOptionBProperties withRouteTargets(RouteTargetInformation routeTargets) { this.routeTargets = routeTargets; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routeTargets() != null) { - routeTargets().validate(); - } - } - /** * {@inheritDoc} */ @@ -128,34 +117,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of OptionBProperties from the JsonReader. + * Reads an instance of VpnOptionBProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of OptionBProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OptionBProperties. + * @return An instance of VpnOptionBProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionBProperties. */ - public static OptionBProperties fromJson(JsonReader jsonReader) throws IOException { + public static VpnOptionBProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - OptionBProperties deserializedOptionBProperties = new OptionBProperties(); + VpnOptionBProperties deserializedVpnOptionBProperties = new VpnOptionBProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("importRouteTargets".equals(fieldName)) { List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); - deserializedOptionBProperties.importRouteTargets = importRouteTargets; + deserializedVpnOptionBProperties.importRouteTargets = importRouteTargets; } else if ("exportRouteTargets".equals(fieldName)) { List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); - deserializedOptionBProperties.exportRouteTargets = exportRouteTargets; + deserializedVpnOptionBProperties.exportRouteTargets = exportRouteTargets; } else if ("routeTargets".equals(fieldName)) { - deserializedOptionBProperties.routeTargets = RouteTargetInformation.fromJson(reader); + deserializedVpnOptionBProperties.routeTargets = RouteTargetInformation.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedOptionBProperties; + return deserializedVpnOptionBProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java index c1f2ed4c1551..8172400d3705 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,27 +16,27 @@ */ public final class WellKnownCommunities extends ExpandableStringEnum { /** - * Static value Internet for WellKnownCommunities. + * WellKnownCommunities-Internet. */ public static final WellKnownCommunities INTERNET = fromString("Internet"); /** - * Static value LocalAS for WellKnownCommunities. + * WellKnownCommunities-LocalAS. */ public static final WellKnownCommunities LOCAL_AS = fromString("LocalAS"); /** - * Static value NoAdvertise for WellKnownCommunities. + * WellKnownCommunities-NoAdvertise. */ public static final WellKnownCommunities NO_ADVERTISE = fromString("NoAdvertise"); /** - * Static value NoExport for WellKnownCommunities. + * WellKnownCommunities-NoExport. */ public static final WellKnownCommunities NO_EXPORT = fromString("NoExport"); /** - * Static value GShut for WellKnownCommunities. + * WellKnownCommunities-GShut. */ public static final WellKnownCommunities GSHUT = fromString("GShut"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java index 11c1cb92e937..b9dc73475414 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureNetworkFabricManagementServiceApi. + * Package containing the data models for ManagedNetworkFabric. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java index 057a9b8750d3..e1585bddfea2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureNetworkFabricManagementServiceApi. + * Package containing the classes for ManagedNetworkFabric. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java index b22e210a1dff..2c98a6d67de4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.managednetworkfabric { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.managednetworkfabric.fluent.models to com.azure.core; opens com.azure.resourcemanager.managednetworkfabric.models to com.azure.core; + opens com.azure.resourcemanager.managednetworkfabric.implementation.models to com.azure.core; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json new file mode 100644 index 000000000000..7cc3235b6d17 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.ManagedNetworkFabric":"2025-07-15"},"crossLanguageDefinitions":{"com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient":"Microsoft.ManagedNetworkFabric.AccessControlLists","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginCreate":"Microsoft.ManagedNetworkFabric.AccessControlLists.create","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginDelete":"Microsoft.ManagedNetworkFabric.AccessControlLists.delete","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginResync":"Microsoft.ManagedNetworkFabric.AccessControlLists.resync","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.AccessControlLists.update","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.create":"Microsoft.ManagedNetworkFabric.AccessControlLists.create","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.delete":"Microsoft.ManagedNetworkFabric.AccessControlLists.delete","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.AccessControlLists.get","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.AccessControlLists.get","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.list":"Microsoft.ManagedNetworkFabric.AccessControlLists.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.AccessControlLists.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.resync":"Microsoft.ManagedNetworkFabric.AccessControlLists.resync","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.update":"Microsoft.ManagedNetworkFabric.AccessControlLists.update","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient":"Microsoft.ManagedNetworkFabric.ExternalNetworks","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginCreate":"Microsoft.ManagedNetworkFabric.ExternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginDelete":"Microsoft.ManagedNetworkFabric.ExternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.ExternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.create":"Microsoft.ManagedNetworkFabric.ExternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.delete":"Microsoft.ManagedNetworkFabric.ExternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.get":"Microsoft.ManagedNetworkFabric.ExternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.getWithResponse":"Microsoft.ManagedNetworkFabric.ExternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.listByL3IsolationDomain":"Microsoft.ManagedNetworkFabric.ExternalNetworks.listByL3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.update":"Microsoft.ManagedNetworkFabric.ExternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient":"Microsoft.ManagedNetworkFabric.InternalNetworks","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBgpAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.create":"Microsoft.ManagedNetworkFabric.InternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.delete":"Microsoft.ManagedNetworkFabric.InternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.get":"Microsoft.ManagedNetworkFabric.InternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.getWithResponse":"Microsoft.ManagedNetworkFabric.InternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.listByL3IsolationDomain":"Microsoft.ManagedNetworkFabric.InternalNetworks.listByL3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.update":"Microsoft.ManagedNetworkFabric.InternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBgpAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient":"Microsoft.ManagedNetworkFabric.InternetGatewayRules","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.create":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.delete":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.list":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.update":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient":"Microsoft.ManagedNetworkFabric.InternetGateways","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternetGateways.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternetGateways.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternetGateways.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.create":"Microsoft.ManagedNetworkFabric.InternetGateways.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.delete":"Microsoft.ManagedNetworkFabric.InternetGateways.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGateways.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.InternetGateways.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.list":"Microsoft.ManagedNetworkFabric.InternetGateways.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGateways.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.update":"Microsoft.ManagedNetworkFabric.InternetGateways.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient":"Microsoft.ManagedNetworkFabric.IpCommunities","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.create":"Microsoft.ManagedNetworkFabric.IpCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.delete":"Microsoft.ManagedNetworkFabric.IpCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.list":"Microsoft.ManagedNetworkFabric.IpCommunities.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpCommunities.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.update":"Microsoft.ManagedNetworkFabric.IpCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.create":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.delete":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.list":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.update":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient":"Microsoft.ManagedNetworkFabric.IpPrefixes","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpPrefixes.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpPrefixes.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpPrefixes.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.create":"Microsoft.ManagedNetworkFabric.IpPrefixes.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.delete":"Microsoft.ManagedNetworkFabric.IpPrefixes.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpPrefixes.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpPrefixes.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.list":"Microsoft.ManagedNetworkFabric.IpPrefixes.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpPrefixes.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.update":"Microsoft.ManagedNetworkFabric.IpPrefixes.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient":"Microsoft.ManagedNetworkFabric.L2IsolationDomains","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCreate":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginDelete":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.create":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.delete":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.list":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.update":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient":"Microsoft.ManagedNetworkFabric.L3IsolationDomains","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCreate":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginDelete":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.create":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.delete":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.list":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.update":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.ManagedNetworkFabricManagementClient":"Microsoft.ManagedNetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient":"Microsoft.ManagedNetworkFabric.NeighborGroups","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NeighborGroups.create","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NeighborGroups.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginResync":"Microsoft.ManagedNetworkFabric.NeighborGroups.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NeighborGroups.update","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.create":"Microsoft.ManagedNetworkFabric.NeighborGroups.create","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.delete":"Microsoft.ManagedNetworkFabric.NeighborGroups.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NeighborGroups.get","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NeighborGroups.get","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.list":"Microsoft.ManagedNetworkFabric.NeighborGroups.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NeighborGroups.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.resync":"Microsoft.ManagedNetworkFabric.NeighborGroups.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.update":"Microsoft.ManagedNetworkFabric.NeighborGroups.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginReboot":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginRefreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginResyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.beginUpgrade":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.create":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.list":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.reboot":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.refreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.resyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.update":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapDevicesClient.upgrade":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.create":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.get":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.listByNetworkBootstrapDevice":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.listByNetworkBootstrapDevice","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.update":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkBootstrapInterfacesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.get":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.list":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient":"Microsoft.ManagedNetworkFabric.NetworkDevices","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginReboot":"Microsoft.ManagedNetworkFabric.NetworkDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRefreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginResyncCertificates":"Microsoft.ManagedNetworkFabric.NetworkDevices.resyncCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginResyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkDevices.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRoCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRwCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpgrade":"Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.create":"Microsoft.ManagedNetworkFabric.NetworkDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.list":"Microsoft.ManagedNetworkFabric.NetworkDevices.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkDevices.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.reboot":"Microsoft.ManagedNetworkFabric.NetworkDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.refreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.resyncCertificates":"Microsoft.ManagedNetworkFabric.NetworkDevices.resyncCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.resyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkDevices.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRoCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRwCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.update":"Microsoft.ManagedNetworkFabric.NetworkDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.upgrade":"Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.create":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.delete":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.update":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.get":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient":"Microsoft.ManagedNetworkFabric.NetworkFabrics","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.armConfigurationDiff":"Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginArmConfigurationDiff":"Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitBatchStatus":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkFabrics.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkFabrics.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDeprovision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDiscardCommitBatch":"Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginGetTopology":"Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginLockFabric":"Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginProvision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.provision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginRefreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginResyncCertificates":"Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginResyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginRotateCertificates":"Microsoft.ManagedNetworkFabric.NetworkFabrics.rotateCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginRotatePasswords":"Microsoft.ManagedNetworkFabric.NetworkFabrics.rotatePasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkFabrics.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateInfraManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateWorkloadManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpgrade":"Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginViewDeviceConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitBatchStatus":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.create":"Microsoft.ManagedNetworkFabric.NetworkFabrics.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkFabrics.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.deprovision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.discardCommitBatch":"Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabrics.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabrics.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getTopology":"Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabrics.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabrics.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.lockFabric":"Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.provision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.provision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.refreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.resyncCertificates":"Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.resyncPasswords":"Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncPasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.rotateCertificates":"Microsoft.ManagedNetworkFabric.NetworkFabrics.rotateCertificates","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.rotatePasswords":"Microsoft.ManagedNetworkFabric.NetworkFabrics.rotatePasswords","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.update":"Microsoft.ManagedNetworkFabric.NetworkFabrics.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateInfraManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateWorkloadManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.upgrade":"Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.viewDeviceConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient":"Microsoft.ManagedNetworkFabric.NetworkInterfaces","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.create":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.get":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.listByNetworkDevice":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.listByNetworkDevice","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.update":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient":"Microsoft.ManagedNetworkFabric.NetworkMonitors","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkMonitors.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkMonitors.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkMonitors.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.create":"Microsoft.ManagedNetworkFabric.NetworkMonitors.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkMonitors.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkMonitors.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkMonitors.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.list":"Microsoft.ManagedNetworkFabric.NetworkMonitors.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkMonitors.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.update":"Microsoft.ManagedNetworkFabric.NetworkMonitors.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.create":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.delete":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.list":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.update":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient":"Microsoft.ManagedNetworkFabric.NetworkRacks","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkRacks.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkRacks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkRacks.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.create":"Microsoft.ManagedNetworkFabric.NetworkRacks.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.delete":"Microsoft.ManagedNetworkFabric.NetworkRacks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkRacks.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkRacks.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.list":"Microsoft.ManagedNetworkFabric.NetworkRacks.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkRacks.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.update":"Microsoft.ManagedNetworkFabric.NetworkRacks.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient":"Microsoft.ManagedNetworkFabric.NetworkTapRules","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkTapRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkTapRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginResync":"Microsoft.ManagedNetworkFabric.NetworkTapRules.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkTapRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.create":"Microsoft.ManagedNetworkFabric.NetworkTapRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkTapRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTapRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkTapRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.list":"Microsoft.ManagedNetworkFabric.NetworkTapRules.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTapRules.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.resync":"Microsoft.ManagedNetworkFabric.NetworkTapRules.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.update":"Microsoft.ManagedNetworkFabric.NetworkTapRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient":"Microsoft.ManagedNetworkFabric.NetworkTaps","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkTaps.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkTaps.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginResync":"Microsoft.ManagedNetworkFabric.NetworkTaps.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkTaps.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.create":"Microsoft.ManagedNetworkFabric.NetworkTaps.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkTaps.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTaps.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkTaps.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.list":"Microsoft.ManagedNetworkFabric.NetworkTaps.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTaps.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.resync":"Microsoft.ManagedNetworkFabric.NetworkTaps.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.update":"Microsoft.ManagedNetworkFabric.NetworkTaps.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateNpbStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateNpbStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.create":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.get":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.listByNetworkFabric":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.listByNetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.update":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateNpbStaticRouteBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateNpbStaticRouteBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient":"Microsoft.ManagedNetworkFabric.Operations","com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient":"Microsoft.ManagedNetworkFabric.RoutePolicies","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCreate":"Microsoft.ManagedNetworkFabric.RoutePolicies.create","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginDelete":"Microsoft.ManagedNetworkFabric.RoutePolicies.delete","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.RoutePolicies.update","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.create":"Microsoft.ManagedNetworkFabric.RoutePolicies.create","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.delete":"Microsoft.ManagedNetworkFabric.RoutePolicies.delete","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.RoutePolicies.get","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.RoutePolicies.get","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.list":"Microsoft.ManagedNetworkFabric.RoutePolicies.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.RoutePolicies.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.update":"Microsoft.ManagedNetworkFabric.RoutePolicies.update","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner":"Microsoft.ManagedNetworkFabric.AccessControlList","com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListPatchProperties":"Microsoft.ManagedNetworkFabric.AccessControlListPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListProperties":"Microsoft.ManagedNetworkFabric.AccessControlListProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffOperationResponseInner":"Microsoft.ManagedNetworkFabric.ArmConfigurationDiffOperationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusOperationResponseInner":"Microsoft.ManagedNetworkFabric.CommitBatchStatusOperationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.CommitConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommandsOperationStatusResult","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceUpdate","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForStateUpdate","com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchOperationResponseInner":"Microsoft.ManagedNetworkFabric.DiscardCommitBatchOperationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner":"Microsoft.ManagedNetworkFabric.ExternalNetwork","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkPatchProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkUpdateBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.GetTopologyResponseInner":"Microsoft.ManagedNetworkFabric.GetTopologyResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner":"Microsoft.ManagedNetworkFabric.InternalNetwork","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkPatchProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkUpdateBgpAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner":"Microsoft.ManagedNetworkFabric.InternetGateway","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner":"Microsoft.ManagedNetworkFabric.InternetGatewayRule","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayRuleProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner":"Microsoft.ManagedNetworkFabric.IpCommunity","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityPatchableProperties":"Microsoft.ManagedNetworkFabric.IpCommunityPatchableProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityProperties":"Microsoft.ManagedNetworkFabric.IpCommunityProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner":"Microsoft.ManagedNetworkFabric.IpExtendedCommunity","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityProperties":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner":"Microsoft.ManagedNetworkFabric.IpPrefix","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixPatchProperties":"Microsoft.ManagedNetworkFabric.IpPrefixPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixProperties":"Microsoft.ManagedNetworkFabric.IpPrefixProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner":"Microsoft.ManagedNetworkFabric.L2IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.L2IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.L2IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner":"Microsoft.ManagedNetworkFabric.L3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.L3IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.L3IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner":"Microsoft.ManagedNetworkFabric.NeighborGroup","com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupPatchProperties":"Microsoft.ManagedNetworkFabric.NeighborGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupProperties":"Microsoft.ManagedNetworkFabric.NeighborGroupProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupResyncResponseInner":"Microsoft.ManagedNetworkFabric.NeighborGroupResyncResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevice","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDevicePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevicePatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceProperties":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRebootResponseInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceRebootResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceRefreshConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceRefreshConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceResyncPasswordsResponseInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceResyncPasswordsResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceUpdateAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceUpgradeResponseInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceUpgradeResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterface","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfacePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfacePatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceProperties":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaceProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner":"Microsoft.ManagedNetworkFabric.NetworkDevice","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties":"Microsoft.ManagedNetworkFabric.NetworkDevicePatchParametersProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceProperties":"Microsoft.ManagedNetworkFabric.NetworkDeviceProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRefreshConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceRefreshConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceResyncPasswordsResponseInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceResyncPasswordsResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceRunRwCommandResponseInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceRunRwCommandResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceSku","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuProperties":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkuProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpdateAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceUpdateAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceUpgradeResponseInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceUpgradeResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner":"Microsoft.ManagedNetworkFabric.NetworkFabricController","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner":"Microsoft.ManagedNetworkFabric.NetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncCertificatesResponseInner":"Microsoft.ManagedNetworkFabric.NetworkFabricResyncCertificatesResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricResyncPasswordsResponseInner":"Microsoft.ManagedNetworkFabric.NetworkFabricResyncPasswordsResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotateCertificatesResponseInner":"Microsoft.ManagedNetworkFabric.NetworkFabricRotateCertificatesResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricRotatePasswordsResponseInner":"Microsoft.ManagedNetworkFabric.NetworkFabricRotatePasswordsResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner":"Microsoft.ManagedNetworkFabric.NetworkFabricSku","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricSkuProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner":"Microsoft.ManagedNetworkFabric.NetworkInterface","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfacePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkInterfacePatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceProperties":"Microsoft.ManagedNetworkFabric.NetworkInterfaceProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner":"Microsoft.ManagedNetworkFabric.NetworkMonitor","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkMonitorPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorProperties":"Microsoft.ManagedNetworkFabric.NetworkMonitorProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner":"Microsoft.ManagedNetworkFabric.NetworkPacketBroker","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerProperties":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokerProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner":"Microsoft.ManagedNetworkFabric.NetworkRack","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackProperties":"Microsoft.ManagedNetworkFabric.NetworkRackProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner":"Microsoft.ManagedNetworkFabric.NetworkTap","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkTapPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapProperties":"Microsoft.ManagedNetworkFabric.NetworkTapProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapResyncResponseInner":"Microsoft.ManagedNetworkFabric.NetworkTapResyncResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner":"Microsoft.ManagedNetworkFabric.NetworkTapRule","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRulePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkTapRulePatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleProperties":"Microsoft.ManagedNetworkFabric.NetworkTapRuleProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleResyncResponseInner":"Microsoft.ManagedNetworkFabric.NetworkTapRuleResyncResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnect","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatchProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectProperties":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.NniUpdateBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner":"Microsoft.ManagedNetworkFabric.RoutePolicy","com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyPatchableProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyPatchableProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyProperties","com.azure.resourcemanager.managednetworkfabric.fluent.models.UpdateAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.UpdateAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.ValidateConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationOperationResponseInner":"Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationOperationResponse","com.azure.resourcemanager.managednetworkfabric.implementation.ManagedNetworkFabricManagementClientBuilder":"Microsoft.ManagedNetworkFabric","com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListsListResult":"AccessControlListsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworksList":"ExternalNetworksList","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworksList":"InternalNetworksList","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRulesListResult":"InternetGatewayRulesListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewaysListResult":"InternetGatewaysListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunitiesListResult":"IpCommunitiesListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixesListResult":"IpPrefixesListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainsListResult":"L2IsolationDomainsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainsListResult":"L3IsolationDomainsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupsListResult":"NeighborGroupsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapInterfaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkusListResult":"NetworkDeviceSkusListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDevicesListResult":"NetworkDevicesListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricControllersListResult":"NetworkFabricControllersListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkusListResult":"NetworkFabricSkusListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricsListResult":"NetworkFabricsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfacesList":"NetworkInterfacesList","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokersListResult":"NetworkPacketBrokersListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRacksListResult":"NetworkRacksListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRulesListResult":"NetworkTapRulesListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapsListResult":"NetworkTapsListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectsList":"NetworkToNetworkInterconnectsList","com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePoliciesListResult":"RoutePoliciesListResult","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction":"Microsoft.ManagedNetworkFabric.AccessControlListAction","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListActionPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition":"Microsoft.ManagedNetworkFabric.AccessControlListMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch":"Microsoft.ManagedNetworkFabric.AccessControlListPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition":"Microsoft.ManagedNetworkFabric.AccessControlListPortCondition","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListPortConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.AclActionType":"Microsoft.ManagedNetworkFabric.AclActionType","com.azure.resourcemanager.managednetworkfabric.models.AclType":"Microsoft.ManagedNetworkFabric.AclType","com.azure.resourcemanager.managednetworkfabric.models.Action":"Microsoft.ManagedNetworkFabric.Action","com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.ActionIpCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties":"Microsoft.ManagedNetworkFabric.ActionIpCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties":"Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType":"Microsoft.ManagedNetworkFabric.AddressFamilyType","com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState":"Microsoft.ManagedNetworkFabric.AdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute":"Microsoft.ManagedNetworkFabric.AggregateRoute","com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration":"Microsoft.ManagedNetworkFabric.AggregateRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.AggregateRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride":"Microsoft.ManagedNetworkFabric.AllowASOverride","com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource":"Microsoft.ManagedNetworkFabric.AnnotationResource","com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponseProperties":"Microsoft.ManagedNetworkFabric.ArmConfigurationDiffResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverPatchProperties":"Microsoft.ManagedNetworkFabric.AuthorizedTransceiverPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties":"Microsoft.ManagedNetworkFabric.AuthorizedTransceiverProperties","com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState":"Microsoft.ManagedNetworkFabric.BfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration":"Microsoft.ManagedNetworkFabric.BfdConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration":"Microsoft.ManagedNetworkFabric.BfdPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState":"Microsoft.ManagedNetworkFabric.BgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration":"Microsoft.ManagedNetworkFabric.BgpConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration":"Microsoft.ManagedNetworkFabric.BgpPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BitRate":"Microsoft.ManagedNetworkFabric.BitRate","com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit":"Microsoft.ManagedNetworkFabric.BitRateUnit","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.BmpConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties":"Microsoft.ManagedNetworkFabric.BmpConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState":"Microsoft.ManagedNetworkFabric.BmpConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy":"Microsoft.ManagedNetworkFabric.BmpExportPolicy","com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties":"Microsoft.ManagedNetworkFabric.BmpExportPolicyPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties":"Microsoft.ManagedNetworkFabric.BmpExportPolicyProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily":"Microsoft.ManagedNetworkFabric.BmpMonitoredAddressFamily","com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty":"Microsoft.ManagedNetworkFabric.BooleanEnumProperty","com.azure.resourcemanager.managednetworkfabric.models.BurstSize":"Microsoft.ManagedNetworkFabric.BurstSize","com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit":"Microsoft.ManagedNetworkFabric.BurstSizeUnit","com.azure.resourcemanager.managednetworkfabric.models.CertificateArchiveReference":"Microsoft.ManagedNetworkFabric.CertificateArchiveReference","com.azure.resourcemanager.managednetworkfabric.models.CertificateRotationStatus":"Microsoft.ManagedNetworkFabric.CertificateRotationStatus","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails":"Microsoft.ManagedNetworkFabric.CommitBatchDetails","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState":"Microsoft.ManagedNetworkFabric.CommitBatchState","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest":"Microsoft.ManagedNetworkFabric.CommitBatchStatusRequest","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponseProperties":"Microsoft.ManagedNetworkFabric.CommitBatchStatusResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationPolicy":"Microsoft.ManagedNetworkFabric.CommitConfigurationPolicy","com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest":"Microsoft.ManagedNetworkFabric.CommitConfigurationRequest","com.azure.resourcemanager.managednetworkfabric.models.CommitStage":"Microsoft.ManagedNetworkFabric.CommitStage","com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration":"Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.CommonErrorResponse":"Microsoft.ManagedNetworkFabric.CommonErrorResponse","com.azure.resourcemanager.managednetworkfabric.models.CommonMatchConditions":"Microsoft.ManagedNetworkFabric.CommonMatchConditions","com.azure.resourcemanager.managednetworkfabric.models.CommonMatchConditionsPatch":"Microsoft.ManagedNetworkFabric.CommonMatchConditionsPatch","com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommands","com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes":"Microsoft.ManagedNetworkFabric.CommunityActionTypes","com.azure.resourcemanager.managednetworkfabric.models.Condition":"Microsoft.ManagedNetworkFabric.Condition","com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties":"Microsoft.ManagedNetworkFabric.ConditionalDefaultRouteProperties","com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState":"Microsoft.ManagedNetworkFabric.ConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType":"Microsoft.ManagedNetworkFabric.ConfigurationType","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet":"Microsoft.ManagedNetworkFabric.ConnectedSubnet","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch":"Microsoft.ManagedNetworkFabric.ConnectedSubnetPatch","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy":"Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition":"Microsoft.ManagedNetworkFabric.ControlPlanAclIpMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction":"Microsoft.ManagedNetworkFabric.ControlPlaneAclAction","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch":"Microsoft.ManagedNetworkFabric.ControlPlaneAclActionPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType":"Microsoft.ManagedNetworkFabric.ControlPlaneAclActionType","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch":"Microsoft.ManagedNetworkFabric.ControlPlaneAclIpMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition":"Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch":"Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties":"Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties":"Microsoft.ManagedNetworkFabric.ControlPlaneAclPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition":"Microsoft.ManagedNetworkFabric.ControlPlaneAclPortCondition","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition":"Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch":"Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType":"Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchType","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties":"Microsoft.ManagedNetworkFabric.ControlPlaneAclProperties","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition":"Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch":"Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType":"Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchType","com.azure.resourcemanager.managednetworkfabric.models.ControllerServices":"Microsoft.ManagedNetworkFabric.ControllerServices","com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties":"Microsoft.ManagedNetworkFabric.DestinationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties":"Microsoft.ManagedNetworkFabric.DestinationProperties","com.azure.resourcemanager.managednetworkfabric.models.DestinationType":"Microsoft.ManagedNetworkFabric.DestinationType","com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState":"Microsoft.ManagedNetworkFabric.DeviceAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties":"Microsoft.ManagedNetworkFabric.DeviceInterfaceProperties","com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand":"Microsoft.ManagedNetworkFabric.DeviceRoCommand","com.azure.resourcemanager.managednetworkfabric.models.DeviceRole":"Microsoft.ManagedNetworkFabric.DeviceRole","com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand":"Microsoft.ManagedNetworkFabric.DeviceRwCommand","com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest":"Microsoft.ManagedNetworkFabric.DiscardCommitBatchRequest","com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponseProperties":"Microsoft.ManagedNetworkFabric.DiscardCommitBatchResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources":"Microsoft.ManagedNetworkFabric.EnableDisableOnResources","com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState":"Microsoft.ManagedNetworkFabric.EnableDisableState","com.azure.resourcemanager.managednetworkfabric.models.Encapsulation":"Microsoft.ManagedNetworkFabric.Encapsulation","com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType":"Microsoft.ManagedNetworkFabric.EncapsulationType","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy":"Microsoft.ManagedNetworkFabric.ExportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformation","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformationPatch","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation":"Microsoft.ManagedNetworkFabric.ExpressRouteConnectionInformation","com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan":"Microsoft.ManagedNetworkFabric.ExtendedVlan","com.azure.resourcemanager.managednetworkfabric.models.Extension":"Microsoft.ManagedNetworkFabric.Extension","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatch","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatchPropertiesOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPropertiesOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType":"Microsoft.ManagedNetworkFabric.ExternalNetworkRouteType","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties":"Microsoft.ManagedNetworkFabric.FabricLockProperties","com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType":"Microsoft.ManagedNetworkFabric.FabricSkuType","com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties":"Microsoft.ManagedNetworkFabric.FeatureFlagProperties","com.azure.resourcemanager.managednetworkfabric.models.GatewayType":"Microsoft.ManagedNetworkFabric.GatewayType","com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponseProperties":"Microsoft.ManagedNetworkFabric.GetTopologyResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties":"Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties":"Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties":"Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties":"Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionProperties","com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties":"Microsoft.ManagedNetworkFabric.HeaderAddressProperties","com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.IcmpConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties":"Microsoft.ManagedNetworkFabric.IcmpConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector":"Microsoft.ManagedNetworkFabric.IdentitySelector","com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch":"Microsoft.ManagedNetworkFabric.IdentitySelectorPatch","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy":"Microsoft.ManagedNetworkFabric.ImportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformation","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformationPatch","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.InterfaceType":"Microsoft.ManagedNetworkFabric.InterfaceType","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch":"Microsoft.ManagedNetworkFabric.InternalNetworkPatch","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType":"Microsoft.ManagedNetworkFabric.InternalNetworkRouteType","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch":"Microsoft.ManagedNetworkFabric.InternetGatewayPatch","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch":"Microsoft.ManagedNetworkFabric.InternetGatewayRulePatch","com.azure.resourcemanager.managednetworkfabric.models.IpAddressType":"Microsoft.ManagedNetworkFabric.IPAddressType","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList":"Microsoft.ManagedNetworkFabric.IpCommunityIdList","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch":"Microsoft.ManagedNetworkFabric.IpCommunityPatch","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule":"Microsoft.ManagedNetworkFabric.IpCommunityRule","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityIdList","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatch","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityRule","com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties":"Microsoft.ManagedNetworkFabric.IpGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties":"Microsoft.ManagedNetworkFabric.IpGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition":"Microsoft.ManagedNetworkFabric.IpMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch":"Microsoft.ManagedNetworkFabric.IpMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch":"Microsoft.ManagedNetworkFabric.IpPrefixPatch","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule":"Microsoft.ManagedNetworkFabric.IpPrefixRule","com.azure.resourcemanager.managednetworkfabric.models.IsManagementType":"Microsoft.ManagedNetworkFabric.IsManagementType","com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled":"Microsoft.ManagedNetworkFabric.IsMonitoringEnabled","com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled":"Microsoft.ManagedNetworkFabric.IsWorkloadManagementNetworkEnabled","com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch":"Microsoft.ManagedNetworkFabric.L2IsolationDomainPatch","com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy":"Microsoft.ManagedNetworkFabric.L3ExportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.L3ExportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch":"Microsoft.ManagedNetworkFabric.L3IsolationDomainPatch","com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties":"Microsoft.ManagedNetworkFabric.L3OptionBPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties":"Microsoft.ManagedNetworkFabric.L3OptionBProperties","com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties":"Microsoft.ManagedNetworkFabric.L3UniqueRouteDistinguisherProperties","com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties":"Microsoft.ManagedNetworkFabric.LastOperationProperties","com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration":"Microsoft.ManagedNetworkFabric.Layer2Configuration","com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch":"Microsoft.ManagedNetworkFabric.Layer2ConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.Layer3IpPrefixPatchProperties":"Microsoft.ManagedNetworkFabric.Layer3IpPrefixPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.Layer3IpPrefixProperties":"Microsoft.ManagedNetworkFabric.Layer3IpPrefixProperties","com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol":"Microsoft.ManagedNetworkFabric.Layer4Protocol","com.azure.resourcemanager.managednetworkfabric.models.LockConfigurationState":"Microsoft.ManagedNetworkFabric.LockConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration":"Microsoft.ManagedNetworkFabric.ManagedResourceGroupConfiguration","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch":"Microsoft.ManagedNetworkFabric.ManagedServiceIdentityPatch","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType":"Microsoft.ManagedNetworkFabric.ManagedServiceIdentitySelectorType","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties":"Microsoft.ManagedNetworkFabric.ManagementNetworkConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration":"Microsoft.ManagedNetworkFabric.ManagementNetworkPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState":"Microsoft.ManagedNetworkFabric.MicroBfdState","com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState":"Microsoft.ManagedNetworkFabric.NNIDerivedUniqueRouteDistinguisherConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress":"Microsoft.ManagedNetworkFabric.NeighborAddress","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus":"Microsoft.ManagedNetworkFabric.NeighborAddressBfdAdministrativeStatus","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus":"Microsoft.ManagedNetworkFabric.NeighborAddressBgpAdministrativeStatus","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch":"Microsoft.ManagedNetworkFabric.NeighborAddressPatch","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination":"Microsoft.ManagedNetworkFabric.NeighborGroupDestination","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch":"Microsoft.ManagedNetworkFabric.NeighborGroupDestinationPatch","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch":"Microsoft.ManagedNetworkFabric.NeighborGroupPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevicePatch":"Microsoft.ManagedNetworkFabric.NetworkBootstrapDevicePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfacePatch":"Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfacePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters":"Microsoft.ManagedNetworkFabric.NetworkDevicePatchParameters","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole":"Microsoft.ManagedNetworkFabric.NetworkDeviceRole","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName":"Microsoft.ManagedNetworkFabric.NetworkDeviceRoleName","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties":"Microsoft.ManagedNetworkFabric.NetworkDeviceRwCommandResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest":"Microsoft.ManagedNetworkFabric.NetworkDeviceUpgradeRequest","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction":"Microsoft.ManagedNetworkFabric.NetworkFabricLockAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest":"Microsoft.ManagedNetworkFabric.NetworkFabricLockRequest","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType":"Microsoft.ManagedNetworkFabric.NetworkFabricLockType","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch":"Microsoft.ManagedNetworkFabric.NetworkFabricPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricUpgradeAction":"Microsoft.ManagedNetworkFabric.NetworkFabricUpgradeAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch":"Microsoft.ManagedNetworkFabric.NetworkInterfacePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch":"Microsoft.ManagedNetworkFabric.NetworkMonitorPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokerPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch":"Microsoft.ManagedNetworkFabric.NetworkRackPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType":"Microsoft.ManagedNetworkFabric.NetworkRackType","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch":"Microsoft.ManagedNetworkFabric.NetworkTapPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction":"Microsoft.ManagedNetworkFabric.NetworkTapRuleAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleActionPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch":"Microsoft.ManagedNetworkFabric.NetworkTapRulePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatch","com.azure.resourcemanager.managednetworkfabric.models.NfcSku":"Microsoft.ManagedNetworkFabric.NfcSku","com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties":"Microsoft.ManagedNetworkFabric.NniBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties":"Microsoft.ManagedNetworkFabric.NniBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.NniStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.NniStaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NniType":"Microsoft.ManagedNetworkFabric.NniType","com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties":"Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.NpbStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch":"Microsoft.ManagedNetworkFabric.NpbStaticRouteConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration":"Microsoft.ManagedNetworkFabric.OptionBLayer3Configuration","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3ConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.managednetworkfabric.models.PeeringOption":"Microsoft.ManagedNetworkFabric.PeeringOption","com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties":"Microsoft.ManagedNetworkFabric.PoliceRateConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.PollingType":"Microsoft.ManagedNetworkFabric.PollingType","com.azure.resourcemanager.managednetworkfabric.models.PortCondition":"Microsoft.ManagedNetworkFabric.PortCondition","com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch":"Microsoft.ManagedNetworkFabric.PortConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties":"Microsoft.ManagedNetworkFabric.PortGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties":"Microsoft.ManagedNetworkFabric.PortGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.PortType":"Microsoft.ManagedNetworkFabric.PortType","com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.PrefixType":"Microsoft.ManagedNetworkFabric.PrefixType","com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState":"Microsoft.ManagedNetworkFabric.ProvisioningState","com.azure.resourcemanager.managednetworkfabric.models.ProxyResourceBase":"Microsoft.ManagedNetworkFabric.ProxyResourceBase","com.azure.resourcemanager.managednetworkfabric.models.QosConfigurationState":"Microsoft.ManagedNetworkFabric.QosConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties":"Microsoft.ManagedNetworkFabric.QosPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.QosProperties":"Microsoft.ManagedNetworkFabric.QosProperties","com.azure.resourcemanager.managednetworkfabric.models.RebootProperties":"Microsoft.ManagedNetworkFabric.RebootProperties","com.azure.resourcemanager.managednetworkfabric.models.RebootType":"Microsoft.ManagedNetworkFabric.RebootType","com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets":"Microsoft.ManagedNetworkFabric.RedistributeConnectedSubnets","com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes":"Microsoft.ManagedNetworkFabric.RedistributeStaticRoutes","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType":"Microsoft.ManagedNetworkFabric.RoutePolicyActionType","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType":"Microsoft.ManagedNetworkFabric.RoutePolicyConditionType","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch":"Microsoft.ManagedNetworkFabric.RoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyStatementPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyStatementProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.RoutePrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties":"Microsoft.ManagedNetworkFabric.RoutePrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation":"Microsoft.ManagedNetworkFabric.RouteTargetInformation","com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation":"Microsoft.ManagedNetworkFabric.RouteTargetPatchInformation","com.azure.resourcemanager.managednetworkfabric.models.RouteType":"Microsoft.ManagedNetworkFabric.RouteType","com.azure.resourcemanager.managednetworkfabric.models.RuleCondition":"Microsoft.ManagedNetworkFabric.RuleCondition","com.azure.resourcemanager.managednetworkfabric.models.RuleProperties":"Microsoft.ManagedNetworkFabric.RuleProperties","com.azure.resourcemanager.managednetworkfabric.models.SecretArchiveReference":"Microsoft.ManagedNetworkFabric.SecretArchiveReference","com.azure.resourcemanager.managednetworkfabric.models.SecretRotationStatus":"Microsoft.ManagedNetworkFabric.SecretRotationStatus","com.azure.resourcemanager.managednetworkfabric.models.SecretRotationSummary":"Microsoft.ManagedNetworkFabric.SecretRotationSummary","com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType":"Microsoft.ManagedNetworkFabric.SourceDestinationType","com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties":"Microsoft.ManagedNetworkFabric.StatementActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties":"Microsoft.ManagedNetworkFabric.StatementActionProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties":"Microsoft.ManagedNetworkFabric.StatementConditionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties":"Microsoft.ManagedNetworkFabric.StatementConditionProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.StaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.StaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties":"Microsoft.ManagedNetworkFabric.StaticRoutePatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties":"Microsoft.ManagedNetworkFabric.StaticRouteProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy":"Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState":"Microsoft.ManagedNetworkFabric.StationConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode":"Microsoft.ManagedNetworkFabric.StationConnectionMode","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties":"Microsoft.ManagedNetworkFabric.StationConnectionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties":"Microsoft.ManagedNetworkFabric.StationConnectionProperties","com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration":"Microsoft.ManagedNetworkFabric.StorageAccountConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration":"Microsoft.ManagedNetworkFabric.StorageAccountPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties":"Microsoft.ManagedNetworkFabric.SupportedConnectorProperties","com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties":"Microsoft.ManagedNetworkFabric.SupportedVersionProperties","com.azure.resourcemanager.managednetworkfabric.models.SynchronizationStatus":"Microsoft.ManagedNetworkFabric.SynchronizationStatus","com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate":"Microsoft.ManagedNetworkFabric.TagsUpdate","com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType":"Microsoft.ManagedNetworkFabric.TapRuleActionType","com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration":"Microsoft.ManagedNetworkFabric.TerminalServerConfiguration","com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration":"Microsoft.ManagedNetworkFabric.TerminalServerPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherProperties","com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.UpdateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties":"Microsoft.ManagedNetworkFabric.UpdateAdministrativeStateResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState":"Microsoft.ManagedNetworkFabric.UpdateDeviceAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion":"Microsoft.ManagedNetworkFabric.UpdateVersion","com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties":"Microsoft.ManagedNetworkFabric.UpgradeNetworkFabricProperties","com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState":"Microsoft.ManagedNetworkFabric.V4OverV6BgpSessionState","com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState":"Microsoft.ManagedNetworkFabric.V6OverV4BgpSessionState","com.azure.resourcemanager.managednetworkfabric.models.ValidateAction":"Microsoft.ManagedNetworkFabric.ValidateAction","com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties":"Microsoft.ManagedNetworkFabric.ValidateConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties":"Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationResponseProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties":"Microsoft.ManagedNetworkFabric.VlanGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties":"Microsoft.ManagedNetworkFabric.VlanGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition":"Microsoft.ManagedNetworkFabric.VlanMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch":"Microsoft.ManagedNetworkFabric.VlanMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties":"Microsoft.ManagedNetworkFabric.VpnConfigurationPatchableProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties":"Microsoft.ManagedNetworkFabric.VpnConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties":"Microsoft.ManagedNetworkFabric.VpnOptionAPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties":"Microsoft.ManagedNetworkFabric.VpnOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties":"Microsoft.ManagedNetworkFabric.VpnOptionBPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties":"Microsoft.ManagedNetworkFabric.VpnOptionBProperties","com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities":"Microsoft.ManagedNetworkFabric.WellKnownCommunities"},"generatedFiles":["src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ManagedNetworkFabricManagementClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapDevicesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkBootstrapInterfacesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffOperationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusOperationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchOperationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkUpdateBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetTopologyResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkUpdateBgpAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupResyncResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDevicePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRebootResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceRefreshConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceResyncPasswordsResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapDeviceUpgradeResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfacePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkBootstrapInterfaceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRefreshConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceResyncPasswordsResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceRunRwCommandResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpdateAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceUpgradeResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncCertificatesResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricResyncPasswordsResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotateCertificatesResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricRotatePasswordsResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfacePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapResyncResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleResyncResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniUpdateBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/UpdateAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationOperationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkUpdateBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetTopologyResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkUpdateBgpAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ManagedNetworkFabricManagementClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupResyncResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRebootResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceRefreshConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceResyncPasswordsResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpdateAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDeviceUpgradeResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapDevicesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfaceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkBootstrapInterfacesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRefreshConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceResyncPasswordsResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceRunRwCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpdateAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceUpgradeResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncCertificatesResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricResyncPasswordsResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotateCertificatesResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricRotatePasswordsResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapResyncResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleResyncResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniUpdateBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/UpdateAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworksList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworksList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRulesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewaysListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunitiesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapDeviceListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkBootstrapInterfaceListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkusListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDevicesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllersListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkusListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfacesList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokersListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRacksListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRulesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapsListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectsList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePoliciesListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListActionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffOperationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AuthorizedTransceiverProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicyProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateArchiveReference.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CertificateRotationStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusOperationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationPolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitStage.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonErrorResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditionsPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlanAclIpMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclIpMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclMatchConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclPortMatchType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControlPlaneAclTtlMatchType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchOperationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetTopologyResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBfdAdministrativeStateResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkUpdateBgpAdministrativeStateResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupResyncResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevice.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevicePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRebootResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceRefreshConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceResyncPasswordsResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpdateAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDeviceUpgradeResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapDevices.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterface.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfacePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkBootstrapInterfaces.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRefreshConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceResyncPasswordsResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRunRwCommandResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRwCommandResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpdateAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceUpgradeResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncCertificatesResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricResyncPasswordsResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotateCertificatesResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricRotatePasswordsResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapResyncResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleActionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleResyncResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniUpdateBfdAdministrativeStateResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProxyResourceBase.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/QosProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretArchiveReference.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SecretRotationSummary.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SynchronizationStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeStateResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationOperationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponseProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json index 233f8beb82ee..72e9212ace39 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsClientImpl$AccessControlListsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksClientImpl$ExternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksClientImpl$InternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesClientImpl$InternetGatewayRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysClientImpl$InternetGatewaysService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpCommunitiesClientImpl$IpCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpExtendedCommunitiesClientImpl$IpExtendedCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesClientImpl$IpPrefixesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsClientImpl$L2IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsClientImpl$L3IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsClientImpl$NeighborGroupsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusClientImpl$NetworkDeviceSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesClientImpl$NetworkDevicesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersClientImpl$NetworkFabricControllersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusClientImpl$NetworkFabricSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsClientImpl$NetworkFabricsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersClientImpl$NetworkPacketBrokersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksClientImpl$NetworkRacksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesClientImpl$NetworkTapRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapsClientImpl$NetworkTapsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkToNetworkInterconnectsClientImpl$NetworkToNetworkInterconnectsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.RoutePoliciesClientImpl$RoutePoliciesService"]] \ No newline at end of file +[["com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsClientImpl$AccessControlListsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksClientImpl$ExternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksClientImpl$InternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesClientImpl$InternetGatewayRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysClientImpl$InternetGatewaysService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpCommunitiesClientImpl$IpCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpExtendedCommunitiesClientImpl$IpExtendedCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesClientImpl$IpPrefixesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsClientImpl$L2IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsClientImpl$L3IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsClientImpl$NeighborGroupsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkBootstrapDevicesClientImpl$NetworkBootstrapDevicesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkBootstrapInterfacesClientImpl$NetworkBootstrapInterfacesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusClientImpl$NetworkDeviceSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesClientImpl$NetworkDevicesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersClientImpl$NetworkFabricControllersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusClientImpl$NetworkFabricSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsClientImpl$NetworkFabricsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkMonitorsClientImpl$NetworkMonitorsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersClientImpl$NetworkPacketBrokersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksClientImpl$NetworkRacksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesClientImpl$NetworkTapRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapsClientImpl$NetworkTapsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkToNetworkInterconnectsClientImpl$NetworkToNetworkInterconnectsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.RoutePoliciesClientImpl$RoutePoliciesService"]] \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json index 3bf4de9316fa..0637a088a01e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json @@ -1 +1 @@ -[{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java index 6fa7d636c902..17b51e9bb9b8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,13 +9,34 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -31,9 +52,7 @@ */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Create.json */ /** * Sample code: AccessControlLists_Create_MaximumSet_Gen. @@ -46,36 +65,42 @@ public static void accessControlListsCreateMaximumSetGen( .define("example-acl") .withRegion("eastUs") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withConfigurationType(ConfigurationType.FILE) + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withAclsUrl("https://ACL-Storage-URL") .withDefaultAction(CommunityActionTypes.PERMIT) .withMatchConfigurations( - Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") - .withSequenceNumber(123L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) - .withInnerVlans(Arrays.asList("30")) - .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) - .withIpGroupNames(Arrays.asList("example-ipGroup"))) - .withEtherTypes(Arrays.asList("0x1")) - .withFragments(Arrays.asList("0xff00-0xffff")) - .withIpLengths(Arrays.asList("4094-9214")) - .withTtlValues(Arrays.asList("23")) - .withDscpMarkings(Arrays.asList("32")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("1-20")) - .withPortGroupNames(Arrays.asList("example-portGroup")) - .withFlags(Arrays.asList("established"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("example-counter"))))) + Arrays.asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) @@ -84,7 +109,54 @@ public static void accessControlListsCreateMaximumSetGen( .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .create(); + } + + /* + * x-ms-original-file: 2025-07-15/AccessControlLists_Create_ControlPlaneAcl.json + */ + /** + * Sample code: AccessControlLists_Create_MaximumSet_Gen - generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsCreateMaximumSetGenGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.accessControlLists() + .define("example-acl") + .withRegion("eastus") + .withExistingResourceGroup("example-resource-group") + .withConfigurationType(ConfigurationType.INLINE) + .withTags(mapOf("key5032", "fakeTokenPlaceholder")) .withAnnotation("annotation") + .withAclsUrl("https://microsoft.com/a") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withControlPlaneAclConfiguration( + Arrays.asList(new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("example-match-config") + .withSequenceNumber(3779271459L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("tcp") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("10.0.0.0/24") + .withDestinationIpPrefix("10.0.0.0/24")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("1") + .withTtlMatchType(ControlPlaneAclTtlMatchType.EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("100")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("200")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS))) + .withFlags(Arrays.asList("established")) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("icmp")))) + .withAction(new ControlPlaneAclAction().withType(ControlPlaneAclActionType.fromString("Drop")) + .withRemarkComment("remark")))))) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java index 5e89394d31d7..8d51dfd344ac 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Delete.json */ /** * Sample code: AccessControlLists_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java index d71ac8ab6c22..f548dbcad314 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Get.json */ /** * Sample code: AccessControlLists_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java index 6c523081a702..183b4192e0bc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ListByResourceGroup.json */ /** * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java index 0b7830954c12..45a43df5043b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ListBySubscription.json */ /** * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java index 8c9d530372cd..6cf40d227188 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Resync.json */ /** * Sample code: AccessControlLists_Resync_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java index f4d178953055..014497cf330b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class AccessControlListsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_UpdateAdministrativeState.json */ /** * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java index 7b5a82ed40bb..ee2d8ec94ce3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java @@ -1,28 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -32,9 +42,7 @@ */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_Update.json */ /** * Sample code: AccessControlLists_Update_MaximumSet_Gen. @@ -47,45 +55,53 @@ public static void accessControlListsUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAnnotation("annotation") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withConfigurationType(ConfigurationType.FILE) .withAclsUrl("https://microsoft.com/a") .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations( - Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("example-match") - .withSequenceNumber(123L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) - .withInnerVlans(Arrays.asList("30")) - .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) - .withIpGroupNames(Arrays.asList("example-ipGroup"))) - .withEtherTypes(Arrays.asList("0x1")) - .withFragments(Arrays.asList("0xff00-0xffff")) - .withIpLengths(Arrays.asList("4094-9214")) - .withTtlValues(Arrays.asList("23")) - .withDscpMarkings(Arrays.asList("32")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("1-20")) - .withPortGroupNames(Arrays.asList("example-portGroup")) - .withFlags(Arrays.asList("established"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("example-counter"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") + .withMatchConfigurationsForUpdate( + Arrays.asList(new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.POLICE_RATE) + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .withDynamicMatchConfigurationsForUpdate(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) - .withVlanGroups(Arrays - .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + new PortGroupPatchProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withAnnotation("annotation") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java index 6c50d0fab390..cc4a4ca0fcfe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class AccessControlListsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/AccessControlLists_ValidateConfiguration.json */ /** * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java index c8ea36f11723..d7cdc2118c88 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java @@ -1,16 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -18,9 +27,7 @@ */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Create.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. @@ -30,15 +37,26 @@ public final class ExternalNetworksCreateSamples { public static void externalNetworksCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .define("example-externalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .define("example-ext") + .withExistingL3IsolationDomain("example-rg", "example-externalnetwork") .withPeeringOption(PeeringOption.OPTIONA) + .withAnnotation("annotation") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) .withExportRouteTargets(Arrays.asList("65046:10039")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") .withSecondaryIpv4Prefix("10.1.1.4/30") @@ -46,26 +64,25 @@ public static void externalNetworksCreateMaximumSetGen( .withMtu(1500) .withVlanId(1001) .withPeerAsn(65047L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) .withEgressAclId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) - .withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withAnnotation("annotation") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java index 5c0a3f61f6c8..4dee74476a74 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Delete.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class ExternalNetworksDeleteSamples { public static void externalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java index 27fa7045e65a..61d45b9efc68 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Get.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class ExternalNetworksGetSamples { public static void externalNetworksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java index 9df2ace5b9b7..468c6b11d033 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class ExternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class ExternalNetworksListByL3IsolationDomainSamples { public static void externalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-externalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java index 94f87091608e..4a5d6626c332 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. @@ -25,7 +23,7 @@ public final class ExternalNetworksUpdateAdministrativeStateSamples { public static void externalNetworksUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", + .updateAdministrativeState("example-rg", "example-externalnetwork", "example-ext", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..5c6f1da93998 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; + +/** + * Samples for ExternalNetworks UpdateBfdAdministrativeState. + */ +public final class ExternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: ExternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void externalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.externalNetworks() + .updateBfdAdministrativeState("example-rg", "example-externalnetwork", "example-ext", + new ExternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java index 2c631bc86c21..ec93f416c661 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java @@ -1,17 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -19,9 +28,7 @@ */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_Update.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. @@ -31,17 +38,28 @@ public final class ExternalNetworksUpdateSamples { public static void externalNetworksUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { ExternalNetwork resource = manager.externalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-externalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE) .getValue(); resource.update() + .withAnnotation("annotation1") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy(new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withOptionBProperties(new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10039")) .withExportRouteTargets(Arrays.asList("65046:10039")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withRouteTargets( + new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") @@ -50,24 +68,25 @@ public static void externalNetworksUpdateMaximumSetGen( .withMtu(1500) .withVlanId(1001) .withPeerAsn(65047L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withEgressAclId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .withAnnotation("annotation1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(13).withThreshold(24).withIdleTimeExpiry(8)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(13).withThreshold(24).withIdleTimeExpiry(8))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1/14").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java index 2591e81c78a1..9c69834432ac 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,16 +13,14 @@ */ public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState.json */ /** - * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void externalNetworksUpdateStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.externalNetworks() .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java index ef740348772b..12a9875333ab 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java @@ -1,21 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -23,9 +32,7 @@ */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Create.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. @@ -36,34 +43,15 @@ public static void internalNetworksCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() .define("example-internalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .withExistingL3IsolationDomain("example-rg", "example-l3isd") .withVlanId(755) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("annotation") - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(10) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(61234L) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) - .withExtension(Extension.NO_EXTENSION)) + .withAnnotation("annotation") + .withExtension(Extension.NO_EXTENSION) .withMtu(1500) .withConnectedIPv4Subnets( Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) .withConnectedIPv6Subnets( Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportIpv6RoutePolicyId( @@ -77,8 +65,34 @@ public static void internalNetworksCreateMaximumSetGen( .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NO_EXTENSION) - .withAnnotation("annotation") + .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::"))) + .withBmpConfiguration( + new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.1")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java index a40ae29420eb..b4b912d12be0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Delete.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class InternalNetworksDeleteSamples { public static void internalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java index 9d536dc50048..307ee0121218 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Get.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. @@ -21,7 +19,7 @@ public final class InternalNetworksGetSamples { public static void internalNetworksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java index cdd7d1381b5b..ae54b484b4f1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class InternalNetworksListByL3IsolationDomainSamples { public static void internalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-l3isd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java index ed2436bb3795..bb13aa3240d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. @@ -25,7 +23,7 @@ public final class InternalNetworksUpdateAdministrativeStateSamples { public static void internalNetworksUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-internalnetwork", + .updateAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..375e416dd600 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; + +/** + * Samples for InternalNetworks UpdateBfdAdministrativeState. + */ +public final class InternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: InternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.internalNetworks() + .updateBfdAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.STATIC) + .withNeighborAddress("10.10.1.10") + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java index 72fc24585b0e..5191b1e6d5c2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java @@ -1,21 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; /** * Samples for InternalNetworks UpdateBgpAdministrativeState. */ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBgpAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. @@ -25,8 +22,9 @@ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() - .updateBgpAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBgpAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkUpdateBgpAdministrativeStateRequest().withNeighborAddress("10.10.10.10") + .withAdministrativeState(BgpAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java index eb15ab5c2d5f..8f935941a132 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java @@ -1,21 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -23,9 +30,7 @@ */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_Update.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. @@ -35,35 +40,15 @@ public final class InternalNetworksUpdateSamples { public static void internalNetworksUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { InternalNetwork resource = manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(10) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(61234L) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.20.20.20/25").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .withAnnotation("annotation") .withMtu(1500) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withConnectedIPv4SubnetsForUpdate( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6SubnetsForUpdate( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withImportIpv6RoutePolicyId( @@ -77,7 +62,31 @@ public static void internalNetworksUpdateMaximumSetGen( .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withAnnotation("annotation") + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.10")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java index b99dc80e0645..4a74e1afd4d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,16 +13,14 @@ */ public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternalNetworks_UpdateStaticRouteBfdAdministrativeState.json */ /** - * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void internalNetworksUpdateStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.internalNetworks() .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java index 9aa3d37d4d1b..736f075b8d33 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -15,9 +17,7 @@ */ public final class InternetGatewayRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Create.json */ /** * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. @@ -30,9 +30,14 @@ public static void internetGatewayRulesCreateMaximumSetGen( .define("example-internetGatewayRule") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withRuleProperties( - new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("10.10.10.10"))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("10.10.10.10")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("11.11.10.11")) + .withSourceAddressList(Arrays.asList("10.10.10.10")) + .withHeaderAddressList(Arrays.asList(new HeaderAddressProperties().withHeaderName("abcHeader") + .withAddressList(Arrays.asList("10.10.10.10"))))) + .withTags(mapOf("KeyID", "fakeTokenPlaceholder")) .withAnnotation("annotationValue") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java index c5846df13129..c236ba1201d0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Delete.json */ /** * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java index 6bf9831fb832..e333058a1a36 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewayRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Get.json */ /** * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java index 701bf4d5adac..b683397b58b5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewayRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_ListByResourceGroup.json */ /** * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java index 7f41c082b054..8118f5190637 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewayRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_ListBySubscription.json */ /** * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java index 56a2b344a87c..8af8b8259515 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class InternetGatewayRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGatewayRules_Update.json */ /** * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. @@ -28,7 +26,7 @@ public static void internetGatewayRulesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3311", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("KeyID", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java index de3bfa76a56b..742dfbd4eafb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class InternetGatewaysCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Create.json */ /** * Sample code: InternetGateways_Create_MaximumSet_Gen. @@ -28,13 +26,14 @@ public static void internetGatewaysCreateMaximumSetGen( .define("example-internetGateway") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTypePropertiesType(GatewayType.INFRASTRUCTURE) .withNetworkFabricControllerId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController") - .withTags(mapOf("key3540", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withInternetGatewayRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") - .withAnnotation("annotation") + .withTypePropertiesType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java index 08a90c1b9454..1c0b0c529ccb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewaysDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Delete.json */ /** * Sample code: InternetGateways_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java index a017f36cc2db..0b05deb995ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Get.json */ /** * Sample code: InternetGateways_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java index c482a7da7846..2f2016fbeee5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_ListByResourceGroup.json */ /** * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java index 9ad2e6f48d0b..7127be18f844 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class InternetGatewaysListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_ListBySubscription.json */ /** * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java index 617b0c403dd9..2091a432b941 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class InternetGatewaysUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/InternetGateways_Update.json */ /** * Sample code: InternetGateways_Update_MaximumSet_Gen. @@ -28,7 +26,7 @@ public static void internetGatewaysUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key81", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withInternetGatewayRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") .apply(); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java index 8475453ea9bb..5a56dab234ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,9 +16,7 @@ */ public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Create.json */ /** * Sample code: IpCommunities_Create_MaximumSet_Gen. @@ -31,11 +29,11 @@ public static void ipCommunitiesCreateMaximumSetGen( .define("example-ipcommunity") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) .withCommunityMembers(Arrays.asList("1:1")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java index c60d0dc7b268..2f8a3af12a4f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Delete.json */ /** * Sample code: IpCommunities_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java index 0dee59622374..7ae6d28e33a0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Get.json */ /** * Sample code: IpCommunities_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java index fd51483ec074..d26b9f58fba6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_ListByResourceGroup.json */ /** * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java index 68303b564f93..c738b7552f51 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_ListBySubscription.json */ /** * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java index c972f6253514..8bdf63a9e9ec 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,15 +9,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for IpCommunities Update. */ public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpCommunities_Update.json */ /** * Sample code: IpCommunities_Update_MaximumSet_Gen. @@ -30,10 +30,23 @@ public static void ipCommunitiesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) .withCommunityMembers(Arrays.asList("1:1")))) .apply(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java index 9ba3bffa5803..001def997e50 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,9 +15,7 @@ */ public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Create.json */ /** * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. @@ -34,7 +32,7 @@ public static void ipExtendedCommunitiesCreateMaximumSetGen( Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withRouteTargets(Arrays.asList("1234:2345")))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java index 363857694b1c..4f74c13d9d23 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Delete.json */ /** * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java index e66a9748ab18..c64d016fcd83 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Get.json */ /** * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java index f49634aa8a51..b0836f1386ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListByResourceGroup.json */ /** * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java index 5e706669a972..4d39f3dbde15 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListBySubscription.json */ /** * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java index 36eaf17af0b1..838c980435d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,9 +16,7 @@ */ public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpExtendedCommunities_Update.json */ /** * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. @@ -32,7 +30,8 @@ public static void ipExtendedCommunitiesUpdateMaximumSetGen( com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withIpExtendedCommunityRules( Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java index f1bc6f473638..6e96853b36d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,9 +16,7 @@ */ public final class IpPrefixesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Create.json */ /** * Sample code: IpPrefixes_Create_MaximumSet_Gen. @@ -31,12 +29,12 @@ public static void ipPrefixesCreateMaximumSetGen( .define("example-ipPrefix") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withNetworkPrefix("10.10.10.10/30") .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) .withSubnetMaskLength("10"))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java index ee7d24698807..27eb2525c0c8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpPrefixesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Delete.json */ /** * Sample code: IpPrefixes_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java index 6628600f2d63..41b87d339473 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Get.json */ /** * Sample code: IpPrefixes_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java index db0731cb0959..9fd0a0b5a2ea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpPrefixesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_ListByResourceGroup.json */ /** * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java index 2674547fae09..f965a43580c2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class IpPrefixesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_ListBySubscription.json */ /** * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java index 30c4c79aa7e5..0d8d075a2fb2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -17,9 +17,7 @@ */ public final class IpPrefixesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/IpPrefixes_Update.json */ /** * Sample code: IpPrefixes_Update_MaximumSet_Gen. @@ -32,13 +30,13 @@ public static void ipPrefixesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withAnnotation("annotation") .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) .withSequenceNumber(4155123341L) .withNetworkPrefix("10.10.10.10/30") .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) .withSubnetMaskLength("10"))) - .withAnnotation("annotation") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java index 91de835f48dd..06b4d281338d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_CommitConfiguration.json */ /** * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java index d7996ccb169e..d373d9508208 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java @@ -1,9 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -12,9 +16,7 @@ */ public final class L2IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Create.json */ /** * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. @@ -30,8 +32,13 @@ public static void l2IsolationDomainsCreateMaximumSetGen( .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") .withVlanId(501) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withMtu(1500) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java index 95cb6bfc3d08..9bd698d04b22 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Delete.json */ /** * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. @@ -20,6 +18,6 @@ public final class L2IsolationDomainsDeleteSamples { */ public static void l2IsolationDomainsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + manager.l2IsolationDomains().delete("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java index 44b6a951d6d1..1bb2725442ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Get.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class L2IsolationDomainsGetByResourceGroupSamples { public static void l2IsolationDomainsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java index 84bd1f25f731..6d49d3a7b966 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java index 079a0d5ff6b5..313c442c697e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ListBySubscription.json */ /** * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java index 6367c9675c21..dad2c708bb48 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,17 @@ */ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L2IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.l2IsolationDomains() - .updateAdministrativeState("example-rg", "example-l2Domain", + .updateAdministrativeState("example-rg", "example-l2domain", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java index 76294e1d2bcf..11b699e563c9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -13,9 +16,7 @@ */ public final class L2IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_Update.json */ /** * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. @@ -25,11 +26,15 @@ public final class L2IsolationDomainsUpdateSamples { public static void l2IsolationDomainsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { L2IsolationDomain resource = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) .withMtu(6000) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withAnnotation("annotation1") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java index 3f39fa640ca0..b4d40e7bd9d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L2IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L2IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java index cb00ebbea646..8fb08a7f3e3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_CommitConfiguration.json */ /** * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java index 4fc6b18135b0..8f866843fc40 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,8 +8,14 @@ import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,9 +25,7 @@ */ public final class L3IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Create.json */ /** * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. @@ -36,19 +40,28 @@ public static void l3IsolationDomainsCreateMaximumSetGen( .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) .withAggregateRouteConfiguration(new AggregateRouteConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) - .withAnnotation("annotation") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy().withExportRoutePolicy(new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withV4routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1000).withThreshold(90)) + .withV6routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1000).withThreshold(90)) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java index fc974dde42f8..542f85d73a1a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Delete.json */ /** * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java index a072c73a1813..9f601c8d1156 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Get.json */ /** * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java index e89746a75f4d..4e0e70d1b1ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java index 3c7f5b7beb2f..f8add5288700 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ListBySubscription.json */ /** * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java index f322baecfa7b..9426b6392359 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,12 +13,10 @@ */ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L3IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java index 13847fd1fdc9..88b85e699e26 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java @@ -1,16 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,9 +27,7 @@ */ public final class L3IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_Update.json */ /** * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. @@ -35,19 +40,29 @@ public static void l3IsolationDomainsUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key4953", "fakeTokenPlaceholder")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .withAnnotation("annotation1") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"))) - .withAnnotation("annotation1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withV4routePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(1000).withThreshold(50)) + .withV6routePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(1000).withThreshold(50)) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java index f58a8b2ec916..cc54afdc91a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class L3IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/L3IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java index 1bace55a77b1..102220f8f34c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,9 +17,7 @@ */ public final class NeighborGroupsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Create.json */ /** * Sample code: NeighborGroups_Create_MaximumSet_Gen. @@ -29,11 +30,13 @@ public static void neighborGroupsCreateMaximumSetGen( .define("example-neighborGroup") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) .withDestination(new NeighborGroupDestination() .withIpv4Addresses(Arrays.asList("10.10.10.10", "20.10.10.10", "30.10.10.10", "40.10.10.10", "50.10.10.10", "60.10.10.10", "70.10.10.10", "80.10.10.10", "90.10.10.10")) .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java index ccab71461dee..6f774266c039 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NeighborGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Delete.json */ /** * Sample code: NeighborGroups_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java index 54b99ea1962b..08ccd46ce266 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NeighborGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Get.json */ /** * Sample code: NeighborGroups_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java index 8b3bc6fdc1e4..59d5d6e2f038 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NeighborGroupsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_ListByResourceGroup.json */ /** * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java index cb48d10100d7..f4a05b71317c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NeighborGroupsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_ListBySubscription.json */ /** * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsResyncSamples.java new file mode 100644 index 000000000000..87b38beeac5f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsResyncSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NeighborGroups Resync. + */ +public final class NeighborGroupsResyncSamples { + /* + * x-ms-original-file: 2025-07-15/NeighborGroups_Resync.json + */ + /** + * Sample code: NeighborGroups_Resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + neighborGroupsResync(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().resync("example-rg", "example-neighborgroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java index 70f727a26047..76b6eb67b743 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java @@ -1,11 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -15,9 +18,7 @@ */ public final class NeighborGroupsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NeighborGroups_Update.json */ /** * Sample code: NeighborGroups_Update_MaximumSet_Gen. @@ -30,12 +31,14 @@ public static void neighborGroupsUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .withDestination(new NeighborGroupDestination() + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .withAnnotation("Updating") + .withDestination(new NeighborGroupDestinationPatch() .withIpv4Addresses(Arrays.asList("10.10.10.10", "20.10.10.10", "30.10.10.10", "40.10.10.10", "50.10.10.10", "60.10.10.10", "70.10.10.10", "80.10.10.10", "90.10.10.10")) .withIpv6Addresses(Arrays.asList("2F::/100"))) - .withAnnotation("Updating") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateSamples.java new file mode 100644 index 000000000000..f52294fea0af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkBootstrapDevices Create. + */ +public final class NetworkBootstrapDevicesCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Create.json + */ + /** + * Sample code: NetworkBootstrapDevices_Create_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesCreateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .define("example-device") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) + .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withNetworkDeviceSku("DeviceSku") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesDeleteSamples.java new file mode 100644 index 000000000000..d1c90afddba3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices Delete. + */ +public final class NetworkBootstrapDevicesDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Delete.json + */ + /** + * Sample code: NetworkBootstrapDevices_Delete_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..d4a8956c6083 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices GetByResourceGroup. + */ +public final class NetworkBootstrapDevicesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Get.json + */ + /** + * Sample code: NetworkBootstrapDevices_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupSamples.java new file mode 100644 index 000000000000..68419ba031ba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices ListByResourceGroup. + */ +public final class NetworkBootstrapDevicesListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListByResourceGroup.json + */ + /** + * Sample code: NetworkBootstrapDevices_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated + * by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkBootstrapDevicesListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListSamples.java new file mode 100644 index 000000000000..4dff07cd9074 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices List. + */ +public final class NetworkBootstrapDevicesListSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListBySubscription.json + */ + /** + * Sample code: NetworkBootstrapDevices_ListBySubscription. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesListBySubscription( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRebootSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRebootSamples.java new file mode 100644 index 000000000000..9fc819e595be --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRebootSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices Reboot. + */ +public final class NetworkBootstrapDevicesRebootSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Reboot.json + */ + /** + * Sample code: NetworkBootstrapDevices_Reboot_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesRebootMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices().reboot("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRefreshConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRefreshConfigurationSamples.java new file mode 100644 index 000000000000..2a71c61b124c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesRefreshConfigurationSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices RefreshConfiguration. + */ +public final class NetworkBootstrapDevicesRefreshConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_RefreshConfiguration.json + */ + /** + * Sample code: NetworkBootstrapDevices_RefreshConfiguration_MaximumSet - generated by [MaximumSet] rule - generated + * by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkBootstrapDevicesRefreshConfigurationMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesResyncPasswordsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesResyncPasswordsSamples.java new file mode 100644 index 000000000000..85b8eae8504c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesResyncPasswordsSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapDevices ResyncPasswords. + */ +public final class NetworkBootstrapDevicesResyncPasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ResyncPasswords.json + */ + /** + * Sample code: Resync the latest passwords to the Network Bootstrap Device. - generated by [MaximumSet] rule - + * generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + resyncTheLatestPasswordsToTheNetworkBootstrapDeviceGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateAdministrativeStateSamples.java new file mode 100644 index 000000000000..70478fcbb60f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateAdministrativeStateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import java.util.Arrays; + +/** + * Samples for NetworkBootstrapDevices UpdateAdministrativeState. + */ +public final class NetworkBootstrapDevicesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkBootstrapDevices_UpdateAdministrativeState_MaximumSet - generated by [MaximumSet] rule - + * generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkBootstrapDevicesUpdateAdministrativeStateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .updateAdministrativeState("example-rg", "example-device", + new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList( + "/Subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device-1")) + .withState(DeviceAdministrativeState.RMA), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateSamples.java new file mode 100644 index 000000000000..3e30717289fd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpdateSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkBootstrapDevices Update. + */ +public final class NetworkBootstrapDevicesUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Update.json + */ + /** + * Sample code: NetworkBootstrapDevices_Update_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkBootstrapDevice resource = manager.networkBootstrapDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpgradeSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpgradeSamples.java new file mode 100644 index 000000000000..bac5beb4f349 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesUpgradeSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; + +/** + * Samples for NetworkBootstrapDevices Upgrade. + */ +public final class NetworkBootstrapDevicesUpgradeSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Upgrade.json + */ + /** + * Sample code: NetworkBootstrapDevices_Upgrade_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapDevicesUpgradeMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapDevices() + .upgrade("example-rg", "example-device", new UpdateVersion().withVersion("1.0"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateSamples.java new file mode 100644 index 000000000000..14a6001ecb1c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapInterfaces Create. + */ +public final class NetworkBootstrapInterfacesCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Create.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_Create_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapInterfacesCreateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .define("example-interface") + .withExistingNetworkBootstrapDevice("example-rg", "example-device") + .withAdditionalDescription("additionalDescription") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withAnnotation("annotation") + .create(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesDeleteSamples.java new file mode 100644 index 000000000000..488c8e791279 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapInterfaces Delete. + */ +public final class NetworkBootstrapInterfacesDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Delete.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_Delete_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapInterfacesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .delete("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetSamples.java new file mode 100644 index 000000000000..06c572a2e9f0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapInterfaces Get. + */ +public final class NetworkBootstrapInterfacesGetSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Get.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_Get_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapInterfacesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceSamples.java new file mode 100644 index 000000000000..702e39671172 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkBootstrapInterfaces ListByNetworkBootstrapDevice. + */ +public final class NetworkBootstrapInterfacesListByNetworkBootstrapDeviceSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice_MaximumSet - generated by [MaximumSet] rule + * - generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkBootstrapInterfacesListByNetworkBootstrapDeviceMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .listByNetworkBootstrapDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateAdministrativeStateSamples.java new file mode 100644 index 000000000000..e157184723bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateAdministrativeStateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** + * Samples for NetworkBootstrapInterfaces UpdateAdministrativeState. + */ +public final class NetworkBootstrapInterfacesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_UpdateAdministrativeState_MaximumSet - generated by [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapInterfacesUpdateAdministrativeStateMaximumSetGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkBootstrapInterfaces() + .updateAdministrativeState("example-rg", "example-device", "example-interface", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateSamples.java new file mode 100644 index 000000000000..90be090ef09d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; + +/** + * Samples for NetworkBootstrapInterfaces Update. + */ +public final class NetworkBootstrapInterfacesUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Update.json + */ + /** + * Sample code: NetworkBootstrapInterfaces_Update_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkBootstrapInterfacesUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkBootstrapInterface resource = manager.networkBootstrapInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSerialNumber("Vendor;Model;HardwareRevisionId;SerialNumber") + .withAnnotation("annotation") + .apply(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java index 855a2eddf350..c3b9199d5716 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDeviceSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDeviceSkus_Get.json */ /** * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java index 2b70a18ee89b..e2904854863f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDeviceSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDeviceSkus_ListBySubscription.json */ /** * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java index 27d4837fcf30..d532e7062a84 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java @@ -1,9 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -12,9 +17,7 @@ */ public final class NetworkDevicesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Create.json */ /** * Sample code: NetworkDevices_Create_MaximumSet_Gen. @@ -27,11 +30,19 @@ public static void networkDevicesCreateMaximumSetGen( .define("example-device") .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withNetworkDeviceSku("DeviceSku") - .withHostname("NFA-Device") .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + new UserAssignedIdentity()))) .withAnnotation("annotation") + .withHostName("NFA-Device") + .withIdentitySelector(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) + .withNetworkDeviceSku("DeviceSku") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java index 9001594e73d8..06de689df04b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Delete.json */ /** * Sample code: NetworkDevices_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java index 4c0eebda5e4c..e04149af7702 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Get.json */ /** * Sample code: NetworkDevices_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java index 1c2663f7ea01..bfac643f9847 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ListByResourceGroup.json */ /** * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java index af78b2622d19..b92af99a64b7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDevicesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_ListBySubscription.json */ /** * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java index 6abc0547a5e5..85befcc4479d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,9 +12,7 @@ */ public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Reboot_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Reboot.json */ /** * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java index aade2601e19e..61ea5f35f7bc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkDevicesRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_RefreshConfiguration.json */ /** * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncCertificatesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncCertificatesSamples.java new file mode 100644 index 000000000000..4d7882738925 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncCertificatesSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkDevices ResyncCertificates. + */ +public final class NetworkDevicesResyncCertificatesSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates.json + */ + /** + * Sample code: Successful certificate resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulCertificateResync( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncCertificates("example-rg", "example-device", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates_Error.json + */ + /** + * Sample code: Error while performing certificate resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void errorWhilePerformingCertificateResync( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncCertificates("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncPasswordsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncPasswordsSamples.java new file mode 100644 index 000000000000..13d0822dc29d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesResyncPasswordsSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkDevices ResyncPasswords. + */ +public final class NetworkDevicesResyncPasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords.json + */ + /** + * Sample code: Successful password resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + successfulPasswordResync(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords_Error.json + */ + /** + * Sample code: Error while performing password resync. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void errorWhilePerformingPasswordResync( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().resyncPasswords("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRoCommandSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRoCommandSamples.java new file mode 100644 index 000000000000..5176ba3f2bd6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRoCommandSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; + +/** + * Samples for NetworkDevices RunRoCommand. + */ +public final class NetworkDevicesRunRoCommandSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_RunRoCommand.json + */ + /** + * Sample code: NetworkDevices_RunRoCommand_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesRunRoCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices() + .runRoCommand("example-rg", "example-device", new DeviceRoCommand().withCommand("show version"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java new file mode 100644 index 000000000000..5dc17a6ecb51 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; + +/** + * Samples for NetworkDevices RunRwCommand. + */ +public final class NetworkDevicesRunRwCommandSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkDevices_RunRwCommand.json + */ + /** + * Sample code: NetworkDevices_RunRwCommand_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesRunRwCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices() + .runRwCommand("example-rg", "example-device", + new DeviceRwCommand().withCommand("show running-config") + .withCommandUrl("https://example.blob.core.windows.net/commands/config.txt"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java index 9edec3d4fd09..b48dd3327b37 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkDevicesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_UpdateAdministrativeState.json */ /** * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java index e35805a4ecb2..796a486e27b8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java @@ -1,10 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -13,9 +18,7 @@ */ public final class NetworkDevicesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Update.json */ /** * Sample code: NetworkDevices_Update_MaximumSet_Gen. @@ -28,10 +31,18 @@ public static void networkDevicesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + new UserAssignedIdentity()))) .withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java index 3a82f37f974d..590fc6ddb8a7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java @@ -1,29 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; /** * Samples for NetworkDevices Upgrade. */ public final class NetworkDevicesUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkDevices_Upgrade.json */ /** - * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. + * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpgradeMaximumSetGen( + public static void networkDevicesUpgradeMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkDevices() - .upgrade("example-rg", "example-device", new UpdateVersion().withVersion("1.0.0"), + .upgrade("rgmanagednetworkfabric", "example-device", + new NetworkDeviceUpgradeRequest().withVersion("1.0.0").withRwDeviceConfigUrl("https://microsoft.com/a"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java index 5842c254b9c8..bc28ad625d28 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java @@ -1,23 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Create. */ public final class NetworkFabricControllersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Create.json */ /** * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. @@ -30,12 +33,10 @@ public static void networkFabricControllersCreateMaximumSetGen( .define("example-networkController") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) - .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) - .withIpv4AddressSpace("172.253.0.0/19") - .withIpv6AddressSpace("::/60") - .withNfcSku(NfcSku.STANDARD) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key4876", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() .withExpressRouteCircuitId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") @@ -44,7 +45,24 @@ public static void networkFabricControllersCreateMaximumSetGen( .withExpressRouteCircuitId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withAnnotation("annotation") + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) + .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD) .create(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java index 24fb925c7c2c..4e591ed56518 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricControllersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Delete.json */ /** * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java index 256cf9003e9f..8e7d3636d34e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricControllersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Get.json */ /** * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java index 611ddacaa4e9..a7666452aaf7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricControllersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListByResourceGroup.json */ /** * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java index d8f613b8cd78..25631ace5838 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricControllersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListBySubscription.json */ /** * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java index ca894713c250..dec9f6a3468b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java @@ -1,21 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Update. */ public final class NetworkFabricControllersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricControllers_Update.json */ /** * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. @@ -28,6 +31,9 @@ public static void networkFabricControllersUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-networkController", com.azure.core.util.Context.NONE) .getValue(); resource.update() + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key1402", new UserAssignedIdentity()))) .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() .withExpressRouteCircuitId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") @@ -38,4 +44,16 @@ public static void networkFabricControllersUpdateMaximumSetGen( .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) .apply(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java index daf0056c7652..c84c1497b718 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricSkus_Get.json */ /** * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java index 6c0c2c72219e..3dffc79938df 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabricSkus_ListBySubscription.json */ /** * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java new file mode 100644 index 000000000000..5b03e95920cf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ArmConfigurationDiff. + */ +public final class NetworkFabricsArmConfigurationDiffSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ArmConfigurationDiff.json + */ + /** + * Sample code: NetworkFabrics_ArmConfigurationDiff_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsArmConfigurationDiffMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().armConfigurationDiff("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java new file mode 100644 index 000000000000..0d378c1c293c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; + +/** + * Samples for NetworkFabrics CommitBatchStatus. + */ +public final class NetworkFabricsCommitBatchStatusSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_CommitBatchStatus.json + */ + /** + * Sample code: NetworkFabrics_CommitBatchStatus_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsCommitBatchStatusMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .commitBatchStatus("example-rg", "example-fabric", + new CommitBatchStatusRequest().withCommitBatchId("batch-id"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java index a85fabf6062d..df65eebad2c4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_CommitConfiguration.json */ /** * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. @@ -20,6 +18,7 @@ public final class NetworkFabricsCommitConfigurationSamples { */ public static void networkFabricsCommitConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + manager.networkFabrics() + .commitConfiguration("example-rg", "example-networkFabric", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java index 13a31eb12217..8d2814cef1df 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java @@ -1,17 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.AuthorizedTransceiverProperties; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,9 +31,7 @@ */ public final class NetworkFabricsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Create.json */ /** * Sample code: NetworkFabrics_Create_MaximumSet_Gen. @@ -47,49 +55,72 @@ public static void networkFabricsCreateMaximumSetGen( .withSerialNumber("123456") .withPrimaryIpv4Prefix("10.0.0.12/30") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") - .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv4Prefix("40.0.0.14/30") .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) .withManagementNetworkConfiguration(new ManagementNetworkConfigurationProperties() .withInfrastructureVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1501) - .withVlanId(3001) - .withPeerAsn(1235L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) - .withPrimaryIpv4Prefix("10.0.0.12/30") + .withOptionBProperties( + new VpnOptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("10.0.0.12/30") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)))) .withWorkloadVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) - .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1500) - .withVlanId(3000) - .withPeerAsn(61234L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withPrimaryIpv4Prefix("10.0.0.14/30") + .withOptionBProperties( + new VpnOptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("10.0.0.14/30") .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withFabricVersion("1.x.x") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") + .withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5))))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withFabricVersion("version1") + .withStorageAccountConfiguration(new StorageAccountConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) .withRackCount(4) .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .withHardwareAlertThreshold(74) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withStorageArrayCount(1) + .withAuthorizedTransceiver( + new AuthorizedTransceiverProperties().withVendor("vendorX").withKey("fakeTokenPlaceholder")) .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java index e148bd096111..4cefba9a6db3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Delete.json */ /** * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java index f7bfdbc535d3..a9ab9918f17f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,12 +9,10 @@ */ public final class NetworkFabricsDeprovisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Deprovision.json */ /** - * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Deprovision_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java new file mode 100644 index 000000000000..22e4347a1c81 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; + +/** + * Samples for NetworkFabrics DiscardCommitBatch. + */ +public final class NetworkFabricsDiscardCommitBatchSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_DiscardCommitBatch.json + */ + /** + * Sample code: NetworkFabrics_DiscardCommitBatch. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsDiscardCommitBatch( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .discardCommitBatch("example-rg", "example-fabric", + new DiscardCommitBatchRequest().withCommitBatchId("batchId1"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java index b16bf5b3939b..567336b8170f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Get.json */ /** * Sample code: NetworkFabrics_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java index b07b6392110b..c1afdc07db69 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsGetTopologySamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_GetTopology_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_GetTopology.json */ /** * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java index fddf1c97b592..31f39d7ab1af 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_ListByResourceGroup.json */ /** * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java index da51d5b7a525..6b5795c6b86e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkFabricsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_ListBySubscription.json */ /** * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java new file mode 100644 index 000000000000..167ef7f3574f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; + +/** + * Samples for NetworkFabrics LockFabric. + */ +public final class NetworkFabricsLockFabricSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_LockFabric.json + */ + /** + * Sample code: NetworkFabrics_LockFabric_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsLockFabricMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .lockFabric("example-rg", "example-networkFabric", + new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.ADMINISTRATIVE) + .withAction(NetworkFabricLockAction.LOCK), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java index f1040c1c34c7..79b2aaf87f0c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,12 +9,10 @@ */ public final class NetworkFabricsProvisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Provision.json */ /** - * Sample code: NetworkFabrics_provision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Provision_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java index be02319168c8..8b8253df792a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,12 +9,10 @@ */ public final class NetworkFabricsRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_RefreshConfiguration.json */ /** - * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. + * Sample code: NetworkFabrics_RefreshConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncCertificatesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncCertificatesSamples.java new file mode 100644 index 000000000000..ffee033b1de2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncCertificatesSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ResyncCertificates. + */ +public final class NetworkFabricsResyncCertificatesSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates.json + */ + /** + * Sample code: Successful certificate resync for all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulCertificateResyncForAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_Error.json + */ + /** + * Sample code: Total failure to resync certificates. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToResyncCertificates( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_PartialSuccess.json + */ + /** + * Sample code: Partial failure to resync certificates for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToResyncCertificatesForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncPasswordsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncPasswordsSamples.java new file mode 100644 index 000000000000..3329d1d9849e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsResyncPasswordsSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ResyncPasswords. + */ +public final class NetworkFabricsResyncPasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_PartialSuccess.json + */ + /** + * Sample code: Partial failure to resync passwords for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToResyncPasswordsForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_Error.json + */ + /** + * Sample code: Total failure to resync passwords. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToResyncPasswords( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords.json + */ + /** + * Sample code: Successful password resync for the Terminal Server and all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulPasswordResyncForTheTerminalServerAndAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().resyncPasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotateCertificatesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotateCertificatesSamples.java new file mode 100644 index 000000000000..1818575d9b9f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotateCertificatesSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics RotateCertificates. + */ +public final class NetworkFabricsRotateCertificatesSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_Error.json + */ + /** + * Sample code: Total failure to rotate certificates. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToRotateCertificates( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_PartialSuccess.json + */ + /** + * Sample code: Partial failure to rotate certificates for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToRotateCertificatesForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates.json + */ + /** + * Sample code: Successful certificate rotation for all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulCertificateRotationForAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotateCertificates("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotatePasswordsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotatePasswordsSamples.java new file mode 100644 index 000000000000..6cfa14d355b4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRotatePasswordsSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics RotatePasswords. + */ +public final class NetworkFabricsRotatePasswordsSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords.json + */ + /** + * Sample code: Successful password rotation for the Terminal Server and all Network Devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void successfulPasswordRotationForTheTerminalServerAndAllNetworkDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_Error.json + */ + /** + * Sample code: Total failure to rotate passwords. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void totalFailureToRotatePasswords( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_PartialSuccess.json + */ + /** + * Sample code: Partial failure to rotate passwords for some devices. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void partialFailureToRotatePasswordsForSomeDevices( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().rotatePasswords("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java index b59993065833..b9e99ff417c0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateInfraManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java index b8db0e9c14a9..1a9f90b9402c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java @@ -1,18 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.QosConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -22,9 +34,25 @@ */ public final class NetworkFabricsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Update_QoS.json + */ + /** + * Sample code: NetworkFabrics_Update_QoS_Enable. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateQoSEnable( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkFabric resource = manager.networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withQosConfiguration(new QosPatchProperties().withQosConfigurationState(QosConfigurationState.ENABLED)) + .apply(); + } + + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_Update.json */ /** * Sample code: NetworkFabrics_Update_MaximumSet_Gen. @@ -37,60 +65,82 @@ public static void networkFabricsUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation1") .withRackCount(6) .withServerCountPerRack(10) .withIpv4Prefix("10.18.0.0/17") .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") .withFabricAsn(12345L) - .withTerminalServerConfiguration( - new NetworkFabricPatchablePropertiesTerminalServerConfiguration().withUsername("username1") - .withPassword("fakeTokenPlaceholder") - .withSerialNumber("1234567") - .withPrimaryIpv4Prefix("10.0.0.12/30") - .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") - .withSecondaryIpv4Prefix("40.0.0.14/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) - .withManagementNetworkConfiguration(new ManagementNetworkConfigurationPatchableProperties() + .withTerminalServerConfiguration(new TerminalServerPatchConfiguration().withUsername("username1") + .withPassword("fakeTokenPlaceholder") + .withSerialNumber("1234567") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration(new ManagementNetworkPatchConfiguration() .withInfrastructureVpnConfiguration(new VpnConfigurationPatchableProperties() .withNetworkToNetworkInterconnectId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(1501) - .withVlanId(3001) - .withPeerAsn(1235L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) - .withPrimaryIpv4Prefix("10.0.0.12/30") + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("10.0.0.12/30") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)))) .withWorkloadVpnConfiguration(new VpnConfigurationPatchableProperties() .withNetworkToNetworkInterconnectId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withOptionBProperties( + new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(1500) - .withVlanId(3000) - .withPeerAsn(61234L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) - .withPrimaryIpv4Prefix("10.0.0.14/30") + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("10.0.0.14/30") .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) - .withAnnotation("annotation1") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") + .withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10))))) + .withStorageAccountConfiguration(new StorageAccountPatchConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withHardwareAlertThreshold(43) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withQosConfiguration(new QosPatchProperties().withQosConfigurationState(QosConfigurationState.ENABLED)) + .withFeatureFlags(Arrays.asList(new FeatureFlagProperties().withFeatureFlagName("uniqueRdConfiguration") + .withFeatureFlagValue("Enabled"))) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java index 0a0c9812981c..98589d4d6b71 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java index 1d7cbb976820..5fc697fc7d29 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,12 +12,10 @@ */ public final class NetworkFabricsUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_Upgrade.json */ /** - * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. + * Sample code: NetworkFabrics_Upgrade_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java index 1ea52e029741..dbbb9050cad3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,9 +12,7 @@ */ public final class NetworkFabricsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkFabrics_ValidateConfiguration.json */ /** * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java new file mode 100644 index 000000000000..84dcea1f4ecf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ViewDeviceConfiguration. + */ +public final class NetworkFabricsViewDeviceConfigurationSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkFabrics_ViewDeviceConfiguration.json + */ + /** + * Sample code: NetworkFabrics_ViewDeviceConfiguration_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsViewDeviceConfigurationMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics() + .viewDeviceConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java index 6787c5e5454b..137e780eab98 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkInterfacesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Create.json */ /** * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. @@ -23,6 +21,7 @@ public static void networkInterfacesCreateMaximumSetGen( manager.networkInterfaces() .define("example-interface") .withExistingNetworkDevice("example-rg", "example-device") + .withAdditionalDescription("device 1") .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java index af7130c9f55d..3bcff316ae71 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Delete.json */ /** * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. @@ -20,6 +18,7 @@ public final class NetworkInterfacesDeleteSamples { */ public static void networkInterfacesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); + manager.networkInterfaces() + .delete("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java index 8a9e3729eb6e..73a224742014 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkInterfacesGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Get.json */ /** * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java index 5396b14fdaf2..bb2e9dcf0fb7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkInterfacesListByNetworkDeviceSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_ListByNetworkDevice.json */ /** * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java index 667e70f47e3f..5de771bcfd1a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_UpdateAdministrativeState.json */ /** * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java index 8bc9962adcd0..c5c00154b35c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,9 +11,7 @@ */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkInterfaces_Update.json */ /** * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. @@ -25,6 +23,6 @@ public static void networkInterfacesUpdateMaximumSetGen( NetworkInterface resource = manager.networkInterfaces() .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("annotation").apply(); + resource.update().withAdditionalDescription("device 1").withAnnotation("annotation").apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java new file mode 100644 index 000000000000..cb26be91ee8e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Create. + */ +public final class NetworkMonitorsCreateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_Create.json + */ + /** + * Sample code: NetworkMonitors_Create. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkMonitorsCreate(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors() + .define("example-monitor") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(62695) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST))) + .withAnnotation("annotation") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java new file mode 100644 index 000000000000..640714298887 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors Delete. + */ +public final class NetworkMonitorsDeleteSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_Delete.json + */ + /** + * Sample code: NetworkMonitors_Delete_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkMonitorsDeleteMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors().delete("rgmanagednetworkfabric", "example-monitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..daeb0af30616 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors GetByResourceGroup. + */ +public final class NetworkMonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_Get.json + */ + /** + * Sample code: NetworkMonitors_Get_MaximumSet. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkMonitorsGetMaximumSet( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java new file mode 100644 index 000000000000..91995eb45b18 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors ListByResourceGroup. + */ +public final class NetworkMonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_ListByResourceGroup.json + */ + /** + * Sample code: NetworkMonitors_ListByResourceGroup. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkMonitorsListByResourceGroup( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java new file mode 100644 index 000000000000..ddeb5950c570 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors List. + */ +public final class NetworkMonitorsListSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_ListBySubscription.json + */ + /** + * Sample code: NetworkMonitors_ListBySubscription. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkMonitorsListBySubscription( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java new file mode 100644 index 000000000000..3ea33e3d1b20 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** + * Samples for NetworkMonitors UpdateAdministrativeState. + */ +public final class NetworkMonitorsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkMonitors_UpdateAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkMonitorsUpdateAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkMonitors() + .updateAdministrativeState("example-rg", "example-monitor", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java new file mode 100644 index 000000000000..4dd675859c44 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Update. + */ +public final class NetworkMonitorsUpdateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkMonitors_Update.json + */ + /** + * Sample code: NetworkMonitors_Update. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void + networkMonitorsUpdate(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkMonitor resource = manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withBmpConfiguration(new BmpConfigurationPatchProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(64685) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java index d2ba6ab1bcd5..a62e86537a71 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -12,9 +15,7 @@ */ public final class NetworkPacketBrokersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Create.json */ /** * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. @@ -29,7 +30,9 @@ public static void networkPacketBrokersCreateMaximumSetGen( .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") - .withTags(mapOf("key2806", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java index 3785ba1d19f5..cc816b5fbd89 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkPacketBrokersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Delete.json */ /** * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java index e0ac80522777..040c2c92a186 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkPacketBrokersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Get.json */ /** * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java index f25e96a233d0..873fa1356a75 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkPacketBrokersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListByResourceGroup.json */ /** * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java index 21508bbf8eb5..833f4a9990de 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkPacketBrokersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListBySubscription.json */ /** * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java index 8160e32d088c..8a4155a2bbf0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -13,9 +16,7 @@ */ public final class NetworkPacketBrokersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Update.json */ /** * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. @@ -28,7 +29,11 @@ public static void networkPacketBrokersUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8772", "fakeTokenPlaceholder")).apply(); + resource.update() + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) + .apply(); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java index 7db1345331b9..2923512f9bb1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Create.json */ /** * Sample code: NetworkRacks_Create_MaximumSet_Gen. @@ -30,7 +28,7 @@ public static void networkRacksCreateMaximumSetGen( .withExistingResourceGroup("example-rg") .withNetworkFabricId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withNetworkRackType(NetworkRackType.AGGREGATE) .withAnnotation("annotation") .create(); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java index 4231ccaa432e..b4410789a94c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Delete.json */ /** * Sample code: NetworkRacks_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java index 3106588c3507..4cce7d88f7ee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Get.json */ /** * Sample code: NetworkRacks_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java index 2059eb1be621..2c18ef881fae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_ListByResourceGroup.json */ /** * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java index cdd3763e0b0d..3a3ca245a856 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkRacksListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_ListBySubscription.json */ /** * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java index a8dda16a49d8..9ea501d29893 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkRacks_Update.json */ /** * Sample code: NetworkRacks_Update_MaximumSet_Gen. @@ -27,7 +25,7 @@ public static void networkRacksUpdateMaximumSetGen( NetworkRack resource = manager.networkRacks() .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("keyID", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java index 1642b5c39835..9b3526e022e8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,20 +8,25 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; @@ -33,9 +38,7 @@ */ public final class NetworkTapRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Create.json */ /** * Sample code: NetworkTapRules_Create_MaximumSet_Gen. @@ -46,12 +49,18 @@ public static void networkTapRulesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkTapRules() .define("example-tapRule") - .withRegion("eastus") + .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.THREE_ZERO) .withConfigurationType(ConfigurationType.FILE) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withTapRulesUrl("https://microsoft.com/a") + .withIdentitySelector(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) .withMatchConfigurations( Arrays .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") @@ -59,12 +68,12 @@ public static void networkTapRulesCreateMaximumSetGen( .withIpAddressType(IpAddressType.IPV4) .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("10")) - .withInnerVlans(Arrays.asList("11-20")) - .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) .withIpGroupNames(Arrays.asList("example-ipGroup"))) .withEncapsulationType(EncapsulationType.NONE) .withPortCondition(new PortCondition() @@ -79,16 +88,17 @@ public static void networkTapRulesCreateMaximumSetGen( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") .withMatchConfigurationName("match1"))))) .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup1") + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("exmaple-vlanGroup").withVlans(Arrays.asList("10", "100-200")))) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays + .asList(new VlanGroupProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup1").withPorts(Arrays.asList("100-200")), - new PortGroupProperties().withName("example-portGroup2") - .withPorts(Arrays.asList("900", "1000-2000")))))) - .withAnnotation("annotation") + new PortGroupProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withPollingIntervalInSeconds(30) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java index fd551e17d49b..0557044daa54 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Delete.json */ /** * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java index 9d21557af7f0..ac5690d89402 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Get.json */ /** * Sample code: NetworkTapRules_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java index 975ea41bb681..429302ec7698 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ListByResourceGroup.json */ /** * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java index 4db834652624..5b004f2c4ca9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ListBySubscription.json */ /** * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java index ddf0db199b3f..629d1e83e0bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Resync.json */ /** * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java index 56d6c8990a65..9e3b91279707 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkTapRulesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_UpdateAdministrativeState.json */ /** * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. @@ -26,7 +24,9 @@ public static void networkTapRulesUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkTapRules() .updateAdministrativeState("example-rg", "example-tapRule", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-tapRule")) + .withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java index be9587005223..13cd7d2b649c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java @@ -1,29 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -33,9 +39,7 @@ */ public final class NetworkTapRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_Update.json */ /** * Sample code: NetworkTapRules_Update_MaximumSet_Gen. @@ -48,44 +52,53 @@ public static void networkTapRulesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .withAnnotation("annotation") .withConfigurationType(ConfigurationType.FILE) .withTapRulesUrl("https://microsoft.com/amdsdx") - .withMatchConfigurations( + .withMatchConfigurationsForUpdate( Arrays - .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") + .asList(new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("config1") .withSequenceNumber(10L) .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() .withProtocolTypes(Arrays.asList("TCP")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("10")) - .withInnerVlans(Arrays.asList("11-20")) - .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) .withIpGroupNames(Arrays.asList("example-ipGroup"))) .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() + .withPortCondition(new PortConditionPatch() .withPortType(PortType.SOURCE_PORT) .withLayer4Protocol(Layer4Protocol.TCP) .withPorts(Arrays.asList("100")) .withPortGroupNames(Arrays.asList("example-portGroup1"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withActions(Arrays.asList(new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) .withTruncate("100") .withIsTimestampEnabled(BooleanEnumProperty.TRUE) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") .withMatchConfigurationName("match1"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("example-ipGroup1") + .withDynamicMatchConfigurationsForUpdate(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("exmaple-vlanGroup").withVlans(Arrays.asList("10", "100-200")))) + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("example-portGroup1").withPorts(Arrays.asList("100-200")))))) - .withAnnotation("annotation") + new PortGroupPatchProperties().withName("example-portGroup").withPorts(Arrays.asList("100-200")))))) + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity")) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java index 3032abf6fafd..807da41fb3cc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapRulesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTapRules_ValidateConfiguration.json */ /** * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java index 8a7cddad039b..3e06cec09d0a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java @@ -1,14 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -18,9 +21,7 @@ */ public final class NetworkTapsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Create.json */ /** * Sample code: NetworkTaps_Create_MaximumSet_Gen. @@ -35,8 +36,7 @@ public static void networkTapsCreateMaximumSetGen( .withExistingResourceGroup("example-rg") .withNetworkPacketBrokerId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") - .withDestinations(Arrays.asList(new NetworkTapPropertiesDestinationsItem() - .withName("example-destinaionName") + .withDestinations(Arrays.asList(new DestinationProperties().withName("example-destinaionName") .withDestinationType(DestinationType.ISOLATION_DOMAIN) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") @@ -45,7 +45,9 @@ public static void networkTapsCreateMaximumSetGen( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) .withDestinationTapRuleId( "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key3673", new UserAssignedIdentity()))) .withPollingType(PollingType.PULL) .withAnnotation("annotation") .create(); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java index b953438844fb..5a8ef8dc3f3b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Delete.json */ /** * Sample code: NetworkTaps_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java index 4f4e5bc927fe..edd58e08cc15 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Get.json */ /** * Sample code: NetworkTaps_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java index 9e4708b1a7c3..af9d08df2f92 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_ListByResourceGroup.json */ /** * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java index d8023cfef2b6..57b95a1163d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_ListBySubscription.json */ /** * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java index ebc36166c0f3..bf55ddf2cc3a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkTapsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Resync.json */ /** * Sample code: NetworkTaps_Resync_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java index f1809f8ff02e..c5348d170d61 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class NetworkTapsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_UpdateAdministrativeState.json */ /** * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java index 0e5669be2ff6..036245284180 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java @@ -1,15 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,9 +22,7 @@ */ public final class NetworkTapsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkTaps_Update.json */ /** * Sample code: NetworkTaps_Update_MaximumSet_Gen. @@ -34,14 +35,16 @@ public static void networkTapsUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key8793", new UserAssignedIdentity()))) .withPollingType(PollingType.PULL) - .withDestinationsForUpdate(Arrays.asList(new NetworkTapPatchableParametersDestinationsItem() - .withName("example-destinaionName") + .withDestinationsForUpdate(Arrays.asList(new DestinationPatchProperties().withName("example-destinaionName") .withDestinationType(DestinationType.ISOLATION_DOMAIN) .withDestinationId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withIsolationDomainProperties(new IsolationDomainPatchProperties() + .withEncapsulation(Encapsulation.NONE) .withNeighborGroupIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) .withDestinationTapRuleId( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java index b7d857549253..6c6687140166 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java @@ -1,18 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -21,9 +27,7 @@ */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Create.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. @@ -34,26 +38,34 @@ public static void networkToNetworkInterconnectsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() .define("example-nni") - .withExistingNetworkFabric("example-rg", "example-fabric") + .withExistingNetworkFabric("example-rg", "example-nf") .withUseOptionB(BooleanEnumProperty.TRUE) .withNniType(NniType.CE) .withIsManagementType(IsManagementType.TRUE) .withLayer2Configuration(new Layer2Configuration().withMtu(1500) .withInterfaces(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("10.0.0.12/30") + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("10.0.0.12/30") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("40.0.0.14/30") .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") .withPeerAsn(61234L) - .withVlanId(1234)) + .withVlanId(1234) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(24)))) .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(25)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.0.0.12/30").withNextHop(Arrays.asList("21.20.20.20")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("3FFE:FFFF:0:CD30::ac/127") - .withNextHop(Arrays.asList("4FFE:FFFF:0:CD30::ac"))))) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays + .asList(new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withImportIpv6RoutePolicyId( @@ -66,6 +78,12 @@ public static void networkToNetworkInterconnectsCreateMaximumSetGen( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("fe08:00/64").withNextHop(Arrays.asList("fe01::1"))))) .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java index 9551faa9bcc8..acecc2db4249 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Delete.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { public static void networkToNetworkInterconnectsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java index b6fea62cfbd9..6b720926abd2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Get.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class NetworkToNetworkInterconnectsGetSamples { public static void networkToNetworkInterconnectsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java index bdf1a07e1c1a..2bbf0ae76105 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_ListByNetworkFabric.json */ /** * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. @@ -21,6 +19,6 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + .listByNetworkFabric("example-rg", "example-nf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java index 718370c648d0..224293bee1d3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,20 +13,20 @@ */ public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() - .updateAdministrativeState("example-rg", "example-fabric", "example-nni", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateAdministrativeState("example-rg", "example-nf", "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList( + "/subscriptions/0000ABCD-0A0B-0000-0000-000000ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-nf/networkToNetworkInterconnects/example-nni")) + .withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..ed7877e69d54 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; + +/** + * Samples for NetworkToNetworkInterconnects UpdateBfdAdministrativeState. + */ +public final class NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_UpdateBfdAdministrativeState. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkToNetworkInterconnects() + .updateBfdAdministrativeState("example-rg", "example-nf", "example-nni", + new NniUpdateBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStSamples.java similarity index 69% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStSamples.java index bcfb5615a827..ccd6fd40caa9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,18 +11,16 @@ /** * Samples for NetworkToNetworkInterconnects UpdateNpbStaticRouteBfdAdministrativeState. */ -public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState { +public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen( + public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.networkToNetworkInterconnects() .updateNpbStaticRouteBfdAdministrativeState("example-rg", "example-fabric", "example-nni", diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java index 9559ee0df73b..5f7b0136a940 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java @@ -1,17 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; /** @@ -19,9 +24,7 @@ */ public final class NetworkToNetworkInterconnectsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Update.json */ /** * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. @@ -31,36 +34,47 @@ public final class NetworkToNetworkInterconnectsUpdateSamples { public static void networkToNetworkInterconnectsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { NetworkToNetworkInterconnect resource = manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withLayer2Configuration(new Layer2Configuration().withMtu(1500) + .withLayer2Configuration(new Layer2ConfigurationPatch().withMtu(1500) .withInterfaces(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("20.0.0.12/29") + .withOptionBLayer3Configuration(new OptionBLayer3ConfigurationPatchProperties() + .withPrimaryIpv4Prefix("20.0.0.12/29") .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.14/29") .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") .withPeerAsn(2345L) - .withVlanId(1235)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(310).withMultiplier(15)) + .withVlanId(1235) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.0.0.11/30").withNextHop(Arrays.asList("21.20.20.10")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("4FFE:FFFF:0:CD30::ac/127") - .withNextHop(Arrays.asList("5FFE:FFFF:0:CD30::ac"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + new StaticRoutePatchProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("fe80::/64").withNextHop(Arrays.asList("fe80::1"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withImportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") .withExportIpv6RoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) .withEgressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .withIngressAclId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withMicroBfdState(MicroBfdState.ENABLED) .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java index c4652ca4247d..0d7269bd5a99 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ListOperations.json + * x-ms-original-file: 2025-07-15/Operations_List.json */ /** - * Sample code: ListOperations. + * Sample code: Operations_List_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void - listOperations(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void operationsListMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java index 59534e7bf1d7..2f52eb1f3f3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_CommitConfiguration.json */ /** * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java index 5eb1f7c14e86..117b756a2f80 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -24,9 +24,7 @@ */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Create.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. @@ -39,20 +37,15 @@ public static void routePoliciesCreateMaximumSetGen( .define("example-routePolicy") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withNetworkFabricId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("annotation") .withSequenceNumber(7L) .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") - .withIpExtendedCommunityIds(Arrays.asList( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) .withAction(new StatementActionProperties().withLocalPreference(20L) .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties(new ActionIpCommunityProperties() @@ -69,7 +62,12 @@ public static void routePoliciesCreateMaximumSetGen( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .withAnnotation("annotation") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withAddressFamilyType(AddressFamilyType.IPV4) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java index 3ed69047ceb5..e15cf0af34fe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Delete.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java index 24d507674960..7379d0760339 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Get.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java index edcaf7804f43..2d550b5493d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ListByResourceGroup.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java index 41a9857df106..ff41c21dee28 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ListBySubscription.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java index e3c6d1bcaba6..6182d455d90e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,9 +13,7 @@ */ public final class RoutePoliciesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_UpdateAdministrativeState.json */ /** * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java index 74d20118d22e..2d848285a33b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -24,9 +24,7 @@ */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_Update.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. @@ -39,27 +37,28 @@ public static void routePoliciesUpdateMaximumSetGen( .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("annotation") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withDefaultAction(CommunityActionTypes.PERMIT) + .withStatementsForUpdate(Arrays.asList(new RoutePolicyStatementPatchProperties() + .withAnnotation("annotation") .withSequenceNumber(7L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList( + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") - .withIpExtendedCommunityIds(Arrays.asList( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) - .withAction(new StatementActionProperties().withLocalPreference(20L) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .withAction(new StatementActionPatchProperties().withLocalPreference(20L) .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java index 3a64d746266e..326b6b881fc4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,9 +9,7 @@ */ public final class RoutePoliciesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-07-15/RoutePolicies_ValidateConfiguration.json */ /** * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java new file mode 100644 index 000000000000..dfd74b518aec --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListActionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListActionPatch model = BinaryData.fromString( + "{\"type\":\"Log\",\"counterName\":\"nphcnzqtpjhmqrh\",\"remarkComment\":\"hlaiwd\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":1965865704110019158,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":1050376246923484687,\"unit\":\"KBytes\"}}}") + .toObject(AccessControlListActionPatch.class); + Assertions.assertEquals(AclActionType.LOG, model.type()); + Assertions.assertEquals("nphcnzqtpjhmqrh", model.counterName()); + Assertions.assertEquals("hlaiwd", model.remarkComment()); + Assertions.assertEquals(1965865704110019158L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(1050376246923484687L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, model.policeRateConfiguration().burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListActionPatch model = new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("nphcnzqtpjhmqrh") + .withRemarkComment("hlaiwd") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(1965865704110019158L).withUnit(BitRateUnit.MBPS)) + .withBurstSize(new BurstSize().withSize(1050376246923484687L).withUnit(BurstSizeUnit.KBYTES))); + model = BinaryData.fromObject(model).toObject(AccessControlListActionPatch.class); + Assertions.assertEquals(AclActionType.LOG, model.type()); + Assertions.assertEquals("nphcnzqtpjhmqrh", model.counterName()); + Assertions.assertEquals("hlaiwd", model.remarkComment()); + Assertions.assertEquals(1965865704110019158L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(1050376246923484687L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, model.policeRateConfiguration().burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java index af3e767dbc09..1d4121cff5b1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java @@ -1,29 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import org.junit.jupiter.api.Assertions; public final class AccessControlListActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AccessControlListAction model = BinaryData.fromString("{\"type\":\"Log\",\"counterName\":\"ulapzwyrp\"}") + AccessControlListAction model = BinaryData.fromString( + "{\"type\":\"Remark\",\"counterName\":\"vokqdzfv\",\"remarkComment\":\"ivjlfrqttbajlka\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":5021220265156889425,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":5236890965900963665,\"unit\":\"Bytes\"}}}") .toObject(AccessControlListAction.class); - Assertions.assertEquals(AclActionType.LOG, model.type()); - Assertions.assertEquals("ulapzwyrp", model.counterName()); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("vokqdzfv", model.counterName()); + Assertions.assertEquals("ivjlfrqttbajlka", model.remarkComment()); + Assertions.assertEquals(5021220265156889425L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(5236890965900963665L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, model.policeRateConfiguration().burstSize().unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListAction model - = new AccessControlListAction().withType(AclActionType.LOG).withCounterName("ulapzwyrp"); + AccessControlListAction model = new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("vokqdzfv") + .withRemarkComment("ivjlfrqttbajlka") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(5021220265156889425L).withUnit(BitRateUnit.MBPS)) + .withBurstSize(new BurstSize().withSize(5236890965900963665L).withUnit(BurstSizeUnit.BYTES))); model = BinaryData.fromObject(model).toObject(AccessControlListAction.class); - Assertions.assertEquals(AclActionType.LOG, model.type()); - Assertions.assertEquals("ulapzwyrp", model.counterName()); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("vokqdzfv", model.counterName()); + Assertions.assertEquals("ivjlfrqttbajlka", model.remarkComment()); + Assertions.assertEquals(5021220265156889425L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(5236890965900963665L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, model.policeRateConfiguration().burstSize().unit()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java index 479ee9f54c31..e8f6c47fc4e1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,13 +11,23 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; @@ -30,228 +40,316 @@ public final class AccessControlListInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListInner model = BinaryData.fromString( - "{\"properties\":{\"lastSyncedTime\":\"2021-03-24T17:54:20Z\",\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"configurationType\":\"Inline\",\"aclsUrl\":\"bczmeh\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"sphrupidgs\",\"sequenceNumber\":5720978843418888179,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"cmsxaobhdxbm\"],\"fragments\":[\"oqjzehtbmufpowno\"],\"ipLengths\":[\"wlrxyb\",\"soqijg\"],\"ttlValues\":[\"bpazlobcufpdzn\",\"btcqq\",\"nq\",\"lhqgnufooojy\"],\"dscpMarkings\":[\"sqe\",\"aagdfmg\",\"zlhjxrifkwmrvkt\",\"izntocipao\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"qucmpo\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"ogknygjofjdd\",\"qs\",\"deupewnwrei\",\"jzyflu\"],\"fragments\":[\"hmofc\"],\"ipLengths\":[\"my\"],\"ttlValues\":[\"dtmlxhekuksjt\",\"ukcdmparcryuanzw\",\"xzdxtayrlhmwh\"],\"dscpMarkings\":[\"rqobmtuk\",\"nryrtihf\",\"tijbpzvgnwzsymgl\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"zk\",\"hdbihan\",\"fhfcb\",\"y\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"hab\"}]},{\"matchConfigurationName\":\"pikxwczbyscnpqxu\",\"sequenceNumber\":3437469293095173263,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"br\"],\"fragments\":[\"dumjgrtfwvuk\"],\"ipLengths\":[\"udccsnhsjc\",\"yejhk\",\"yhtnapczwlokjye\"],\"ttlValues\":[\"vnipjox\",\"jnchgej\",\"podmailzydehojwy\"],\"dscpMarkings\":[\"xinpmqnjaq\",\"ixjsprozvcputeg\",\"vwmf\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"mdvpjhulsu\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"rwfndiod\"},{\"type\":\"Log\",\"counterName\":\"w\"},{\"type\":\"Drop\",\"counterName\":\"vwryoqpso\"}]},{\"matchConfigurationName\":\"ctazakljlahbcryf\",\"sequenceNumber\":5965878792837381583,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"paojakhmsbzjh\",\"rzevdphlxaol\",\"hqtrgqjbpf\"],\"fragments\":[\"inzgvfcj\"],\"ipLengths\":[\"oxxjtfelluwf\",\"it\"],\"ttlValues\":[\"eqfpj\",\"jlxofpdvhpfxxyp\",\"ninmayhuyb\"],\"dscpMarkings\":[\"odepoogin\",\"vamih\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"rxzxtheo\",\"usivye\",\"cciqihnhungbwjz\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"xgispemvtzfkufu\"],\"fragments\":[\"ofx\",\"eofjaeqjh\"],\"ipLengths\":[\"asvm\"],\"ttlValues\":[\"qulngsntnbybkzgc\"],\"dscpMarkings\":[\"clxxwrljdo\",\"skcqvkocrcjd\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"xbnjbiksq\",\"gls\",\"ainqpjwnzlljfm\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"vmgxsab\",\"yqduujit\",\"jczdzevndh\",\"rwpdappdsbdkvwrw\"],\"fragments\":[\"usnhutje\",\"tmrldhugjzzdatq\"],\"ipLengths\":[\"cdgea\"],\"ttlValues\":[\"phut\",\"cndvkaozwyiftyhx\",\"urokft\"],\"dscpMarkings\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"hsgcbacphejkot\",\"nqgoulzndli\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"gfgibm\"],\"fragments\":[\"akeqs\",\"xybz\"],\"ipLengths\":[\"dqytbciqfouflmm\"],\"ttlValues\":[\"smodmgloug\"],\"dscpMarkings\":[\"wtmutduq\",\"ta\",\"spwgcuertumkdosv\",\"whbmd\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"ddgmb\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"tq\"},{\"type\":\"Count\",\"counterName\":\"fpfpsalgbquxigj\"},{\"type\":\"Log\",\"counterName\":\"jaoyfhrtx\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ujysvle\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"awrlyx\",\"jkcpr\",\"nwbxgjvtbvpyssz\"]},{\"name\":\"rujqg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"uqfprwzw\",\"nguitnwuizgazxu\"]}],\"vlanGroups\":[{\"name\":\"ckyfih\",\"vlans\":[\"dfvzwdzuhty\"]},{\"name\":\"isdkfthwxmnteiw\",\"vlans\":[\"vkmijcmmxdcuf\",\"fsrpymzidnse\",\"cxtbzsg\",\"yc\"]}],\"portGroups\":[{\"name\":\"wmdwzjeiachboo\",\"ports\":[\"nrosfqpte\",\"hzzvypyq\"]},{\"name\":\"mzinpvswjdk\",\"ports\":[\"oodqxhcrm\",\"ohjtckw\",\"dsoifiyipj\",\"sqwpgrjb\"]},{\"name\":\"orcjxvsnby\",\"ports\":[\"bnmo\",\"pcyshu\",\"zafb\"]},{\"name\":\"j\",\"ports\":[\"toqcjmklja\",\"bqidtqaj\",\"yulpkudjkr\",\"khbzhfepgzg\"]}]}],\"annotation\":\"xzlocxscp\"},\"location\":\"erhhbcsglumm\",\"tags\":{\"odxobnbdxkqpxok\":\"j\",\"odgmaajrmvdjwz\":\"jionpimexgstxgc\",\"ctbzaq\":\"lovmclwhijcoe\"},\"id\":\"qsycbkbfkgu\",\"name\":\"dkexxppofm\",\"type\":\"axcfjpgddtocjjx\"}") + "{\"properties\":{\"annotation\":\"ijbpzvgnwzsymgl\",\"configurationType\":\"File\",\"aclsUrl\":\"cyzkohdbihanuf\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"s\",\"sequenceNumber\":4240171364940315752,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"ifpikxwczby\",\"cnpqxuhivyqniwby\",\"rkxvdum\"],\"fragments\":[\"tfwvukxgaudc\"],\"ipLengths\":[\"h\",\"jcny\",\"j\"],\"ttlValues\":[\"yhtnapczwlokjye\",\"kkvnipjox\",\"jnchgej\",\"podmailzydehojwy\"],\"dscpMarkings\":[\"xinpmqnjaq\",\"ixjsprozvcputeg\",\"vwmf\"],\"protocolNeighbors\":[\"scmdvpjhulsuu\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"icmpConfiguration\":{},\"protocolTypes\":[\"k\",\"wfndiodjpsl\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Remark\",\"counterName\":\"yoqpsoaccta\",\"remarkComment\":\"kljla\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"ffdfdosygexpa\",\"remarkComment\":\"akhmsbzjhcrz\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"lxaolthqtrgqjbp\",\"remarkComment\":\"fsinzgvfcjrwzoxx\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"luwfzitonpeqfpjk\",\"remarkComment\":\"xofpdvhpfxxypi\",\"policeRateConfiguration\":{}}]},{\"matchConfigurationName\":\"mayhuybbkpodepoo\",\"sequenceNumber\":3846705136776148511,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"ognarxzxtheotus\",\"vyevcciqi\",\"nhungbw\",\"zrnf\"],\"fragments\":[\"gispemvtzfkufubl\",\"ofx\",\"eofjaeqjh\",\"jbasvmsmjqulngs\"],\"ipLengths\":[\"bybkzgcwrwclxx\",\"rljdouskcqv\",\"ocrcjdk\",\"tnhxbn\"],\"ttlValues\":[\"ksqrglssai\",\"qpjwnzlljfm\"],\"dscpMarkings\":[\"ebvmgxsabkyqd\",\"ujitcjcz\",\"zevndhkrwpdappds\"],\"protocolNeighbors\":[\"vwrwj\",\"eusnhutj\",\"ltmrldh\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"icmpConfiguration\":{},\"protocolTypes\":[\"atqxho\",\"dgeablgphu\",\"icndvkaozwyifty\",\"xhurok\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"],\"fragments\":[\"ddhsgcbacphe\",\"koty\",\"qgoulznd\"],\"ipLengths\":[\"wyqkgfgibm\"],\"ttlValues\":[\"akeqs\",\"xybz\"],\"dscpMarkings\":[\"dqytbciqfouflmm\"],\"protocolNeighbors\":[\"smodmgloug\"],\"portCondition\":{\"layer4Protocol\":\"SCTP\"},\"icmpConfiguration\":{},\"protocolTypes\":[\"utduqktapspwgcu\",\"rtumkdosvq\",\"hbmdgbbjfdd\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"pbhtqqrolfpfpsa\",\"remarkComment\":\"bquxigjy\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"o\",\"remarkComment\":\"hr\",\"policeRateConfiguration\":{}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"kujysvlejuvfq\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"xwjkcprbnwbxg\",\"vtb\"]},{\"name\":\"ysszdnrujqguh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"f\",\"rwzwbng\",\"itnwuizgazxufi\"]}],\"vlanGroups\":[{\"name\":\"y\",\"vlans\":[\"rfidfvzwdz\"]},{\"name\":\"tymw\",\"vlans\":[\"kfthwxmntei\",\"aop\",\"km\"]}],\"portGroups\":[{\"name\":\"mxdcufufsrp\",\"ports\":[\"idnsezcxtb\",\"sgfyccsnew\",\"dwzjeiach\",\"oosflnr\"]}]},{\"ipGroups\":[{\"name\":\"pteehzzv\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"i\"]},{\"name\":\"inpvswjdkirsoodq\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nohjt\"]}],\"vlanGroups\":[{\"name\":\"dsoifiyipj\",\"vlans\":[\"wpgrjbzno\",\"cjxvsnbyxqab\",\"mocpc\"]},{\"name\":\"hurzafblj\",\"vlans\":[\"btoqcjmkljavbqid\",\"qajzyulpkudjkr\",\"khbzhfepgzg\"]},{\"name\":\"xzlocxscp\",\"vlans\":[\"rhhbcs\",\"l\",\"mmajtjaodx\"]}],\"portGroups\":[{\"name\":\"dxkqpx\",\"ports\":[\"jionpimexgstxgc\",\"odgmaajrmvdjwz\",\"lovmclwhijcoe\",\"ctbzaq\"]},{\"name\":\"sycbkbfk\",\"ports\":[\"dkexxppofm\",\"axcfjpgddtocjjx\"]}]},{\"ipGroups\":[{\"name\":\"o\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"zxibqeoj\",\"xqbzvddntwnd\",\"icbtwnpzao\",\"vuhrhcffcyddgl\"]},{\"name\":\"t\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"pyeicxm\",\"ciwqvhk\",\"ixuigdtopbobj\",\"ghmewuam\"]},{\"name\":\"hrzayvvtpgvdf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ftutqxlngxlefgu\",\"nxkrx\",\"qmi\",\"tthzrvqd\"]}],\"vlanGroups\":[{\"name\":\"jybige\",\"vlans\":[\"fbowskanyk\",\"zlcuiywgqywgndrv\"]}],\"portGroups\":[{\"name\":\"gpphrcgyn\",\"ports\":[\"pec\",\"vmmcoofs\",\"lzevgbmqjqab\",\"y\"]},{\"name\":\"ivkwlzuvccfwnfnb\",\"ports\":[\"ionle\",\"x\"]},{\"name\":\"qgtz\",\"ports\":[\"nqbqqwxr\",\"feallnwsu\",\"isnjampmngnz\"]},{\"name\":\"xaqwoochcbonqv\",\"ports\":[\"lrxnjeaseiphe\",\"f\",\"okeyyienj\",\"dlwtgrhpdj\"]}]},{\"ipGroups\":[{\"name\":\"asxazjpqyegualhb\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jzzvdud\"]},{\"name\":\"dslfhotwmcy\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"jnpg\",\"cftadeh\"]},{\"name\":\"ltyfsop\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"snzwd\",\"jbavorxzdm\"]}],\"vlanGroups\":[{\"name\":\"bqvudwxdndn\",\"vlans\":[\"gujjugwdkcglh\"]},{\"name\":\"azjdyggd\",\"vlans\":[\"xhbkuofq\",\"e\",\"kh\",\"enevfyexfwhybci\"]},{\"name\":\"yvdcsitynnaa\",\"vlans\":[\"ctehfiqscjey\",\"vhezrkgqhcj\"]}],\"portGroups\":[{\"name\":\"vgmkqsleyyvxyqjp\",\"ports\":[\"t\",\"pngjcrcczsqpjhvm\",\"ajvnysounqe\",\"a\"]},{\"name\":\"ae\",\"ports\":[\"hy\",\"ltrpmopj\",\"cma\",\"u\"]},{\"name\":\"thfuiuaodsfcpkvx\",\"ports\":[\"uozmyzydagfua\",\"bezy\",\"uokktwhrdxwz\"]},{\"name\":\"q\",\"ports\":[\"surex\",\"moryocfsfksym\",\"dystkiiuxhqyud\"]}]}],\"lastSyncedTime\":\"2021-08-19T10:45:17Z\",\"aclType\":\"ControlPlaneAcl\",\"deviceRole\":\"ManagementSwitch\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"i\"},\"networkFabricIds\":[\"vkd\",\"jsllrmv\",\"d\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ulexxbczwtr\",\"sequenceNumber\":4653794584543146117,\"matchCondition\":{},\"action\":{}}]},{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"vmyokacspkwl\",\"sequenceNumber\":5139829340936738511,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"jmflbvvnch\",\"sequenceNumber\":3490424163698610193,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"zjuqkhrsaj\",\"sequenceNumber\":1238681526564705701,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"skghsauuimj\",\"sequenceNumber\":5129594388409222078,\"matchCondition\":{},\"action\":{}}]}],\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"rrfbyaosvexcson\",\"tags\":{\"eggzfb\":\"hocohslkev\",\"ithlvmezyvshxm\":\"hfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"}") .toObject(AccessControlListInner.class); - Assertions.assertEquals("erhhbcsglumm", model.location()); - Assertions.assertEquals("j", model.tags().get("odxobnbdxkqpxok")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("bczmeh", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("sphrupidgs", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(5720978843418888179L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rrfbyaosvexcson", model.location()); + Assertions.assertEquals("hocohslkev", model.tags().get("eggzfb")); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); + Assertions.assertEquals("cyzkohdbihanuf", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("s", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4240171364940315752L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("qucmpo", + Assertions.assertEquals("k", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("cmsxaobhdxbm", + Assertions.assertEquals("ifpikxwczby", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("oqjzehtbmufpowno", + Assertions.assertEquals("tfwvukxgaudc", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("wlrxyb", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("bpazlobcufpdzn", + Assertions.assertEquals("h", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("yhtnapczwlokjye", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("sqe", + Assertions.assertEquals("xinpmqnjaq", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("scmdvpjhulsuu", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(Layer4Protocol.TCP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.COUNT, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("hab", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ujysvle", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("yoqpsoaccta", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("kljla", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("kujysvlejuvfq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("awrlyx", + Assertions.assertEquals("xwjkcprbnwbxg", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ckyfih", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dfvzwdzuhty", + Assertions.assertEquals("y", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("rfidfvzwdz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wmdwzjeiachboo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nrosfqpte", + Assertions.assertEquals("mxdcufufsrp", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("idnsezcxtb", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("xzlocxscp", model.annotation()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, model.aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("ulexxbczwtr", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4653794584543146117L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListInner model - = new AccessControlListInner().withLocation("erhhbcsglumm") - .withTags(mapOf("odxobnbdxkqpxok", "j", "odgmaajrmvdjwz", "jionpimexgstxgc", "ctbzaq", "lovmclwhijcoe")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("bczmeh") - .withDefaultAction(CommunityActionTypes.DENY) + = new AccessControlListInner().withLocation("rrfbyaosvexcson") + .withTags(mapOf("eggzfb", "hocohslkev", "ithlvmezyvshxm", "hfmvfaxkffe", "gigr", "sbbzo")) + .withAnnotation("ijbpzvgnwzsymgl") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("cyzkohdbihanuf") + .withDefaultAction(CommunityActionTypes.PERMIT) .withMatchConfigurations( - Arrays - .asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("sphrupidgs") - .withSequenceNumber(5720978843418888179L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("qucmpo")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("cmsxaobhdxbm")) - .withFragments(Arrays.asList("oqjzehtbmufpowno")) - .withIpLengths(Arrays.asList("wlrxyb", "soqijg")) - .withTtlValues(Arrays.asList("bpazlobcufpdzn", "btcqq", "nq", "lhqgnufooojy")) - .withDscpMarkings( - Arrays.asList("sqe", "aagdfmg", "zlhjxrifkwmrvkt", "izntocipao")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("zk", "hdbihan", "fhfcb", "y")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("ogknygjofjdd", "qs", "deupewnwrei", "jzyflu")) - .withFragments(Arrays.asList("hmofc")) - .withIpLengths(Arrays.asList("my")) - .withTtlValues( - Arrays.asList("dtmlxhekuksjt", "ukcdmparcryuanzw", "xzdxtayrlhmwh")) - .withDscpMarkings(Arrays.asList("rqobmtuk", "nryrtihf", "tijbpzvgnwzsymgl")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("hab"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("pikxwczbyscnpqxu") - .withSequenceNumber(3437469293095173263L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("mdvpjhulsu")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("br")) - .withFragments(Arrays.asList("dumjgrtfwvuk")) - .withIpLengths(Arrays.asList("udccsnhsjc", "yejhk", "yhtnapczwlokjye")) - .withTtlValues(Arrays.asList("vnipjox", "jnchgej", "podmailzydehojwy")) - .withDscpMarkings(Arrays.asList("xinpmqnjaq", "ixjsprozvcputeg", "vwmf")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions( - Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("rwfndiod"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("w"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("vwryoqpso"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("ctazakljlahbcryf") - .withSequenceNumber(5965878792837381583L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("rxzxtheo", "usivye", "cciqihnhungbwjz")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes( - Arrays.asList("paojakhmsbzjh", "rzevdphlxaol", "hqtrgqjbpf")) - .withFragments(Arrays.asList("inzgvfcj")) - .withIpLengths(Arrays.asList("oxxjtfelluwf", "it")) - .withTtlValues(Arrays.asList("eqfpj", "jlxofpdvhpfxxyp", "ninmayhuyb")) - .withDscpMarkings(Arrays.asList("odepoogin", "vamih")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("xbnjbiksq", "gls", "ainqpjwnzlljfm")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("xgispemvtzfkufu")) - .withFragments(Arrays.asList("ofx", "eofjaeqjh")) - .withIpLengths(Arrays.asList("asvm")) - .withTtlValues(Arrays.asList("qulngsntnbybkzgc")) - .withDscpMarkings(Arrays.asList("clxxwrljdo", "skcqvkocrcjd")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("hsgcbacphejkot", "nqgoulzndli")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays - .asList("vmgxsab", "yqduujit", "jczdzevndh", "rwpdappdsbdkvwrw")) - .withFragments(Arrays.asList("usnhutje", "tmrldhugjzzdatq")) - .withIpLengths(Arrays.asList("cdgea")) - .withTtlValues(Arrays.asList("phut", "cndvkaozwyiftyhx", "urokft")) - .withDscpMarkings(Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ddgmb")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("gfgibm")) - .withFragments(Arrays.asList("akeqs", "xybz")) - .withIpLengths(Arrays.asList("dqytbciqfouflmm")) - .withTtlValues(Arrays.asList("smodmgloug")) - .withDscpMarkings( - Arrays.asList("wtmutduq", "ta", "spwgcuertumkdosv", "whbmd")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("tq"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("fpfpsalgbquxigj"), - new AccessControlListAction().withType(AclActionType.LOG) - .withCounterName("jaoyfhrtx"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ujysvle") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("awrlyx", "jkcpr", "nwbxgjvtbvpyssz")), - new IpGroupProperties().withName("rujqg") + Arrays.asList( + new AccessControlListMatchConfiguration().withMatchConfigurationName("s") + .withSequenceNumber(4240171364940315752L) .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("uqfprwzw", "nguitnwuizgazxu")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ckyfih").withVlans(Arrays.asList("dfvzwdzuhty")), - new VlanGroupProperties().withName("isdkfthwxmnteiw") - .withVlans(Arrays.asList("vkmijcmmxdcuf", "fsrpymzidnse", "cxtbzsg", "yc")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("wmdwzjeiachboo") - .withPorts(Arrays.asList("nrosfqpte", "hzzvypyq")), - new PortGroupProperties() - .withName("mzinpvswjdk") - .withPorts(Arrays.asList("oodqxhcrm", "ohjtckw", "dsoifiyipj", "sqwpgrjb")), - new PortGroupProperties().withName("orcjxvsnby") - .withPorts(Arrays.asList("bnmo", "pcyshu", "zafb")), - new PortGroupProperties().withName("j") - .withPorts(Arrays.asList("toqcjmklja", "bqidtqaj", "yulpkudjkr", "khbzhfepgzg")))))) - .withAnnotation("xzlocxscp"); + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("k", "wfndiodjpsl")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes(Arrays.asList("ifpikxwczby", "cnpqxuhivyqniwby", "rkxvdum")) + .withFragments(Arrays.asList("tfwvukxgaudc")) + .withIpLengths(Arrays.asList("h", "jcny", "j")) + .withTtlValues( + Arrays.asList("yhtnapczwlokjye", "kkvnipjox", "jnchgej", "podmailzydehojwy")) + .withDscpMarkings(Arrays.asList("xinpmqnjaq", "ixjsprozvcputeg", "vwmf")) + .withProtocolNeighbors(Arrays.asList("scmdvpjhulsuu")) + .withPortCondition( + new AccessControlListPortCondition().withLayer4Protocol(Layer4Protocol.TCP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()))) + .withActions(Arrays.asList( + new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("yoqpsoaccta") + .withRemarkComment("kljla") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("ffdfdosygexpa") + .withRemarkComment("akhmsbzjhcrz") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("lxaolthqtrgqjbp") + .withRemarkComment("fsinzgvfcjrwzoxx") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("luwfzitonpeqfpjk") + .withRemarkComment("xofpdvhpfxxypi") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("mayhuybbkpodepoo") + .withSequenceNumber(3846705136776148511L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new AccessControlListMatchCondition() + .withProtocolTypes( + Arrays.asList("atqxho", "dgeablgphu", "icndvkaozwyifty", "xhurok")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes(Arrays.asList("ognarxzxtheotus", "vyevcciqi", "nhungbw", "zrnf")) + .withFragments( + Arrays.asList("gispemvtzfkufubl", "ofx", "eofjaeqjh", "jbasvmsmjqulngs")) + .withIpLengths(Arrays.asList("bybkzgcwrwclxx", "rljdouskcqv", "ocrcjdk", "tnhxbn")) + .withTtlValues(Arrays.asList("ksqrglssai", "qpjwnzlljfm")) + .withDscpMarkings(Arrays.asList("ebvmgxsabkyqd", "ujitcjcz", "zevndhkrwpdappds")) + .withProtocolNeighbors(Arrays.asList("vwrwj", "eusnhutj", "ltmrldh")) + .withPortCondition( + new AccessControlListPortCondition().withLayer4Protocol(Layer4Protocol.UDP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("utduqktapspwgcu", "rtumkdosvq", "hbmdgbbjfdd")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes(Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy")) + .withFragments(Arrays.asList("ddhsgcbacphe", "koty", "qgoulznd")) + .withIpLengths(Arrays.asList("wyqkgfgibm")) + .withTtlValues(Arrays.asList("akeqs", "xybz")) + .withDscpMarkings(Arrays.asList("dqytbciqfouflmm")) + .withProtocolNeighbors(Arrays.asList("smodmgloug")) + .withPortCondition( + new AccessControlListPortCondition().withLayer4Protocol(Layer4Protocol.SCTP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()))) + .withActions(Arrays.asList( + new AccessControlListAction().withType(AclActionType.DROP) + .withCounterName("pbhtqqrolfpfpsa") + .withRemarkComment("bquxigjy") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("o") + .withRemarkComment("hr") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()))))) + .withDynamicMatchConfigurations( + Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("kujysvlejuvfq") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("xwjkcprbnwbxg", "vtb")), + new IpGroupProperties().withName("ysszdnrujqguh") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("f", "rwzwbng", "itnwuizgazxufi")))) + .withVlanGroups(Arrays + .asList(new VlanGroupProperties().withName("y").withVlans(Arrays.asList("rfidfvzwdz")), + new VlanGroupProperties().withName("tymw") + .withVlans(Arrays.asList("kfthwxmntei", "aop", "km")))) + .withPortGroups(Arrays.asList(new PortGroupProperties().withName("mxdcufufsrp") + .withPorts(Arrays.asList("idnsezcxtb", "sgfyccsnew", "dwzjeiach", "oosflnr")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("pteehzzv") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("i")), + new IpGroupProperties().withName("inpvswjdkirsoodq") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("nohjt")))) + .withVlanGroups(Arrays + .asList( + new VlanGroupProperties().withName("dsoifiyipj") + .withVlans(Arrays.asList("wpgrjbzno", "cjxvsnbyxqab", "mocpc")), + new VlanGroupProperties().withName("hurzafblj") + .withVlans(Arrays.asList("btoqcjmkljavbqid", "qajzyulpkudjkr", "khbzhfepgzg")), + new VlanGroupProperties().withName("xzlocxscp") + .withVlans(Arrays.asList("rhhbcs", "l", "mmajtjaodx")))) + .withPortGroups(Arrays + .asList( + new PortGroupProperties().withName("dxkqpx") + .withPorts(Arrays.asList("jionpimexgstxgc", "odgmaajrmvdjwz", "lovmclwhijcoe", + "ctbzaq")), + new PortGroupProperties().withName("sycbkbfk") + .withPorts(Arrays.asList("dkexxppofm", "axcfjpgddtocjjx")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("o") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes( + Arrays.asList("zxibqeoj", "xqbzvddntwnd", "icbtwnpzao", "vuhrhcffcyddgl")), + new IpGroupProperties().withName("t") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("pyeicxm", "ciwqvhk", "ixuigdtopbobj", "ghmewuam")), + new IpGroupProperties().withName("hrzayvvtpgvdf") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("ftutqxlngxlefgu", "nxkrx", "qmi", "tthzrvqd")))) + .withVlanGroups(Arrays + .asList(new VlanGroupProperties().withName("jybige") + .withVlans(Arrays.asList("fbowskanyk", "zlcuiywgqywgndrv")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("gpphrcgyn") + .withPorts(Arrays.asList("pec", "vmmcoofs", "lzevgbmqjqab", "y")), + new PortGroupProperties().withName("ivkwlzuvccfwnfnb") + .withPorts(Arrays.asList("ionle", "x")), + new PortGroupProperties().withName("qgtz") + .withPorts(Arrays.asList("nqbqqwxr", "feallnwsu", "isnjampmngnz")), + new PortGroupProperties() + .withName("xaqwoochcbonqv") + .withPorts(Arrays.asList("lrxnjeaseiphe", "f", "okeyyienj", "dlwtgrhpdj")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("asxazjpqyegualhb") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("jzzvdud")), + new IpGroupProperties().withName("dslfhotwmcy") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("jnpg", "cftadeh")), + new IpGroupProperties().withName("ltyfsop") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("snzwd", "jbavorxzdm")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("bqvudwxdndn") + .withVlans(Arrays.asList("gujjugwdkcglh")), + new VlanGroupProperties().withName("azjdyggd") + .withVlans(Arrays.asList("xhbkuofq", "e", "kh", "enevfyexfwhybci")), + new VlanGroupProperties().withName("yvdcsitynnaa") + .withVlans(Arrays.asList("ctehfiqscjey", "vhezrkgqhcj")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("vgmkqsleyyvxyqjp") + .withPorts(Arrays.asList("t", "pngjcrcczsqpjhvm", "ajvnysounqe", "a")), + new PortGroupProperties().withName("ae") + .withPorts(Arrays.asList("hy", "ltrpmopj", "cma", "u")), + new PortGroupProperties().withName("thfuiuaodsfcpkvx") + .withPorts(Arrays.asList("uozmyzydagfua", "bezy", "uokktwhrdxwz")), + new PortGroupProperties().withName("q") + .withPorts(Arrays.asList("surex", "moryocfsfksym", "dystkiiuxhqyud")))))) + .withAclType(AclType.CONTROL_PLANE_ACL) + .withDeviceRole(DeviceRole.MANAGEMENT_SWITCH) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.FALSE)) + .withControlPlaneAclConfiguration(Arrays + .asList( + new ControlPlaneAclProperties() + .withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations( + Arrays.asList(new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("ulexxbczwtr") + .withSequenceNumber(4653794584543146117L) + .withMatchCondition(new ControlPlaneAclMatchCondition()) + .withAction(new ControlPlaneAclAction()))), + new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("vmyokacspkwl") + .withSequenceNumber(5139829340936738511L) + .withMatchCondition(new ControlPlaneAclMatchCondition()) + .withAction(new ControlPlaneAclAction()), + new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("jmflbvvnch") + .withSequenceNumber(3490424163698610193L) + .withMatchCondition(new ControlPlaneAclMatchCondition()) + .withAction(new ControlPlaneAclAction()), + new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("zjuqkhrsaj") + .withSequenceNumber(1238681526564705701L) + .withMatchCondition(new ControlPlaneAclMatchCondition()) + .withAction(new ControlPlaneAclAction()), + new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("skghsauuimj") + .withSequenceNumber(5129594388409222078L) + .withMatchCondition(new ControlPlaneAclMatchCondition()) + .withAction(new ControlPlaneAclAction()))))); model = BinaryData.fromObject(model).toObject(AccessControlListInner.class); - Assertions.assertEquals("erhhbcsglumm", model.location()); - Assertions.assertEquals("j", model.tags().get("odxobnbdxkqpxok")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("bczmeh", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("sphrupidgs", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(5720978843418888179L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rrfbyaosvexcson", model.location()); + Assertions.assertEquals("hocohslkev", model.tags().get("eggzfb")); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); + Assertions.assertEquals("cyzkohdbihanuf", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("s", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4240171364940315752L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("qucmpo", + Assertions.assertEquals("k", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("cmsxaobhdxbm", + Assertions.assertEquals("ifpikxwczby", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("oqjzehtbmufpowno", + Assertions.assertEquals("tfwvukxgaudc", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("wlrxyb", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("bpazlobcufpdzn", + Assertions.assertEquals("h", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("yhtnapczwlokjye", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("sqe", + Assertions.assertEquals("xinpmqnjaq", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("scmdvpjhulsuu", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(Layer4Protocol.TCP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.COUNT, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("hab", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ujysvle", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("yoqpsoaccta", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("kljla", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("kujysvlejuvfq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("awrlyx", + Assertions.assertEquals("xwjkcprbnwbxg", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ckyfih", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dfvzwdzuhty", + Assertions.assertEquals("y", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("rfidfvzwdz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wmdwzjeiachboo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nrosfqpte", + Assertions.assertEquals("mxdcufufsrp", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("idnsezcxtb", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("xzlocxscp", model.annotation()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, model.aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("ulexxbczwtr", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4653794584543146117L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java new file mode 100644 index 000000000000..1169bbc84d4d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListMatchConditionPatch model = BinaryData.fromString( + "{\"etherTypes\":[\"qbawpcbbnzqcykn\",\"p\"],\"fragments\":[\"yuicdhzbdy\",\"wwgbdv\"],\"ipLengths\":[\"dmhm\",\"ffplfmuvapckcc\"],\"ttlValues\":[\"weyoxoy\"],\"dscpMarkings\":[\"phaimmoi\"],\"portCondition\":{\"flags\":[\"oshbragapyy\",\"mfsvbpav\",\"opfppdbwnupgah\",\"kuma\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"dmmcpugmehqep\",\"u\"],\"portGroupNames\":[\"zeh\"]},\"protocolNeighbors\":[\"oqhnlb\",\"nbldxeaclgschori\"],\"icmpConfiguration\":{\"icmpTypes\":[\"r\"]},\"protocolTypes\":[\"ucsofldpuviyf\"],\"vlanMatchCondition\":{\"vlans\":[\"eolhbhlvbmx\",\"qi\"],\"innerVlans\":[\"tkcudfbsfarfsiow\",\"kjxnqpvwgfstmhq\",\"kizmdksaoafclu\"],\"vlanGroupNames\":[\"xmycjimryvwgcw\",\"pbmz\",\"w\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"fo\"],\"ipGroupNames\":[\"bvopwndyqle\",\"llklmtk\",\"lowkxxpvb\",\"dfjmzsyzfhotlh\"]}}") + .toObject(AccessControlListMatchConditionPatch.class); + Assertions.assertEquals("ucsofldpuviyf", model.protocolTypes().get(0)); + Assertions.assertEquals("eolhbhlvbmx", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("tkcudfbsfarfsiow", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("xmycjimryvwgcw", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("fo", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("bvopwndyqle", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("qbawpcbbnzqcykn", model.etherTypes().get(0)); + Assertions.assertEquals("yuicdhzbdy", model.fragments().get(0)); + Assertions.assertEquals("dmhm", model.ipLengths().get(0)); + Assertions.assertEquals("weyoxoy", model.ttlValues().get(0)); + Assertions.assertEquals("phaimmoi", model.dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("dmmcpugmehqep", model.portCondition().ports().get(0)); + Assertions.assertEquals("zeh", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("oshbragapyy", model.portCondition().flags().get(0)); + Assertions.assertEquals("oqhnlb", model.protocolNeighbors().get(0)); + Assertions.assertEquals("r", model.icmpConfiguration().icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListMatchConditionPatch model + = new AccessControlListMatchConditionPatch().withProtocolTypes(Arrays.asList("ucsofldpuviyf")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("eolhbhlvbmx", "qi")) + .withInnerVlans(Arrays.asList("tkcudfbsfarfsiow", "kjxnqpvwgfstmhq", "kizmdksaoafclu")) + .withVlanGroupNames(Arrays.asList("xmycjimryvwgcw", "pbmz", "w"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("fo")) + .withIpGroupNames(Arrays.asList("bvopwndyqle", "llklmtk", "lowkxxpvb", "dfjmzsyzfhotlh"))) + .withEtherTypes(Arrays.asList("qbawpcbbnzqcykn", "p")) + .withFragments(Arrays.asList("yuicdhzbdy", "wwgbdv")) + .withIpLengths(Arrays.asList("dmhm", "ffplfmuvapckcc")) + .withTtlValues(Arrays.asList("weyoxoy")) + .withDscpMarkings(Arrays.asList("phaimmoi")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("dmmcpugmehqep", "u")) + .withPortGroupNames(Arrays.asList("zeh")) + .withFlags(Arrays.asList("oshbragapyy", "mfsvbpav", "opfppdbwnupgah", "kuma"))) + .withProtocolNeighbors(Arrays.asList("oqhnlb", "nbldxeaclgschori")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("r"))); + model = BinaryData.fromObject(model).toObject(AccessControlListMatchConditionPatch.class); + Assertions.assertEquals("ucsofldpuviyf", model.protocolTypes().get(0)); + Assertions.assertEquals("eolhbhlvbmx", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("tkcudfbsfarfsiow", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("xmycjimryvwgcw", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("fo", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("bvopwndyqle", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("qbawpcbbnzqcykn", model.etherTypes().get(0)); + Assertions.assertEquals("yuicdhzbdy", model.fragments().get(0)); + Assertions.assertEquals("dmhm", model.ipLengths().get(0)); + Assertions.assertEquals("weyoxoy", model.ttlValues().get(0)); + Assertions.assertEquals("phaimmoi", model.dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("dmmcpugmehqep", model.portCondition().ports().get(0)); + Assertions.assertEquals("zeh", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("oshbragapyy", model.portCondition().flags().get(0)); + Assertions.assertEquals("oqhnlb", model.protocolNeighbors().get(0)); + Assertions.assertEquals("r", model.icmpConfiguration().icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java index 8d8b2349a250..2321938c9210 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; import com.azure.resourcemanager.managednetworkfabric.models.PortType; @@ -20,67 +21,74 @@ public final class AccessControlListMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListMatchCondition model = BinaryData.fromString( - "{\"etherTypes\":[\"pmguaadraufac\",\"kahzo\",\"ajjziuxxpshne\",\"kulfg\"],\"fragments\":[\"ubkwdle\",\"rds\"],\"ipLengths\":[\"jbazpjuohminy\",\"lnorwmdu\",\"wpklvxw\",\"ygdxpgpqchis\"],\"ttlValues\":[\"nnbj\",\"rxgibbd\"],\"dscpMarkings\":[\"onfo\",\"auorsukokw\",\"qplhlvnu\"],\"portCondition\":{\"flags\":[\"lrphwzsoldw\",\"yuqdu\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wrbiorkt\",\"lywjhh\"],\"portGroupNames\":[\"hxmsivfo\",\"iloxggdufiq\"]},\"protocolTypes\":[\"euzaof\",\"chvcyyysfgdo\",\"cubiipuipw\",\"qonmacj\"],\"vlanMatchCondition\":{\"vlans\":[\"zshq\"],\"innerVlans\":[\"m\",\"ev\"],\"vlanGroupNames\":[\"b\",\"rrilbywdxsmic\",\"wrwfscjfnyns\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"oqytibyowbblgy\",\"vutpthjoxo\"],\"ipGroupNames\":[\"sks\",\"pi\"]}}") + "{\"etherTypes\":[\"kwcf\"],\"fragments\":[\"jyxgtczh\",\"ydbsd\",\"hmkxmaehvbb\"],\"ipLengths\":[\"iplt\",\"n\"],\"ttlValues\":[\"axkgx\"],\"dscpMarkings\":[\"ckpyklyhplu\"],\"protocolNeighbors\":[\"vruu\",\"lgzi\"],\"portCondition\":{\"flags\":[\"stgktst\",\"dxeclzedqbcvh\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"dqkdlwwqfbu\",\"lkxt\",\"qjfsmlmbtxhw\"],\"portGroupNames\":[\"srtawcoezbr\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"kh\"]},\"protocolTypes\":[\"goo\"],\"vlanMatchCondition\":{\"vlans\":[\"fqjbvleo\",\"fmluiqtqzfavyvn\",\"qybaryeua\"],\"innerVlans\":[\"qabqgzslesjcb\"],\"vlanGroupNames\":[\"n\",\"tiewdj\",\"vbquwr\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"buffkmrqemvvhm\",\"tdrjfutacoebj\",\"ewzcjznmwcp\"],\"ipGroupNames\":[\"aadraufactkahz\",\"v\",\"jjziuxxpsh\",\"eekulfgslqubkwd\"]}}") .toObject(AccessControlListMatchCondition.class); - Assertions.assertEquals("euzaof", model.protocolTypes().get(0)); - Assertions.assertEquals("zshq", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("m", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("b", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals("goo", model.protocolTypes().get(0)); + Assertions.assertEquals("fqjbvleo", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("qabqgzslesjcb", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("n", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("oqytibyowbblgy", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("sks", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("pmguaadraufac", model.etherTypes().get(0)); - Assertions.assertEquals("ubkwdle", model.fragments().get(0)); - Assertions.assertEquals("jbazpjuohminy", model.ipLengths().get(0)); - Assertions.assertEquals("nnbj", model.ttlValues().get(0)); - Assertions.assertEquals("onfo", model.dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); + Assertions.assertEquals("buffkmrqemvvhm", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aadraufactkahz", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("kwcf", model.etherTypes().get(0)); + Assertions.assertEquals("jyxgtczh", model.fragments().get(0)); + Assertions.assertEquals("iplt", model.ipLengths().get(0)); + Assertions.assertEquals("axkgx", model.ttlValues().get(0)); + Assertions.assertEquals("ckpyklyhplu", model.dscpMarkings().get(0)); + Assertions.assertEquals("vruu", model.protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("wrbiorkt", model.portCondition().ports().get(0)); - Assertions.assertEquals("hxmsivfo", model.portCondition().portGroupNames().get(0)); - Assertions.assertEquals("lrphwzsoldw", model.portCondition().flags().get(0)); + Assertions.assertEquals("dqkdlwwqfbu", model.portCondition().ports().get(0)); + Assertions.assertEquals("srtawcoezbr", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("stgktst", model.portCondition().flags().get(0)); + Assertions.assertEquals("kh", model.icmpConfiguration().icmpTypes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListMatchCondition model = new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("euzaof", "chvcyyysfgdo", "cubiipuipw", "qonmacj")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("zshq")) - .withInnerVlans(Arrays.asList("m", "ev")) - .withVlanGroupNames(Arrays.asList("b", "rrilbywdxsmic", "wrwfscjfnyns"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("oqytibyowbblgy", "vutpthjoxo")) - .withIpGroupNames(Arrays.asList("sks", "pi"))) - .withEtherTypes(Arrays.asList("pmguaadraufac", "kahzo", "ajjziuxxpshne", "kulfg")) - .withFragments(Arrays.asList("ubkwdle", "rds")) - .withIpLengths(Arrays.asList("jbazpjuohminy", "lnorwmdu", "wpklvxw", "ygdxpgpqchis")) - .withTtlValues(Arrays.asList("nnbj", "rxgibbd")) - .withDscpMarkings(Arrays.asList("onfo", "auorsukokw", "qplhlvnu")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wrbiorkt", "lywjhh")) - .withPortGroupNames(Arrays.asList("hxmsivfo", "iloxggdufiq")) - .withFlags(Arrays.asList("lrphwzsoldw", "yuqdu"))); + AccessControlListMatchCondition model + = new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("goo")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("fqjbvleo", "fmluiqtqzfavyvn", "qybaryeua")) + .withInnerVlans(Arrays.asList("qabqgzslesjcb")) + .withVlanGroupNames(Arrays.asList("n", "tiewdj", "vbquwr"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("buffkmrqemvvhm", "tdrjfutacoebj", "ewzcjznmwcp")) + .withIpGroupNames(Arrays.asList("aadraufactkahz", "v", "jjziuxxpsh", "eekulfgslqubkwd"))) + .withEtherTypes(Arrays.asList("kwcf")) + .withFragments(Arrays.asList("jyxgtczh", "ydbsd", "hmkxmaehvbb")) + .withIpLengths(Arrays.asList("iplt", "n")) + .withTtlValues(Arrays.asList("axkgx")) + .withDscpMarkings(Arrays.asList("ckpyklyhplu")) + .withProtocolNeighbors(Arrays.asList("vruu", "lgzi")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("dqkdlwwqfbu", "lkxt", "qjfsmlmbtxhw")) + .withPortGroupNames(Arrays.asList("srtawcoezbr")) + .withFlags(Arrays.asList("stgktst", "dxeclzedqbcvh"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("kh"))); model = BinaryData.fromObject(model).toObject(AccessControlListMatchCondition.class); - Assertions.assertEquals("euzaof", model.protocolTypes().get(0)); - Assertions.assertEquals("zshq", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("m", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("b", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals("goo", model.protocolTypes().get(0)); + Assertions.assertEquals("fqjbvleo", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("qabqgzslesjcb", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("n", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("oqytibyowbblgy", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("sks", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("pmguaadraufac", model.etherTypes().get(0)); - Assertions.assertEquals("ubkwdle", model.fragments().get(0)); - Assertions.assertEquals("jbazpjuohminy", model.ipLengths().get(0)); - Assertions.assertEquals("nnbj", model.ttlValues().get(0)); - Assertions.assertEquals("onfo", model.dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); + Assertions.assertEquals("buffkmrqemvvhm", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aadraufactkahz", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("kwcf", model.etherTypes().get(0)); + Assertions.assertEquals("jyxgtczh", model.fragments().get(0)); + Assertions.assertEquals("iplt", model.ipLengths().get(0)); + Assertions.assertEquals("axkgx", model.ttlValues().get(0)); + Assertions.assertEquals("ckpyklyhplu", model.dscpMarkings().get(0)); + Assertions.assertEquals("vruu", model.protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("wrbiorkt", model.portCondition().ports().get(0)); - Assertions.assertEquals("hxmsivfo", model.portCondition().portGroupNames().get(0)); - Assertions.assertEquals("lrphwzsoldw", model.portCondition().flags().get(0)); + Assertions.assertEquals("dqkdlwwqfbu", model.portCondition().ports().get(0)); + Assertions.assertEquals("srtawcoezbr", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("stgktst", model.portCondition().flags().get(0)); + Assertions.assertEquals("kh", model.icmpConfiguration().icmpTypes().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..000bfb1eb97c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListMatchConfigurationPatch model = BinaryData.fromString( + "{\"matchConfigurationName\":\"rxmunjdxvgln\",\"sequenceNumber\":1269950665370121991,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"ivbgkcv\",\"hpzvuqdflvoniyp\",\"pubcpzgpxtivhjk\"],\"fragments\":[\"ibg\",\"jxgpnrhgovfg\",\"ik\",\"mhha\"],\"ipLengths\":[\"rmzvupo\",\"qzdfuydzvkfvxcn\",\"mx\"],\"ttlValues\":[\"wokmvkhlggd\",\"bemzqkzszuwi\"],\"dscpMarkings\":[\"lxxhljfp\",\"picrmnzhrgmqgjsx\",\"pqcbfrmbodthsq\",\"gvriibakclac\"],\"portCondition\":{\"flags\":[\"xousxauzl\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"hqf\",\"izvu\"],\"portGroupNames\":[\"kjsvthnwpzteko\"]},\"protocolNeighbors\":[\"ibiattg\"],\"icmpConfiguration\":{\"icmpTypes\":[\"fotang\",\"fhnykzcugs\",\"vxwlmzqwmvtxnj\",\"xmcuqud\"]},\"protocolTypes\":[\"clxyn\"],\"vlanMatchCondition\":{\"vlans\":[\"gfabuiyjibuzphdu\",\"neiknpg\"],\"innerVlans\":[\"jiuqhibtozi\",\"qw\",\"edmurrxxge\"],\"vlanGroupNames\":[\"tvqylkmqpzoyhlfb\",\"gwgcl\",\"xoe\",\"qinjipnwjf\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ahhpzpofoiyjwpf\",\"lkmkkholvdndvi\",\"uogphuartvtiuky\",\"fchnmnah\"],\"ipGroupNames\":[\"hkxjqirwrweooxf\"]}},{\"etherTypes\":[\"hx\",\"rsnewmozqvbubqma\"],\"fragments\":[\"ycxhxzgaztta\",\"o\",\"dvmfqhppub\"],\"ipLengths\":[\"epdfgkmtdherng\",\"tcjuahokqto\"],\"ttlValues\":[\"uxofshfphwpnulai\",\"wzejywhslw\",\"ojpllndnpdwrpqaf\"],\"dscpMarkings\":[\"gsnnf\"],\"portCondition\":{\"flags\":[\"efy\",\"oc\",\"ctfjgtixr\",\"vzuyturmlmu\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"iropionszon\"],\"portGroupNames\":[\"gajinnixjawrtmj\",\"jmyccxlzhcoxov\",\"ekhenl\",\"sfnrdtjxt\"]},\"protocolNeighbors\":[\"cq\",\"jvidttge\",\"uslvyjtcvuwkasi\"],\"icmpConfiguration\":{\"icmpTypes\":[\"fuughtuqfec\",\"xeygtuhxuic\",\"uewmrswnjlxuzrhw\",\"usxjbaqehg\"]},\"protocolTypes\":[\"hzjqatucoige\",\"xncnwfe\",\"bnwgfmxj\",\"cgbjbgdlfgt\"],\"vlanMatchCondition\":{\"vlans\":[\"aquflqbctqha\",\"zjrwdkqze\"],\"innerVlans\":[\"leziunjxdfzant\",\"wcegyamlbn\",\"eqacjjvpilguooq\"],\"vlanGroupNames\":[\"m\",\"itgueiookjbs\",\"hrtdtpdelq\",\"cslmotoebnfxo\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"razftxejwabmdujt\",\"vcopex\",\"m\",\"urbuhhlkyqltq\"],\"ipGroupNames\":[\"gtuwkff\"]}},{\"etherTypes\":[\"tsysi\",\"fvcl\",\"lxnfuijtkbusqogs\",\"ikayiansharuj\"],\"fragments\":[\"qxfzyjqttvwk\"],\"ipLengths\":[\"j\",\"enuygbq\",\"qqekewvnqvcdlgu\"],\"ttlValues\":[\"mfdjwn\",\"axpunjqikczvv\",\"tacgxmfc\"],\"dscpMarkings\":[\"rxhtvso\"],\"portCondition\":{\"flags\":[\"ntsj\",\"qrsxyp\",\"uuuybnchrsziz\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"tn\",\"nb\",\"qyggagfl\",\"lgmtrwahzjmucf\"],\"portGroupNames\":[\"r\",\"lrohkpig\",\"fusuckzmkwklsno\",\"axmqeqal\"]},\"protocolNeighbors\":[\"nhg\",\"ydyynfsvkh\",\"bvqt\"],\"icmpConfiguration\":{\"icmpTypes\":[\"fdlpukhpyr\"]},\"protocolTypes\":[\"zjcpeogk\",\"nmg\"],\"vlanMatchCondition\":{\"vlans\":[\"xddbhfhpfpaz\",\"zoyw\"],\"innerVlans\":[\"pdulon\",\"acn\"],\"vlanGroupNames\":[\"tehtuevrhrljyoog\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"gwbsreurf\",\"kfuarenlv\",\"htkln\",\"nafvvkyfedev\"],\"ipGroupNames\":[\"slcqxypokkh\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"mczngn\",\"remarkComment\":\"xxewu\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":1738524361378683340,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":6846894653770096089,\"unit\":\"KBytes\"}}},{\"type\":\"Remark\",\"counterName\":\"rqctmxxdtdd\",\"remarkComment\":\"lhuytxzvtznap\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":3918820326691317186,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":8097143869221390805,\"unit\":\"GBytes\"}}},{\"type\":\"Drop\",\"counterName\":\"nwvroevytlyokrr\",\"remarkComment\":\"uuxvnsasbcry\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":8486820161769932410,\"unit\":\"Pps\"},\"burstSize\":{\"size\":6082407649768977898,\"unit\":\"Packets\"}}},{\"type\":\"Drop\",\"counterName\":\"mkmlmvevfx\",\"remarkComment\":\"pj\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":6671174606500495467,\"unit\":\"Gbps\"},\"burstSize\":{\"size\":1787563596647106339,\"unit\":\"MBytes\"}}}]}") + .toObject(AccessControlListMatchConfigurationPatch.class); + Assertions.assertEquals("rxmunjdxvgln", model.matchConfigurationName()); + Assertions.assertEquals(1269950665370121991L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("clxyn", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("gfabuiyjibuzphdu", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("jiuqhibtozi", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("tvqylkmqpzoyhlfb", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("ahhpzpofoiyjwpf", + model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hkxjqirwrweooxf", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("ivbgkcv", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("ibg", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("rmzvupo", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("wokmvkhlggd", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("lxxhljfp", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("hqf", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("kjsvthnwpzteko", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("xousxauzl", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("ibiattg", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("fotang", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("mczngn", model.actions().get(0).counterName()); + Assertions.assertEquals("xxewu", model.actions().get(0).remarkComment()); + Assertions.assertEquals(1738524361378683340L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6846894653770096089L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListMatchConfigurationPatch model + = new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("rxmunjdxvgln") + .withSequenceNumber(1269950665370121991L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions( + Arrays.asList( + new AccessControlListMatchConditionPatch().withProtocolTypes(Arrays.asList("clxyn")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("gfabuiyjibuzphdu", "neiknpg")) + .withInnerVlans(Arrays.asList("jiuqhibtozi", "qw", "edmurrxxge")) + .withVlanGroupNames(Arrays.asList("tvqylkmqpzoyhlfb", "gwgcl", "xoe", "qinjipnwjf"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("ahhpzpofoiyjwpf", "lkmkkholvdndvi", "uogphuartvtiuky", "fchnmnah")) + .withIpGroupNames(Arrays.asList("hkxjqirwrweooxf"))) + .withEtherTypes(Arrays.asList("ivbgkcv", "hpzvuqdflvoniyp", "pubcpzgpxtivhjk")) + .withFragments(Arrays.asList("ibg", "jxgpnrhgovfg", "ik", "mhha")) + .withIpLengths(Arrays.asList("rmzvupo", "qzdfuydzvkfvxcn", "mx")) + .withTtlValues(Arrays.asList("wokmvkhlggd", "bemzqkzszuwi")) + .withDscpMarkings( + Arrays.asList("lxxhljfp", "picrmnzhrgmqgjsx", "pqcbfrmbodthsq", "gvriibakclac")) + .withPortCondition( + new AccessControlListPortConditionPatch() + .withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("hqf", "izvu")) + .withPortGroupNames(Arrays.asList("kjsvthnwpzteko")) + .withFlags(Arrays.asList("xousxauzl"))) + .withProtocolNeighbors(Arrays.asList("ibiattg")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("fotang", "fhnykzcugs", "vxwlmzqwmvtxnj", "xmcuqud"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("hzjqatucoige", "xncnwfe", "bnwgfmxj", "cgbjbgdlfgt")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("aquflqbctqha", "zjrwdkqze")) + .withInnerVlans(Arrays.asList("leziunjxdfzant", "wcegyamlbn", "eqacjjvpilguooq")) + .withVlanGroupNames(Arrays.asList("m", "itgueiookjbs", "hrtdtpdelq", "cslmotoebnfxo"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("razftxejwabmdujt", "vcopex", "m", "urbuhhlkyqltq")) + .withIpGroupNames(Arrays.asList("gtuwkff"))) + .withEtherTypes(Arrays.asList("hx", "rsnewmozqvbubqma")) + .withFragments(Arrays.asList("ycxhxzgaztta", "o", "dvmfqhppub")) + .withIpLengths(Arrays.asList("epdfgkmtdherng", "tcjuahokqto")) + .withTtlValues(Arrays.asList("uxofshfphwpnulai", "wzejywhslw", "ojpllndnpdwrpqaf")) + .withDscpMarkings(Arrays.asList("gsnnf")) + .withPortCondition( + new AccessControlListPortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("iropionszon")) + .withPortGroupNames( + Arrays.asList("gajinnixjawrtmj", "jmyccxlzhcoxov", "ekhenl", "sfnrdtjxt")) + .withFlags(Arrays.asList("efy", "oc", "ctfjgtixr", "vzuyturmlmu"))) + .withProtocolNeighbors(Arrays.asList("cq", "jvidttge", "uslvyjtcvuwkasi")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes( + Arrays.asList("fuughtuqfec", "xeygtuhxuic", "uewmrswnjlxuzrhw", "usxjbaqehg"))), + new AccessControlListMatchConditionPatch().withProtocolTypes(Arrays.asList("zjcpeogk", "nmg")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("xddbhfhpfpaz", "zoyw")) + .withInnerVlans(Arrays.asList("pdulon", "acn")) + .withVlanGroupNames(Arrays.asList("tehtuevrhrljyoog"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("gwbsreurf", "kfuarenlv", "htkln", "nafvvkyfedev")) + .withIpGroupNames(Arrays.asList("slcqxypokkh"))) + .withEtherTypes(Arrays.asList("tsysi", "fvcl", "lxnfuijtkbusqogs", "ikayiansharuj")) + .withFragments(Arrays.asList("qxfzyjqttvwk")) + .withIpLengths(Arrays.asList("j", "enuygbq", "qqekewvnqvcdlgu")) + .withTtlValues(Arrays.asList("mfdjwn", "axpunjqikczvv", "tacgxmfc")) + .withDscpMarkings(Arrays.asList("rxhtvso")) + .withPortCondition( + new AccessControlListPortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("tn", "nb", "qyggagfl", "lgmtrwahzjmucf")) + .withPortGroupNames(Arrays.asList("r", "lrohkpig", "fusuckzmkwklsno", "axmqeqal")) + .withFlags(Arrays.asList("ntsj", "qrsxyp", "uuuybnchrsziz"))) + .withProtocolNeighbors(Arrays.asList("nhg", "ydyynfsvkh", "bvqt")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("fdlpukhpyr"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("mczngn") + .withRemarkComment("xxewu") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(1738524361378683340L).withUnit(BitRateUnit.MBPS)) + .withBurstSize(new BurstSize().withSize(6846894653770096089L).withUnit(BurstSizeUnit.KBYTES))), + new AccessControlListActionPatch().withType(AclActionType.REMARK) + .withCounterName("rqctmxxdtdd") + .withRemarkComment("lhuytxzvtznap") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(3918820326691317186L).withUnit(BitRateUnit.MBPS)) + .withBurstSize( + new BurstSize().withSize(8097143869221390805L).withUnit(BurstSizeUnit.GBYTES))), + new AccessControlListActionPatch().withType(AclActionType.DROP) + .withCounterName("nwvroevytlyokrr") + .withRemarkComment("uuxvnsasbcry") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(8486820161769932410L).withUnit(BitRateUnit.PPS)) + .withBurstSize( + new BurstSize().withSize(6082407649768977898L).withUnit(BurstSizeUnit.PACKETS))), + new AccessControlListActionPatch().withType(AclActionType.DROP) + .withCounterName("mkmlmvevfx") + .withRemarkComment("pj") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(6671174606500495467L).withUnit(BitRateUnit.GBPS)) + .withBurstSize( + new BurstSize().withSize(1787563596647106339L).withUnit(BurstSizeUnit.MBYTES))))); + model = BinaryData.fromObject(model).toObject(AccessControlListMatchConfigurationPatch.class); + Assertions.assertEquals("rxmunjdxvgln", model.matchConfigurationName()); + Assertions.assertEquals(1269950665370121991L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("clxyn", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("gfabuiyjibuzphdu", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("jiuqhibtozi", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("tvqylkmqpzoyhlfb", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("ahhpzpofoiyjwpf", + model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hkxjqirwrweooxf", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("ivbgkcv", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("ibg", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("rmzvupo", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("wokmvkhlggd", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("lxxhljfp", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("hqf", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("kjsvthnwpzteko", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("xousxauzl", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("ibiattg", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("fotang", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("mczngn", model.actions().get(0).counterName()); + Assertions.assertEquals("xxewu", model.actions().get(0).remarkComment()); + Assertions.assertEquals(1738524361378683340L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6846894653770096089L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java index 1499448bf962..d52a48c082b3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,9 +10,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; @@ -24,109 +30,172 @@ public final class AccessControlListMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListMatchConfiguration model = BinaryData.fromString( - "{\"matchConfigurationName\":\"qxvcxgfrpdsofb\",\"sequenceNumber\":265597434112892154,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"dvzyybycnun\",\"jsrtk\"],\"fragments\":[\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\",\"rydxtqm\"],\"ipLengths\":[\"xorgg\"],\"ttlValues\":[\"yaomtb\",\"hhavgrvkffovjz\",\"pjbi\",\"gjmfxumvfcl\"],\"dscpMarkings\":[\"vwxnbkfe\",\"zxscyhwzdgirujb\",\"bomvzzbtdcqv\",\"niyujv\"],\"portCondition\":{\"flags\":[\"dshf\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ye\"],\"portGroupNames\":[\"msgaoj\",\"mwn\",\"otmrfhir\"]},\"protocolTypes\":[\"moxoftpi\",\"iwyczuh\",\"a\",\"pqjlihhyusps\"],\"vlanMatchCondition\":{\"vlans\":[\"vlmfwdgzxulucv\",\"amrsreuzv\",\"urisjnhnytxifqj\"],\"innerVlans\":[\"mrhublwpc\",\"sutrgjup\"],\"vlanGroupNames\":[\"tpwoqhihejq\",\"w\",\"pnfqntcyp\",\"xjvfoimwksl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ydfce\",\"cvlhv\",\"gdyftumrtwna\",\"jslb\"],\"ipGroupNames\":[\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"]}},{\"etherTypes\":[\"qgaifmviklbydv\"],\"fragments\":[\"ejd\",\"nxcvds\",\"hnjivo\"],\"ipLengths\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"],\"ttlValues\":[\"wcw\"],\"dscpMarkings\":[\"oknssxmojmsvpkjp\",\"vk\",\"cfzq\"],\"portCondition\":{\"flags\":[\"gtczheydb\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xmaehvbbxu\"],\"portGroupNames\":[\"ltfnhtbaxkgx\",\"wrck\",\"yklyhpluodpvruud\"]},\"protocolTypes\":[\"ibthostgktstvd\"],\"vlanMatchCondition\":{\"vlans\":[\"zedqbcvhzlhplo\",\"qkdlw\",\"qfbumlkxtrqjf\",\"mlmbtxhwgfwsrta\"],\"innerVlans\":[\"ezbrhubskh\",\"dyg\",\"ookk\"],\"vlanGroupNames\":[\"jb\",\"leorfmluiqtqz\",\"avyvnqqyba\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"qabqgzslesjcb\"],\"ipGroupNames\":[\"n\",\"tiewdj\",\"vbquwr\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"o\"},{\"type\":\"Log\",\"counterName\":\"fkmr\"},{\"type\":\"Drop\",\"counterName\":\"vhmxtdrjfu\"},{\"type\":\"Log\",\"counterName\":\"ebjvewzcjzn\"}]}") + "{\"matchConfigurationName\":\"wueluqhhahhxv\",\"sequenceNumber\":7633394480514275792,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"wspughftqsxhqx\"],\"fragments\":[\"ukndxdigrjgu\",\"fzdm\",\"yqtfihwh\"],\"ipLengths\":[\"z\",\"ngamvpphosz\",\"zudphqamvdkfw\"],\"ttlValues\":[\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\",\"zcjaesgvvsccy\"],\"dscpMarkings\":[\"uq\"],\"protocolNeighbors\":[\"ygz\",\"vdnkfxusem\",\"wzrmuh\",\"pfcqdp\"],\"portCondition\":{\"flags\":[\"vpsvuoymgcce\",\"vezrypqlmfeo\",\"erqwkyhkobopg\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"epbqpcrfkbw\"],\"portGroupNames\":[\"njv\",\"dw\",\"lpqekf\",\"nkhtjsyingw\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"mtdh\",\"mdvy\",\"gikdgsz\",\"w\"]},\"protocolTypes\":[\"rryuzhlhkjo\",\"rvqqaatj\",\"nrvgoupmfiibfgg\"],\"vlanMatchCondition\":{\"vlans\":[\"lvrwxkvtkk\",\"llqwjygvjayvblmh\"],\"innerVlans\":[\"uhbxvvy\",\"gsopbyrqufegxu\",\"wz\",\"bnhlmc\"],\"vlanGroupNames\":[\"dn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"rixkwmyijejve\",\"rh\"],\"ipGroupNames\":[\"aixexccbdreaxh\"]}},{\"etherTypes\":[\"drrvqahqkght\",\"wijnh\",\"jsvfycxzbfvoowv\",\"vmtgjqppy\"],\"fragments\":[\"ronzmyhgfip\",\"sxkm\",\"waekrrjreafxtsgu\"],\"ipLengths\":[\"glikkxwslolb\",\"pvuzlmv\",\"elfk\",\"gplcrpwjxeznoigb\"],\"ttlValues\":[\"w\",\"wkpnbsaz\",\"jjoqkagf\"],\"dscpMarkings\":[\"ttaugzxnfaazp\",\"dtnkdmkq\",\"jlwuenvrkp\",\"ou\"],\"protocolNeighbors\":[\"rebqaaysjk\"],\"portCondition\":{\"flags\":[\"nqttezl\",\"fffiak\",\"jpqqmted\",\"tmmjihyeozph\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"ncyg\",\"p\",\"vipmdscwxqupevzh\"],\"portGroupNames\":[\"otxhojujby\",\"elmcuvhixbjxyfw\",\"yl\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"lsttpkiwkkbnuj\"]},\"protocolTypes\":[\"vtylbfpncu\",\"doiwi\",\"thtywub\",\"cbihwqk\"],\"vlanMatchCondition\":{\"vlans\":[\"twjchrdg\",\"ihxumwctondzj\"],\"innerVlans\":[\"dfdlwggyts\",\"wtovvtgsein\"],\"vlanGroupNames\":[\"ufxqknpirgnepttw\",\"msniffc\",\"mqnrojlpijnkr\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"atiz\",\"ronasxift\"],\"ipGroupNames\":[\"yzhftwesgogczh\",\"nnxk\"]}},{\"etherTypes\":[\"nyhmossxkkgthr\",\"gh\",\"jbdhqxvc\"],\"fragments\":[\"rpdsof\",\"shrnsvbuswdvz\",\"ybycnunvj\",\"rtkfawnopq\"],\"ipLengths\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"],\"ttlValues\":[\"ox\",\"rgguf\",\"yaomtb\",\"hhavgrvkffovjz\"],\"dscpMarkings\":[\"bibgjmfxumv\",\"cluyovwxnbkf\"],\"protocolNeighbors\":[\"xscyhwzdgirujbz\",\"omvzzbtd\",\"qvpn\",\"yujviylwdshfssn\"],\"portCondition\":{\"flags\":[\"efr\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"j\",\"mwn\"],\"portGroupNames\":[\"mrfhirctymox\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"ipiwy\",\"zuhx\",\"cpqjlihhyu\",\"pskasdvlmfwdg\"]},\"protocolTypes\":[\"lucvpam\",\"sreuzvxurisjnh\"],\"vlanMatchCondition\":{\"vlans\":[\"ifqjz\",\"xmrhu\",\"lw\"],\"innerVlans\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"],\"vlanGroupNames\":[\"vfoimwksli\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"dfcea\",\"vlhv\"],\"ipGroupNames\":[\"yftumrtwna\",\"jslb\",\"wkojgcyztsfmzn\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"chqnrnrpxehuwry\",\"remarkComment\":\"gaifmvik\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":1179747194157520727,\"unit\":\"bps\"},\"burstSize\":{\"size\":4321124262643001458,\"unit\":\"Bytes\"}}},{\"type\":\"Log\",\"counterName\":\"srhnjivo\",\"remarkComment\":\"tnovqfzgemjdftul\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":4284525759491451100,\"unit\":\"bps\"},\"burstSize\":{\"size\":5180543966306679180,\"unit\":\"Packets\"}}},{\"type\":\"Drop\",\"counterName\":\"jw\",\"remarkComment\":\"wqiok\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":6715076788595047640,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":851035908537105791,\"unit\":\"Bytes\"}}}]}") .toObject(AccessControlListMatchConfiguration.class); - Assertions.assertEquals("qxvcxgfrpdsofb", model.matchConfigurationName()); - Assertions.assertEquals(265597434112892154L, model.sequenceNumber()); + Assertions.assertEquals("wueluqhhahhxv", model.matchConfigurationName()); + Assertions.assertEquals(7633394480514275792L, model.sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("moxoftpi", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("vlmfwdgzxulucv", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("mrhublwpc", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("tpwoqhihejq", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("rryuzhlhkjo", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("lvrwxkvtkk", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("uhbxvvy", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("dn", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ydfce", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ojgcyzt", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("dvzyybycnun", model.matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("nopqgikyzirtx", model.matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("xorgg", model.matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("yaomtb", model.matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("vwxnbkfe", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("rixkwmyijejve", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aixexccbdreaxh", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("wspughftqsxhqx", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("ukndxdigrjgu", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("z", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("cvtbv", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("uq", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("ygz", model.matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ye", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("msgaoj", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dshf", model.matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.COUNT, model.actions().get(0).type()); - Assertions.assertEquals("o", model.actions().get(0).counterName()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("epbqpcrfkbw", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("njv", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("vpsvuoymgcce", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("mtdh", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("chqnrnrpxehuwry", model.actions().get(0).counterName()); + Assertions.assertEquals("gaifmvik", model.actions().get(0).remarkComment()); + Assertions.assertEquals(1179747194157520727L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.BPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(4321124262643001458L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListMatchConfiguration model - = new AccessControlListMatchConfiguration().withMatchConfigurationName("qxvcxgfrpdsofb") - .withSequenceNumber(265597434112892154L) + = new AccessControlListMatchConfiguration().withMatchConfigurationName("wueluqhhahhxv") + .withSequenceNumber(7633394480514275792L) .withIpAddressType(IpAddressType.IPV4) .withMatchConditions(Arrays.asList( new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("moxoftpi", "iwyczuh", "a", "pqjlihhyusps")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("vlmfwdgzxulucv", "amrsreuzv", "urisjnhnytxifqj")) - .withInnerVlans(Arrays.asList("mrhublwpc", "sutrgjup")) - .withVlanGroupNames(Arrays.asList("tpwoqhihejq", "w", "pnfqntcyp", "xjvfoimwksl"))) + .withProtocolTypes(Arrays.asList("rryuzhlhkjo", "rvqqaatj", "nrvgoupmfiibfgg")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("lvrwxkvtkk", "llqwjygvjayvblmh")) + .withInnerVlans(Arrays.asList("uhbxvvy", "gsopbyrqufegxu", "wz", "bnhlmc")) + .withVlanGroupNames(Arrays.asList("dn"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ydfce", "cvlhv", "gdyftumrtwna", "jslb")) - .withIpGroupNames(Arrays.asList("ojgcyzt", "fmznba", "qphchqnrnrpxehuw"))) - .withEtherTypes(Arrays.asList("dvzyybycnun", "jsrtk")) - .withFragments(Arrays.asList("nopqgikyzirtx", "yuxzejntpsewgi", "ilqu", "rydxtqm")) - .withIpLengths(Arrays.asList("xorgg")) - .withTtlValues(Arrays.asList("yaomtb", "hhavgrvkffovjz", "pjbi", "gjmfxumvfcl")) - .withDscpMarkings(Arrays.asList("vwxnbkfe", "zxscyhwzdgirujb", "bomvzzbtdcqv", "niyujv")) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("rixkwmyijejve", "rh")) + .withIpGroupNames(Arrays.asList("aixexccbdreaxh"))) + .withEtherTypes(Arrays.asList("wspughftqsxhqx")) + .withFragments(Arrays.asList("ukndxdigrjgu", "fzdm", "yqtfihwh")) + .withIpLengths(Arrays.asList("z", "ngamvpphosz", "zudphqamvdkfw")) + .withTtlValues(Arrays.asList("cvtbv", "ayhmtnvyqiatkz", "pcnp", "zcjaesgvvsccy")) + .withDscpMarkings(Arrays.asList("uq")) + .withProtocolNeighbors(Arrays.asList("ygz", "vdnkfxusem", "wzrmuh", "pfcqdp")) .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ye")) - .withPortGroupNames(Arrays.asList("msgaoj", "mwn", "otmrfhir")) - .withFlags(Arrays.asList("dshf"))), - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("ibthostgktstvd")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("zedqbcvhzlhplo", "qkdlw", "qfbumlkxtrqjf", "mlmbtxhwgfwsrta")) - .withInnerVlans(Arrays.asList("ezbrhubskh", "dyg", "ookk")) - .withVlanGroupNames(Arrays.asList("jb", "leorfmluiqtqz", "avyvnqqyba"))) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("epbqpcrfkbw")) + .withPortGroupNames(Arrays.asList("njv", "dw", "lpqekf", "nkhtjsyingw")) + .withFlags(Arrays.asList("vpsvuoymgcce", "vezrypqlmfeo", "erqwkyhkobopg"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes( + Arrays.asList("mtdh", "mdvy", "gikdgsz", "w"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("vtylbfpncu", "doiwi", "thtywub", "cbihwqk")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("twjchrdg", "ihxumwctondzj")) + .withInnerVlans(Arrays.asList("dfdlwggyts", "wtovvtgsein")) + .withVlanGroupNames(Arrays.asList("ufxqknpirgnepttw", "msniffc", "mqnrojlpijnkr"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("atiz", "ronasxift")) + .withIpGroupNames(Arrays.asList("yzhftwesgogczh", "nnxk"))) + .withEtherTypes(Arrays.asList("drrvqahqkght", "wijnh", "jsvfycxzbfvoowv", "vmtgjqppy")) + .withFragments(Arrays.asList("ronzmyhgfip", "sxkm", "waekrrjreafxtsgu")) + .withIpLengths(Arrays.asList("glikkxwslolb", "pvuzlmv", "elfk", "gplcrpwjxeznoigb")) + .withTtlValues(Arrays.asList("w", "wkpnbsaz", "jjoqkagf")) + .withDscpMarkings(Arrays.asList("ttaugzxnfaazp", "dtnkdmkq", "jlwuenvrkp", "ou")) + .withProtocolNeighbors(Arrays.asList("rebqaaysjk")) + .withPortCondition(new AccessControlListPortCondition() + .withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("ncyg", "p", "vipmdscwxqupevzh")) + .withPortGroupNames(Arrays.asList("otxhojujby", "elmcuvhixbjxyfw", "yl")) + .withFlags(Arrays.asList("nqttezl", "fffiak", "jpqqmted", "tmmjihyeozph"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("lsttpkiwkkbnuj"))), + new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("lucvpam", "sreuzvxurisjnh")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("ifqjz", "xmrhu", "lw")) + .withInnerVlans(Arrays.asList("sutrgjup", "uutpwoqhih", "jqgwzp", "fqntcyp")) + .withVlanGroupNames(Arrays.asList("vfoimwksli"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("qabqgzslesjcb")) - .withIpGroupNames(Arrays.asList("n", "tiewdj", "vbquwr"))) - .withEtherTypes(Arrays.asList("qgaifmviklbydv")) - .withFragments(Arrays.asList("ejd", "nxcvds", "hnjivo")) - .withIpLengths(Arrays.asList("novqfzge", "jdftuljltd", "ceamtm", "zuo")) - .withTtlValues(Arrays.asList("wcw")) - .withDscpMarkings(Arrays.asList("oknssxmojmsvpkjp", "vk", "cfzq")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xmaehvbbxu")) - .withPortGroupNames(Arrays.asList("ltfnhtbaxkgx", "wrck", "yklyhpluodpvruud")) - .withFlags(Arrays.asList("gtczheydb"))))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("o"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("fkmr"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("vhmxtdrjfu"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("ebjvewzcjzn"))); + .withIpPrefixValues(Arrays.asList("dfcea", "vlhv")) + .withIpGroupNames(Arrays.asList("yftumrtwna", "jslb", "wkojgcyztsfmzn"))) + .withEtherTypes(Arrays.asList("nyhmossxkkgthr", "gh", "jbdhqxvc")) + .withFragments(Arrays.asList("rpdsof", "shrnsvbuswdvz", "ybycnunvj", "rtkfawnopq")) + .withIpLengths(Arrays.asList("yzirtxdyuxzejn", "psew", "ioilqukrydxtq")) + .withTtlValues(Arrays.asList("ox", "rgguf", "yaomtb", "hhavgrvkffovjz")) + .withDscpMarkings(Arrays.asList("bibgjmfxumv", "cluyovwxnbkf")) + .withProtocolNeighbors(Arrays.asList("xscyhwzdgirujbz", "omvzzbtd", "qvpn", "yujviylwdshfssn")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("j", "mwn")) + .withPortGroupNames(Arrays.asList("mrfhirctymox")) + .withFlags(Arrays.asList("efr"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("ipiwy", "zuhx", "cpqjlihhyu", "pskasdvlmfwdg"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("chqnrnrpxehuwry") + .withRemarkComment("gaifmvik") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(1179747194157520727L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(4321124262643001458L).withUnit(BurstSizeUnit.BYTES))), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("srhnjivo") + .withRemarkComment("tnovqfzgemjdftul") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(4284525759491451100L).withUnit(BitRateUnit.BPS)) + .withBurstSize( + new BurstSize().withSize(5180543966306679180L).withUnit(BurstSizeUnit.PACKETS))), + new AccessControlListAction().withType(AclActionType.DROP) + .withCounterName("jw") + .withRemarkComment("wqiok") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(6715076788595047640L).withUnit(BitRateUnit.MBPS)) + .withBurstSize( + new BurstSize().withSize(851035908537105791L).withUnit(BurstSizeUnit.BYTES))))); model = BinaryData.fromObject(model).toObject(AccessControlListMatchConfiguration.class); - Assertions.assertEquals("qxvcxgfrpdsofb", model.matchConfigurationName()); - Assertions.assertEquals(265597434112892154L, model.sequenceNumber()); + Assertions.assertEquals("wueluqhhahhxv", model.matchConfigurationName()); + Assertions.assertEquals(7633394480514275792L, model.sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("moxoftpi", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("vlmfwdgzxulucv", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("mrhublwpc", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("tpwoqhihejq", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("rryuzhlhkjo", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("lvrwxkvtkk", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("uhbxvvy", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("dn", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ydfce", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ojgcyzt", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("dvzyybycnun", model.matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("nopqgikyzirtx", model.matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("xorgg", model.matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("yaomtb", model.matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("vwxnbkfe", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("rixkwmyijejve", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aixexccbdreaxh", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("wspughftqsxhqx", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("ukndxdigrjgu", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("z", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("cvtbv", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("uq", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("ygz", model.matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ye", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("msgaoj", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dshf", model.matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.COUNT, model.actions().get(0).type()); - Assertions.assertEquals("o", model.actions().get(0).counterName()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("epbqpcrfkbw", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("njv", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("vpsvuoymgcce", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("mtdh", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("chqnrnrpxehuwry", model.actions().get(0).counterName()); + Assertions.assertEquals("gaifmvik", model.actions().get(0).remarkComment()); + Assertions.assertEquals(1179747194157520727L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.BPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(4321124262643001458L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java index 51861fa58550..d58c91876127 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java @@ -1,29 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -31,411 +47,394 @@ public final class AccessControlListPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPatchProperties model = BinaryData.fromString( - "{\"annotation\":\"cpwpg\",\"configurationType\":\"File\",\"aclsUrl\":\"ivtsoxfrkenxpm\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"mpdnqqskawa\",\"sequenceNumber\":3401106758360716727,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"rtql\"],\"fragments\":[\"egnitg\",\"kxlzyqdrfeg\"],\"ipLengths\":[\"lzxwhcansy\",\"oyqhlwig\",\"ivbkbxgomfaj\"],\"ttlValues\":[\"sqvdaeyygux\",\"kjsqzhzbezkgi\"],\"dscpMarkings\":[\"dxasicddyvv\",\"skgfmocwahpq\"],\"portCondition\":{\"flags\":[\"eaahhvjhhn\",\"kzyb\",\"jjidjk\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vxevblb\",\"ednljl\",\"geuaulx\",\"nsmjbnkppxynen\"],\"portGroupNames\":[\"xeizzg\"]},\"protocolTypes\":[\"nsrmffeycx\",\"ktp\"],\"vlanMatchCondition\":{\"vlans\":[\"rteeamm\",\"qiekkkzddrt\",\"g\",\"ojbmxv\"],\"innerVlans\":[\"efdeesve\",\"uij\"],\"vlanGroupNames\":[\"xs\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"sawddjibabxvi\",\"itvtzeexavo\",\"tfgle\",\"dmdqb\"],\"ipGroupNames\":[\"pqtgsfjac\"]}},{\"etherTypes\":[\"hhxud\",\"xvodhtnsir\",\"dhzmmesckdlp\",\"gzrcxfailcfxwmdb\"],\"fragments\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"ipLengths\":[\"aeranokqgukkjqnv\",\"roylaxxu\",\"cdisd\",\"sfjbjsvg\"],\"ttlValues\":[\"hryvy\",\"ytdc\",\"xgccknfnw\"],\"dscpMarkings\":[\"mvpdvjdhttzaef\",\"dxihc\",\"rphkmcrjdqnsdfz\"],\"portCondition\":{\"flags\":[\"gkylkdghr\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wxezwzhok\",\"bwnhhtql\",\"ehgpp\",\"pifhpfeoajvgcxtx\"],\"portGroupNames\":[\"heafidlt\",\"gsresmkssj\"]},\"protocolTypes\":[\"ftxfkf\",\"egprhptil\"],\"vlanMatchCondition\":{\"vlans\":[\"iqtgdqoh\",\"cwsldri\"],\"innerVlans\":[\"pwbralllibphbqz\"],\"vlanGroupNames\":[\"aka\",\"ankjpdnjzh\",\"joylh\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"rimrs\",\"pteecjme\"],\"ipGroupNames\":[\"stvasylwxdzaumw\"]}},{\"etherTypes\":[\"hguuf\",\"zboyjathwt\"],\"fragments\":[\"b\",\"emwmdxmebwjs\",\"jpahlxvea\"],\"ipLengths\":[\"xnmwmqtibxyijddt\",\"qcttadijaeukmrsi\"],\"ttlValues\":[\"pndzaapmudqmeq\"],\"dscpMarkings\":[\"pibudqwyxebeybpm\"],\"portCondition\":{\"flags\":[\"tffyaqit\",\"hheioqaqhvseuf\",\"qyrxp\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"sismjqfrddga\",\"quhiosrsjuivf\",\"disyirnxz\"],\"portGroupNames\":[\"exrxzbujrtrhq\",\"wrevkhgnlnzon\",\"lrpiqywnc\"]},\"protocolTypes\":[\"szcofizeht\",\"hgbjkvrelje\",\"murvzm\",\"ov\"],\"vlanMatchCondition\":{\"vlans\":[\"shcxlpmjerbdk\",\"lvidizozs\",\"bccxjmonfdgn\",\"n\"],\"innerVlans\":[\"uuwwltv\"],\"vlanGroupNames\":[\"ctzenkeifzzhmkd\",\"svflyhbxcudch\",\"gsrboldforobw\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"fovvacqpbtuodxes\",\"abbelawumuaslzk\",\"rrwoycqucwyhahn\"],\"ipGroupNames\":[\"rkywuhpsvfuu\",\"utlwexxwla\",\"niexzsrzpgepq\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"pgdakchzyvli\"}]},{\"matchConfigurationName\":\"nrkcxkj\",\"sequenceNumber\":3323219635606642946,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"wq\",\"ntvlwijpsttexo\",\"qpwcyyufmh\"],\"fragments\":[\"cuwmqsp\"],\"ipLengths\":[\"qzhlctddunq\"],\"ttlValues\":[\"fpch\"],\"dscpMarkings\":[\"njjrcgegydcwbox\"],\"portCondition\":{\"flags\":[\"qqoli\",\"r\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ubrjtl\",\"qxfuojrngif\",\"rzpasccbiuimzdly\"],\"portGroupNames\":[\"qwmkyoquf\",\"vruzslzojhpctfnm\",\"xotngfdguge\"]},\"protocolTypes\":[\"hgrky\"],\"vlanMatchCondition\":{\"vlans\":[\"bsnmfpph\",\"jee\"],\"innerVlans\":[\"yhsgz\",\"czbgomfgbeg\",\"qgleohibetnluank\"],\"vlanGroupNames\":[\"xeeebtijvacvbmqz\",\"qqxlajr\",\"wxacevehj\",\"uyxoaf\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"eyl\",\"nm\"],\"ipGroupNames\":[\"xirpghriy\",\"oqeyhlqhykprl\",\"yznuciqd\"]}},{\"etherTypes\":[\"xiitdfuxt\"],\"fragments\":[\"iibmi\",\"bnn\",\"stgnl\",\"hnmgixhcm\"],\"ipLengths\":[\"qfoudorhcgyy\",\"rotwypundmbxhugc\",\"jkavl\"],\"ttlValues\":[\"bmftpmdt\"],\"dscpMarkings\":[\"ltfvnz\",\"yj\",\"otp\",\"opv\"],\"portCondition\":{\"flags\":[\"zq\",\"qqihedsvqwthmk\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ihsgq\",\"wdhohsdtmcdzsu\",\"cohdx\",\"zlmcmuapcvhdb\"],\"portGroupNames\":[\"qqxeyskon\",\"zinkfkbgbzbowxeq\",\"clj\"]},\"protocolTypes\":[\"vkzqk\",\"jeokbzefezrxccz\",\"rtle\",\"pqxbkwvzgnzvdf\"],\"vlanMatchCondition\":{\"vlans\":[\"xzmqpnodawop\"],\"innerVlans\":[\"wjptm\",\"gsbos\"],\"vlanGroupNames\":[\"lnd\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"biojlvf\",\"rbbpneqvcwwyy\",\"r\"],\"ipGroupNames\":[\"hppr\"]}},{\"etherTypes\":[\"nmokayzejnhlbk\",\"bzpcpiljhahzvec\",\"ndbnwieh\"],\"fragments\":[\"wjwiuub\",\"efqsfapaqtferrqw\",\"x\"],\"ipLengths\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"],\"ttlValues\":[\"daultxijjumfq\",\"azlnqnmcjngzqdqx\",\"bjwgnyfus\"],\"dscpMarkings\":[\"vtuikzhajq\",\"lcfhmlrqryxy\"],\"portCondition\":{\"flags\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"sxwaabzm\",\"frygznmmax\"],\"portGroupNames\":[\"kzobgopxlhsln\",\"lxieixynllxecwcr\",\"jphslhcaw\",\"u\"]},\"protocolTypes\":[\"dwfmvigorqjb\",\"tzh\",\"aglkafhon\"],\"vlanMatchCondition\":{\"vlans\":[\"eickpz\",\"cpopmxel\"],\"innerVlans\":[\"ltyjedexxmlfmk\"],\"vlanGroupNames\":[\"azuawx\",\"z\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"zxrvxcus\",\"sphaivmxyasflvg\",\"gzwywak\",\"ihknsmjbl\"],\"ipGroupNames\":[\"hlnymzotq\",\"ryuzcbmqqv\",\"mv\",\"fgtayxonsup\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"nh\"},{\"type\":\"Count\",\"counterName\":\"ltnzoibgsxg\"}]},{\"matchConfigurationName\":\"fyq\",\"sequenceNumber\":6893006409525305180,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"fdbxiqxeiiqbim\"],\"fragments\":[\"wwinhehf\",\"pofvwb\",\"blembnkbwvqvxkd\",\"vqihebwtswbzuwf\"],\"ipLengths\":[\"ragegi\",\"vcjfelisdjubggb\"],\"ttlValues\":[\"kxkbsazgakgacyr\",\"m\",\"dmspof\"],\"dscpMarkings\":[\"uhrylniofr\",\"gbzjedmstkv\"],\"portCondition\":{\"flags\":[\"bcuiiz\",\"ktwfa\",\"snvpdibmi\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"bkiw\"],\"portGroupNames\":[\"n\",\"ophzfylsgcrp\",\"bcunezzceze\"]},\"protocolTypes\":[\"yfwlwxjwet\"],\"vlanMatchCondition\":{\"vlans\":[\"hclafzvaylptrs\",\"qwztcmwqkc\"],\"innerVlans\":[\"waxfewzjkj\",\"xfdeqvhpsyl\",\"ksh\"],\"vlanGroupNames\":[\"f\",\"bmxzjrgywwpg\",\"xs\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"cg\",\"aoepttaqutdew\"],\"ipGroupNames\":[\"swvr\",\"unzzjgehk\"]}},{\"etherTypes\":[\"m\"],\"fragments\":[\"xokffqyin\",\"jqepqwhi\",\"monstshiyxgve\"],\"ipLengths\":[\"lduccbi\",\"ds\"],\"ttlValues\":[\"cobiegstmninwjiz\",\"i\"],\"dscpMarkings\":[\"hgshe\",\"jtbxqmuluxlx\",\"zvners\",\"ycucrwnamikzeb\"],\"portCondition\":{\"flags\":[\"mswziq\",\"fuhok\",\"ruswhv\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fbycjs\",\"jww\"],\"portGroupNames\":[\"vumwmxqh\"]},\"protocolTypes\":[\"noamldsehaohdj\",\"hflzokxco\",\"pelnjetag\"],\"vlanMatchCondition\":{\"vlans\":[\"oatftgzpnpbswvef\"],\"innerVlans\":[\"cs\",\"mozi\",\"m\",\"pgawtxxpkyjcxcjx\"],\"vlanGroupNames\":[\"tfmpcycilrmcayk\",\"gnoxuztrksx\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"nznthjtw\",\"jaosrxuzv\"],\"ipGroupNames\":[\"ktcqio\",\"mgbzahgxqdlyrtl\",\"laprlt\",\"katbhjm\"]}},{\"etherTypes\":[\"bsoqeqala\",\"vlagun\",\"tgfebwln\"],\"fragments\":[\"yreeudz\",\"av\"],\"ipLengths\":[\"qmjxlyyzglgouwtl\",\"jjyuojqtobax\"],\"ttlValues\":[\"ytunlbfjkwr\"],\"dscpMarkings\":[\"kqbh\",\"y\",\"qunjqh\"],\"portCondition\":{\"flags\":[\"aulk\",\"akdkifmjnnawtqab\",\"xuckpggqoweyir\",\"hlisngw\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"izruwnpqxpxiwfc\",\"gjsaasiixtm\",\"zjvkviirhgfgrws\",\"pgratzvzbglbyvi\"],\"portGroupNames\":[\"tbrxkjz\",\"rgxffmshkw\",\"bkgozxwopdbydpi\",\"qaclnapxbiy\"]},\"protocolTypes\":[\"gjkn\",\"smfcttuxuuyilfl\"],\"vlanMatchCondition\":{\"vlans\":[\"uvr\",\"hmrnjhvsuj\"],\"innerVlans\":[\"zytqjtwhauunfpr\",\"jletlxsmrpddo\",\"ifamowazi\",\"nknlqwzdvpi\"],\"vlanGroupNames\":[\"qszdtmaajquhuxyl\",\"jvmtygjbmz\",\"ospspshckf\",\"yjpmspbpssdfppyo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"vczkcnyxrxmunjd\",\"vg\",\"nkvxlxpaglqi\"],\"ipGroupNames\":[\"kc\",\"khpzvuqdflv\",\"niypfpubcpzg\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"j\"},{\"type\":\"Count\",\"counterName\":\"ibg\"},{\"type\":\"Drop\",\"counterName\":\"p\"},{\"type\":\"Drop\",\"counterName\":\"ov\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"mhha\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"zvuporqzdfuydz\",\"kfvxcnq\"]},{\"name\":\"qpswokmvkhlggdhb\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"zszuwiwtglxx\"]},{\"name\":\"jfpgpicrmn\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"qgjsxvpqcbfrmbod\",\"hsqqgvriibakcl\",\"c\"]}],\"vlanGroups\":[{\"name\":\"xousxauzl\",\"vlans\":[\"gmwohqfzizvu\",\"mmkjsvthnwpztek\"]},{\"name\":\"mribiat\",\"vlans\":[\"lu\",\"fotang\",\"fhnykzcugs\",\"vxwlmzqwmvtxnj\"]},{\"name\":\"mcuqudtcvc\",\"vlans\":[\"npdkv\",\"fabuiyjibu\",\"phdu\"]},{\"name\":\"eiknpgo\",\"vlans\":[\"iuqhibtozipqwj\",\"d\",\"urrxxgewpktv\"]}],\"portGroups\":[{\"name\":\"mqpzoyhlfbcgw\",\"ports\":[\"oxoebqi\",\"jipnwj\",\"ujqlafcbahh\"]}]},{\"ipGroups\":[{\"name\":\"foiyjwpfilk\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"l\",\"dndviauogp\"]},{\"name\":\"artvti\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"chnmna\",\"mnxhkxjqirwrweo\"]}],\"vlanGroups\":[{\"name\":\"i\",\"vlans\":[\"wrsnewmozqvbu\",\"qmamhsycxhxzga\"]},{\"name\":\"taboidvmf\",\"vlans\":[\"pubowsepdfg\"]}],\"portGroups\":[{\"name\":\"herngb\",\"ports\":[\"uahokq\",\"obkauxofsh\",\"phwpnulaiywzej\"]},{\"name\":\"hs\",\"ports\":[\"ojpllndnpdwrpqaf\"]},{\"name\":\"ug\",\"ports\":[\"fhyete\"]},{\"name\":\"pococtfjgt\",\"ports\":[\"jvzuy\",\"urmlmuo\"]}]}]}") + "{\"configurationType\":\"Inline\",\"aclsUrl\":\"bdb\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"hedsvqwthmkyib\",\"sequenceNumber\":5904504388663898201,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"dhohsdtmcdzsuf\",\"ohdxbzlmcmu\",\"pcvhdbevwqqxeys\",\"onqzinkfkbgbzbow\"],\"fragments\":[\"o\"],\"ipLengths\":[\"mygvkzqkj\",\"eokbze\"],\"ttlValues\":[\"rx\",\"czurtlei\",\"q\"],\"dscpMarkings\":[\"wvz\"],\"portCondition\":{\"flags\":[\"dfbzdixzmq\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"pqhe\",\"jptmcgsbost\",\"eln\"],\"portGroupNames\":[\"tutmzl\",\"iojlvfhrb\",\"pn\",\"qvcww\"]},\"protocolNeighbors\":[\"r\",\"ochpprpr\",\"nmokayzejnhlbk\"],\"icmpConfiguration\":{\"icmpTypes\":[\"cpilj\",\"a\"]},\"protocolTypes\":[\"echndbnwieholew\",\"wiuub\",\"efqsfapaqtferrqw\",\"x\"],\"vlanMatchCondition\":{\"vlans\":[\"xap\",\"wogqqnobpudcdab\",\"qwpwyawbzasqbuc\",\"jg\"],\"innerVlans\":[\"xa\",\"guyaip\"],\"vlanGroupNames\":[\"daultxijjumfq\",\"azlnqnmcjngzqdqx\",\"bjwgnyfus\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"zh\",\"jqg\",\"cfhmlrqryxyn\"],\"ipGroupNames\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"]}},{\"etherTypes\":[\"zid\",\"xwaabzmifrygznmm\",\"xrizkzobgop\"],\"fragments\":[\"slnelx\"],\"ipLengths\":[\"xynl\",\"xecwcro\",\"phslhcawjutifdw\",\"mvi\"],\"ttlValues\":[\"qj\"],\"dscpMarkings\":[\"zhraglkafh\"],\"portCondition\":{\"flags\":[\"ujeickp\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"xelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"],\"portGroupNames\":[\"puamwabzxr\"]},\"protocolNeighbors\":[\"ushsp\"],\"icmpConfiguration\":{\"icmpTypes\":[\"mxyasflvgsgzw\"]},\"protocolTypes\":[\"koih\"],\"vlanMatchCondition\":{\"vlans\":[\"jblmljhlnymz\",\"tqyryuzcbmqqv\",\"mv\"],\"innerVlans\":[\"tayx\",\"nsup\",\"ujlzqnhcvsqltn\",\"oibgsxg\"],\"vlanGroupNames\":[\"yqo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"o\",\"dbxiqx\",\"iiqbi\"],\"ipGroupNames\":[\"mwwinhehfqpofv\",\"bcblemb\"]}}],\"actions\":[{\"type\":\"Remark\",\"counterName\":\"vxkdivqihebwtswb\",\"remarkComment\":\"wfmdurage\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"elisdjub\",\"remarkComment\":\"bqigkx\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Log\",\"counterName\":\"kga\",\"remarkComment\":\"rcmjdmspofapvuh\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"gbzjedmstkv\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"c\",\"iiznktwfan\"]}],\"vlanGroups\":[{\"name\":\"dibmikostbzbkiwb\",\"vlans\":[\"yophz\"]}],\"portGroups\":[{\"name\":\"gcrpfbcun\",\"ports\":[\"cez\",\"lfwyfwlwxjwetn\",\"sihclafzvaylp\"]}]},{\"ipGroups\":[{\"name\":\"qwztcmwqkc\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"xfe\"]}],\"vlanGroups\":[{\"name\":\"jexfdeqvhp\",\"vlans\":[\"kkshkbffm\",\"mxzjrgywwpgjx\",\"nptfujgi\",\"gaao\"]},{\"name\":\"ttaqutdew\",\"vlans\":[\"swvr\",\"unzzjgehk\"]}],\"portGroups\":[{\"name\":\"rtixokff\",\"ports\":[\"nljqepqwhixmons\",\"shiy\",\"gvelfc\",\"du\"]}]}],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"uwc\",\"sequenceNumber\":6517518115426729228,\"matchCondition\":{\"protocolTypes\":\"tmninw\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"nghgshej\",\"tbxqmuluxlxq\",\"vnersbycucrw\",\"amikzebrqbsm\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"fuhok\"}}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"vhczznvfby\",\"sequenceNumber\":8188906980935877313,\"matchCondition\":{\"protocolTypes\":\"wix\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"xqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"cs\"}},{\"matchConfigurationName\":\"ozihmipgawt\",\"sequenceNumber\":7225694249988782506,\"matchCondition\":{\"protocolTypes\":\"cxcjxgry\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"cil\",\"mcayk\",\"gnoxuztrksx\",\"pndfcpfnznt\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"aosrxuz\"}},{\"matchConfigurationName\":\"amktcqiosmgbzah\",\"sequenceNumber\":7652180722953630761,\"matchCondition\":{\"protocolTypes\":\"rtltla\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"atbhjmznn\",\"s\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"arvlagunbt\"}}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"nbmhyree\",\"sequenceNumber\":3097561434291248930,\"matchCondition\":{\"protocolTypes\":\"bpdqmjxlyy\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"wtlmjjyuo\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"xkjeytunlbfj\"}},{\"matchConfigurationName\":\"rusnk\",\"sequenceNumber\":9137583905855969726,\"matchCondition\":{\"protocolTypes\":\"qunjqh\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"l\",\"pakdkifmjnnawt\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"ckpggqoweyird\"}}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"wfl\",\"sequenceNumber\":5819390195361642433,\"matchCondition\":{\"protocolTypes\":\"ruwnpqxpx\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"jsa\",\"sii\",\"tmkzjvkviirhgfgr\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"atzv\"}},{\"matchConfigurationName\":\"glbyvi\",\"sequenceNumber\":7274387549715402996,\"matchCondition\":{\"protocolTypes\":\"xkjzwrgxffm\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"kgozxwop\",\"bydpizqaclnapxb\",\"yg\",\"ugjknf\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"uxuuyilflq\"}},{\"matchConfigurationName\":\"quvre\",\"sequenceNumber\":9110473532568054590,\"matchCondition\":{\"protocolTypes\":\"vsujztczytqjtwh\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"rnjlet\",\"xsmrpddouifamow\",\"z\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"qwzdvpiwhxq\"}},{\"matchConfigurationName\":\"dtmaa\",\"sequenceNumber\":4752695551064117756,\"matchCondition\":{\"protocolTypes\":\"ylr\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"jbmzyospspsh\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"pms\"}}]}],\"aclType\":\"ControlPlaneAcl\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"annotation\":\"yogtieyujtvczkcn\"}") .toObject(AccessControlListPatchProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("ivtsoxfrkenxpm", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("mpdnqqskawa", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3401106758360716727L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("nsrmffeycx", + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("bdb", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("hedsvqwthmkyib", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5904504388663898201L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("echndbnwieholew", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("rteeamm", + Assertions.assertEquals("xap", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("efdeesve", + Assertions.assertEquals("xa", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("xs", + Assertions.assertEquals("daultxijjumfq", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("sawddjibabxvi", + Assertions.assertEquals("zh", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("pqtgsfjac", + Assertions.assertEquals("rd", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("rtql", + Assertions.assertEquals("dhohsdtmcdzsuf", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("egnitg", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("lzxwhcansy", + Assertions.assertEquals("o", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("mygvkzqkj", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("sqvdaeyygux", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("dxasicddyvv", + Assertions.assertEquals("rx", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("wvz", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("vxevblb", + Assertions.assertEquals("pqhe", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("xeizzg", + Assertions.assertEquals("tutmzl", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("eaahhvjhhn", + Assertions.assertEquals("dfbzdixzmq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("pgdakchzyvli", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("mhha", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("r", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("cpilj", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("vxkdivqihebwtswb", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("wfmdurage", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("gbzjedmstkv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("zvuporqzdfuydz", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("xousxauzl", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("gmwohqfzizvu", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("mqpzoyhlfbcgw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("oxoebqi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("cpwpg", model.annotation()); + Assertions.assertEquals("c", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("dibmikostbzbkiwb", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("yophz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gcrpfbcun", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("cez", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(IpAddressType.IPV4, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("uwc", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6517518115426729228L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("tmninw", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("nghgshej", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.DENY, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().type()); + Assertions.assertEquals("fuhok", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().remarkComment()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("yogtieyujtvczkcn", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListPatchProperties model - = new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("ivtsoxfrkenxpm") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("mpdnqqskawa") - .withSequenceNumber(3401106758360716727L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("nsrmffeycx", "ktp")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("rteeamm", "qiekkkzddrt", "g", "ojbmxv")) - .withInnerVlans(Arrays.asList("efdeesve", "uij")) - .withVlanGroupNames(Arrays.asList("xs"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("sawddjibabxvi", "itvtzeexavo", "tfgle", "dmdqb")) - .withIpGroupNames(Arrays.asList("pqtgsfjac"))) - .withEtherTypes(Arrays.asList("rtql")) - .withFragments(Arrays.asList("egnitg", "kxlzyqdrfeg")) - .withIpLengths(Arrays.asList("lzxwhcansy", "oyqhlwig", "ivbkbxgomfaj")) - .withTtlValues(Arrays.asList("sqvdaeyygux", "kjsqzhzbezkgi")) - .withDscpMarkings(Arrays.asList("dxasicddyvv", "skgfmocwahpq")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("vxevblb", "ednljl", "geuaulx", "nsmjbnkppxynen")) - .withPortGroupNames(Arrays.asList("xeizzg")) - .withFlags(Arrays.asList("eaahhvjhhn", "kzyb", "jjidjk"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ftxfkf", "egprhptil")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("iqtgdqoh", "cwsldri")) - .withInnerVlans(Arrays.asList("pwbralllibphbqz")) - .withVlanGroupNames(Arrays.asList("aka", "ankjpdnjzh", "joylh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("rimrs", "pteecjme")) - .withIpGroupNames(Arrays.asList("stvasylwxdzaumw"))) - .withEtherTypes( - Arrays.asList("hhxud", "xvodhtnsir", "dhzmmesckdlp", "gzrcxfailcfxwmdb")) - .withFragments(Arrays.asList("fgsftufqob", "jln", "cgcckknhxkizvyt", "rzvul")) - .withIpLengths(Arrays.asList("aeranokqgukkjqnv", "roylaxxu", "cdisd", "sfjbjsvg")) - .withTtlValues(Arrays.asList("hryvy", "ytdc", "xgccknfnw")) - .withDscpMarkings(Arrays.asList("mvpdvjdhttzaef", "dxihc", "rphkmcrjdqnsdfz")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wxezwzhok", "bwnhhtql", "ehgpp", "pifhpfeoajvgcxtx")) - .withPortGroupNames(Arrays.asList("heafidlt", "gsresmkssj")) - .withFlags(Arrays.asList("gkylkdghr"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("szcofizeht", "hgbjkvrelje", "murvzm", "ov")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("shcxlpmjerbdk", "lvidizozs", "bccxjmonfdgn", "n")) - .withInnerVlans(Arrays.asList("uuwwltv")) - .withVlanGroupNames( - Arrays.asList("ctzenkeifzzhmkd", "svflyhbxcudch", "gsrboldforobw"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("fovvacqpbtuodxes", "abbelawumuaslzk", "rrwoycqucwyhahn")) - .withIpGroupNames(Arrays.asList("rkywuhpsvfuu", "utlwexxwla", "niexzsrzpgepq"))) - .withEtherTypes(Arrays.asList("hguuf", "zboyjathwt")) - .withFragments(Arrays.asList("b", "emwmdxmebwjs", "jpahlxvea")) - .withIpLengths(Arrays.asList("xnmwmqtibxyijddt", "qcttadijaeukmrsi")) - .withTtlValues(Arrays.asList("pndzaapmudqmeq")) - .withDscpMarkings(Arrays.asList("pibudqwyxebeybpm")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("sismjqfrddga", "quhiosrsjuivf", "disyirnxz")) - .withPortGroupNames(Arrays.asList("exrxzbujrtrhq", "wrevkhgnlnzon", "lrpiqywnc")) - .withFlags(Arrays.asList("tffyaqit", "hheioqaqhvseuf", "qyrxp"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("pgdakchzyvli"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("nrkcxkj") - .withSequenceNumber(3323219635606642946L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("hgrky")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("bsnmfpph", "jee")) - .withInnerVlans(Arrays.asList("yhsgz", "czbgomfgbeg", "qgleohibetnluank")) - .withVlanGroupNames( - Arrays.asList("xeeebtijvacvbmqz", "qqxlajr", "wxacevehj", "uyxoaf"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("eyl", "nm")) - .withIpGroupNames(Arrays.asList("xirpghriy", "oqeyhlqhykprl", "yznuciqd"))) - .withEtherTypes(Arrays.asList("wq", "ntvlwijpsttexo", "qpwcyyufmh")) - .withFragments(Arrays.asList("cuwmqsp")) - .withIpLengths(Arrays.asList("qzhlctddunq")) - .withTtlValues(Arrays.asList("fpch")) - .withDscpMarkings(Arrays.asList("njjrcgegydcwbox")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ubrjtl", "qxfuojrngif", "rzpasccbiuimzdly")) - .withPortGroupNames( - Arrays.asList("qwmkyoquf", "vruzslzojhpctfnm", "xotngfdguge")) - .withFlags(Arrays.asList("qqoli", "r"))), - new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("vkzqk", "jeokbzefezrxccz", "rtle", "pqxbkwvzgnzvdf")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("xzmqpnodawop")) - .withInnerVlans(Arrays.asList("wjptm", "gsbos")) - .withVlanGroupNames(Arrays.asList("lnd"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("biojlvf", "rbbpneqvcwwyy", "r")) - .withIpGroupNames(Arrays.asList("hppr"))) - .withEtherTypes(Arrays.asList("xiitdfuxt")) - .withFragments(Arrays.asList("iibmi", "bnn", "stgnl", "hnmgixhcm")) - .withIpLengths(Arrays.asList("qfoudorhcgyy", "rotwypundmbxhugc", "jkavl")) - .withTtlValues(Arrays.asList("bmftpmdt")) - .withDscpMarkings(Arrays.asList("ltfvnz", "yj", "otp", "opv")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts( - Arrays.asList("ihsgq", "wdhohsdtmcdzsu", "cohdx", "zlmcmuapcvhdb")) - .withPortGroupNames(Arrays.asList("qqxeyskon", "zinkfkbgbzbowxeq", "clj")) - .withFlags(Arrays.asList("zq", "qqihedsvqwthmk"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("dwfmvigorqjb", "tzh", "aglkafhon")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("eickpz", "cpopmxel")) - .withInnerVlans(Arrays.asList("ltyjedexxmlfmk")) - .withVlanGroupNames(Arrays.asList("azuawx", "z"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("zxrvxcus", "sphaivmxyasflvg", "gzwywak", "ihknsmjbl")) - .withIpGroupNames( - Arrays.asList("hlnymzotq", "ryuzcbmqqv", "mv", "fgtayxonsup"))) - .withEtherTypes(Arrays.asList("nmokayzejnhlbk", "bzpcpiljhahzvec", "ndbnwieh")) - .withFragments(Arrays.asList("wjwiuub", "efqsfapaqtferrqw", "x")) - .withIpLengths(Arrays.asList("fxapjwogqqnobpu", "cdabtqwpwya", - "bzasqbucljgkyexa", "guyaip")) - .withTtlValues(Arrays.asList("daultxijjumfq", "azlnqnmcjngzqdqx", "bjwgnyfus")) - .withDscpMarkings(Arrays.asList("vtuikzhajq", "lcfhmlrqryxy")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("sxwaabzm", "frygznmmax")) - .withPortGroupNames( - Arrays.asList("kzobgopxlhsln", "lxieixynllxecwcr", "jphslhcaw", "u")) - .withFlags(Arrays.asList("rd", "sovwxznptgoeiyb", "abpfhvfs", - "kvntjlrigjkskyri"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP).withCounterName("nh"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("ltnzoibgsxg"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("fyq") - .withSequenceNumber(6893006409525305180L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("yfwlwxjwet")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("hclafzvaylptrs", "qwztcmwqkc")) - .withInnerVlans(Arrays.asList("waxfewzjkj", "xfdeqvhpsyl", "ksh")) - .withVlanGroupNames(Arrays.asList("f", "bmxzjrgywwpg", "xs"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("cg", "aoepttaqutdew")) - .withIpGroupNames(Arrays.asList("swvr", "unzzjgehk"))) - .withEtherTypes(Arrays.asList("fdbxiqxeiiqbim")) - .withFragments( - Arrays.asList("wwinhehf", "pofvwb", "blembnkbwvqvxkd", "vqihebwtswbzuwf")) - .withIpLengths(Arrays.asList("ragegi", "vcjfelisdjubggb")) - .withTtlValues(Arrays.asList("kxkbsazgakgacyr", "m", "dmspof")) - .withDscpMarkings(Arrays.asList("uhrylniofr", "gbzjedmstkv")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("bkiw")) - .withPortGroupNames(Arrays.asList("n", "ophzfylsgcrp", "bcunezzceze")) - .withFlags(Arrays.asList("bcuiiz", "ktwfa", "snvpdibmi"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("noamldsehaohdj", "hflzokxco", "pelnjetag")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("oatftgzpnpbswvef")) - .withInnerVlans(Arrays.asList("cs", "mozi", "m", "pgawtxxpkyjcxcjx")) - .withVlanGroupNames(Arrays.asList("tfmpcycilrmcayk", "gnoxuztrksx"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("nznthjtw", "jaosrxuzv")) - .withIpGroupNames( - Arrays.asList("ktcqio", "mgbzahgxqdlyrtl", "laprlt", "katbhjm"))) - .withEtherTypes(Arrays.asList("m")) - .withFragments(Arrays.asList("xokffqyin", "jqepqwhi", "monstshiyxgve")) - .withIpLengths(Arrays.asList("lduccbi", "ds")) - .withTtlValues(Arrays.asList("cobiegstmninwjiz", "i")) - .withDscpMarkings( - Arrays.asList("hgshe", "jtbxqmuluxlx", "zvners", "ycucrwnamikzeb")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("fbycjs", "jww")) - .withPortGroupNames(Arrays.asList("vumwmxqh")) - .withFlags(Arrays.asList("mswziq", "fuhok", "ruswhv"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("gjkn", "smfcttuxuuyilfl")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("uvr", "hmrnjhvsuj")) - .withInnerVlans(Arrays.asList("zytqjtwhauunfpr", "jletlxsmrpddo", - "ifamowazi", "nknlqwzdvpi")) - .withVlanGroupNames(Arrays.asList("qszdtmaajquhuxyl", "jvmtygjbmz", - "ospspshckf", "yjpmspbpssdfppyo"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("vczkcnyxrxmunjd", "vg", "nkvxlxpaglqi")) - .withIpGroupNames(Arrays.asList("kc", "khpzvuqdflv", "niypfpubcpzg"))) - .withEtherTypes(Arrays.asList("bsoqeqala", "vlagun", "tgfebwln")) - .withFragments(Arrays.asList("yreeudz", "av")) - .withIpLengths(Arrays.asList("qmjxlyyzglgouwtl", "jjyuojqtobax")) - .withTtlValues(Arrays.asList("ytunlbfjkwr")) - .withDscpMarkings(Arrays.asList("kqbh", "y", "qunjqh")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("izruwnpqxpxiwfc", "gjsaasiixtm", "zjvkviirhgfgrws", - "pgratzvzbglbyvi")) - .withPortGroupNames( - Arrays.asList("tbrxkjz", "rgxffmshkw", "bkgozxwopdbydpi", "qaclnapxbiy")) - .withFlags( - Arrays.asList("aulk", "akdkifmjnnawtqab", "xuckpggqoweyir", "hlisngw"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("j"), - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("ibg"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("p"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("ov"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("mhha") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("zvuporqzdfuydz", "kfvxcnq")), - new IpGroupProperties().withName("qpswokmvkhlggdhb") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("zszuwiwtglxx")), - new IpGroupProperties().withName("jfpgpicrmn") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("qgjsxvpqcbfrmbod", "hsqqgvriibakcl", "c")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("xousxauzl") - .withVlans(Arrays.asList("gmwohqfzizvu", "mmkjsvthnwpztek")), - new VlanGroupProperties().withName("mribiat") - .withVlans(Arrays.asList("lu", "fotang", "fhnykzcugs", "vxwlmzqwmvtxnj")), - new VlanGroupProperties().withName("mcuqudtcvc") - .withVlans(Arrays.asList("npdkv", "fabuiyjibu", "phdu")), - new VlanGroupProperties().withName("eiknpgo") - .withVlans(Arrays.asList("iuqhibtozipqwj", "d", "urrxxgewpktv")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("mqpzoyhlfbcgw") - .withPorts(Arrays.asList("oxoebqi", "jipnwj", "ujqlafcbahh")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("foiyjwpfilk") + = new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.INLINE) + .withAclsUrl("bdb") + .withDefaultAction(CommunityActionTypes.DENY) + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("hedsvqwthmkyib") + .withSequenceNumber(5904504388663898201L) .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("l", "dndviauogp")), - new IpGroupProperties().withName("artvti") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("chnmna", "mnxhkxjqirwrweo")))) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("echndbnwieholew", "wiuub", "efqsfapaqtferrqw", "x")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("xap", "wogqqnobpudcdab", + "qwpwyawbzasqbuc", "jg")) + .withInnerVlans(Arrays.asList("xa", "guyaip")) + .withVlanGroupNames(Arrays.asList("daultxijjumfq", + "azlnqnmcjngzqdqx", "bjwgnyfus"))) + .withIpCondition(new IpMatchConditionPatch() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("zh", "jqg", "cfhmlrqryxyn")) + .withIpGroupNames(Arrays.asList("rd", "sovwxznptgoeiyb", "abpfhvfs", + "kvntjlrigjkskyri"))) + .withEtherTypes( + Arrays.asList( + "dhohsdtmcdzsuf", "ohdxbzlmcmu", "pcvhdbevwqqxeys", + "onqzinkfkbgbzbow")) + .withFragments(Arrays.asList("o")) + .withIpLengths(Arrays.asList("mygvkzqkj", "eokbze")) + .withTtlValues(Arrays.asList("rx", "czurtlei", "q")) + .withDscpMarkings(Arrays.asList("wvz")) + .withPortCondition(new AccessControlListPortConditionPatch() + .withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("pqhe", "jptmcgsbost", "eln")) + .withPortGroupNames( + Arrays.asList("tutmzl", "iojlvfhrb", "pn", "qvcww")) + .withFlags(Arrays.asList("dfbzdixzmq"))) + .withProtocolNeighbors(Arrays.asList("r", "ochpprpr", "nmokayzejnhlbk")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("cpilj", "a"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("koih")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("jblmljhlnymz", "tqyryuzcbmqqv", "mv")) + .withInnerVlans( + Arrays.asList("tayx", "nsup", "ujlzqnhcvsqltn", "oibgsxg")) + .withVlanGroupNames(Arrays.asList("yqo"))) + .withIpCondition(new IpMatchConditionPatch() + .withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("o", "dbxiqx", "iiqbi")) + .withIpGroupNames(Arrays.asList("mwwinhehfqpofv", "bcblemb"))) + .withEtherTypes(Arrays.asList("zid", "xwaabzmifrygznmm", "xrizkzobgop")) + .withFragments(Arrays.asList("slnelx")) + .withIpLengths( + Arrays.asList("xynl", "xecwcro", "phslhcawjutifdw", "mvi")) + .withTtlValues(Arrays.asList("qj")) + .withDscpMarkings(Arrays.asList("zhraglkafh")) + .withPortCondition(new AccessControlListPortConditionPatch() + .withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("xelnwc", "tyjedex", "mlfmkqs", "azuawx")) + .withPortGroupNames(Arrays.asList("puamwabzxr")) + .withFlags(Arrays.asList("ujeickp"))) + .withProtocolNeighbors(Arrays.asList("ushsp")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("mxyasflvgsgzw"))))) + .withActions(Arrays.asList( + new AccessControlListActionPatch() + .withType(AclActionType.REMARK) + .withCounterName("vxkdivqihebwtswb") + .withRemarkComment("wfmdurage") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListActionPatch().withType(AclActionType.COUNT) + .withCounterName("elisdjub") + .withRemarkComment("bqigkx") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("kga") + .withRemarkComment("rcmjdmspofapvuh") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("gbzjedmstkv") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("c", "iiznktwfan")))) + .withVlanGroups(Arrays.asList(new VlanGroupPatchProperties().withName("dibmikostbzbkiwb") + .withVlans(Arrays.asList("yophz")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("gcrpfbcun") + .withPorts(Arrays.asList("cez", "lfwyfwlwxjwetn", "sihclafzvaylp")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("qwztcmwqkc") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("xfe")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("i") - .withVlans(Arrays.asList("wrsnewmozqvbu", "qmamhsycxhxzga")), - new VlanGroupProperties().withName("taboidvmf").withVlans(Arrays.asList("pubowsepdfg")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("herngb") - .withPorts(Arrays.asList("uahokq", "obkauxofsh", "phwpnulaiywzej")), - new PortGroupProperties().withName("hs").withPorts(Arrays.asList("ojpllndnpdwrpqaf")), - new PortGroupProperties().withName("ug").withPorts(Arrays.asList("fhyete")), - new PortGroupProperties().withName("pococtfjgt") - .withPorts(Arrays.asList("jvzuy", "urmlmuo")))))) - .withAnnotation("cpwpg"); + new VlanGroupPatchProperties().withName("jexfdeqvhp") + .withVlans(Arrays.asList("kkshkbffm", "mxzjrgywwpgjx", "nptfujgi", "gaao")), + new VlanGroupPatchProperties().withName("ttaqutdew") + .withVlans(Arrays.asList("swvr", "unzzjgehk")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("rtixokff") + .withPorts(Arrays.asList("nljqepqwhixmons", "shiy", "gvelfc", "du")))))) + .withControlPlaneAclConfiguration(Arrays.asList( + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("uwc") + .withSequenceNumber(6517518115426729228L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("tmninw") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("nghgshej", "tbxqmuluxlxq", "vnersbycucrw", "amikzebrqbsm")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("fuhok")))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("vhczznvfby") + .withSequenceNumber(8188906980935877313L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("wix") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays + .asList("xqhndvnoamlds", "haohdjhhflzokxc", "xpelnjetagltsx", "atftgzpnpbsw")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch() + .withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("cs")), + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("ozihmipgawt") + .withSequenceNumber(7225694249988782506L) + .withMatchCondition( + new ControlPlaneAclMatchConditionPatch().withProtocolTypes("cxcjxgry") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("cil", "mcayk", "gnoxuztrksx", "pndfcpfnznt")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("aosrxuz")), + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("amktcqiosmgbzah") + .withSequenceNumber(7652180722953630761L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("rtltla") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("atbhjmznn", "s")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch() + .withType(ControlPlaneAclActionType.REMARK) + .withRemarkComment("arvlagunbt")))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("nbmhyree") + .withSequenceNumber(3097561434291248930L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("bpdqmjxlyy") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("wtlmjjyuo")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("xkjeytunlbfj")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("rusnk") + .withSequenceNumber(9137583905855969726L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("qunjqh") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("l", "pakdkifmjnnawt")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("ckpggqoweyird")))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("wfl") + .withSequenceNumber(5819390195361642433L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("ruwnpqxpx") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("jsa", "sii", "tmkzjvkviirhgfgr")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("atzv")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("glbyvi") + .withSequenceNumber(7274387549715402996L) + .withMatchCondition( + new ControlPlaneAclMatchConditionPatch().withProtocolTypes("xkjzwrgxffm") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("kgozxwop", "bydpizqaclnapxb", "yg", "ugjknf")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("uxuuyilflq")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("quvre") + .withSequenceNumber(9110473532568054590L) + .withMatchCondition( + new ControlPlaneAclMatchConditionPatch().withProtocolTypes("vsujztczytqjtwh") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("rnjlet", "xsmrpddouifamow", "z")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("qwzdvpiwhxq")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("dtmaa") + .withSequenceNumber(4752695551064117756L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("ylr") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch()) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch()) + .withFlags(Arrays.asList("jbmzyospspsh")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties())) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.REMARK) + .withRemarkComment("pms")))))) + .withAclType(AclType.CONTROL_PLANE_ACL) + .withDeviceRole(DeviceRole.NPB) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withAnnotation("yogtieyujtvczkcn"); model = BinaryData.fromObject(model).toObject(AccessControlListPatchProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("ivtsoxfrkenxpm", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("mpdnqqskawa", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3401106758360716727L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("nsrmffeycx", + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("bdb", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("hedsvqwthmkyib", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5904504388663898201L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("echndbnwieholew", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("rteeamm", + Assertions.assertEquals("xap", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("efdeesve", + Assertions.assertEquals("xa", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("xs", + Assertions.assertEquals("daultxijjumfq", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("sawddjibabxvi", + Assertions.assertEquals("zh", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("pqtgsfjac", + Assertions.assertEquals("rd", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("rtql", + Assertions.assertEquals("dhohsdtmcdzsuf", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("egnitg", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("lzxwhcansy", + Assertions.assertEquals("o", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("mygvkzqkj", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("sqvdaeyygux", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("dxasicddyvv", + Assertions.assertEquals("rx", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("wvz", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("vxevblb", + Assertions.assertEquals("pqhe", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("xeizzg", + Assertions.assertEquals("tutmzl", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("eaahhvjhhn", + Assertions.assertEquals("dfbzdixzmq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("pgdakchzyvli", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("mhha", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("r", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("cpilj", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("vxkdivqihebwtswb", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("wfmdurage", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("gbzjedmstkv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("zvuporqzdfuydz", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("xousxauzl", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("gmwohqfzizvu", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("mqpzoyhlfbcgw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("oxoebqi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("cpwpg", model.annotation()); + Assertions.assertEquals("c", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("dibmikostbzbkiwb", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("yophz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gcrpfbcun", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("cez", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(IpAddressType.IPV4, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("uwc", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6517518115426729228L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("tmninw", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("nghgshej", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.DENY, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().type()); + Assertions.assertEquals("fuhok", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().remarkComment()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("yogtieyujtvczkcn", model.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java index a52d041fe7ea..daf3e862b6d6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java @@ -1,26 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -30,161 +39,298 @@ public final class AccessControlListPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPatch model = BinaryData.fromString( - "{\"properties\":{\"annotation\":\"yavluwmncstt\",\"configurationType\":\"File\",\"aclsUrl\":\"bvpoekrsgsgbdhu\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"gkynscliqh\",\"sequenceNumber\":1086161776680069290,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"u\",\"otppnv\",\"xz\"],\"fragments\":[\"hfrbbc\",\"vqagtltdhlf\",\"qojpy\"],\"ipLengths\":[\"trdcnifmzzs\"],\"ttlValues\":[\"brn\"],\"dscpMarkings\":[\"xmprafwg\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"xvd\",\"ffwafq\",\"oudaspavehhrvk\",\"unzo\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"moy\"},{\"type\":\"Drop\",\"counterName\":\"uibhmfdnbzydvfv\"},{\"type\":\"Drop\",\"counterName\":\"aeoisrvh\"},{\"type\":\"Drop\",\"counterName\":\"ffukiscvw\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"efaxvxilc\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"nzeyqxtjj\"]}],\"vlanGroups\":[{\"name\":\"qhycavodggxdbees\",\"vlans\":[\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"]},{\"name\":\"jocqwogfnzjvusf\",\"vlans\":[\"mozuxylfsb\",\"kadpysown\"]},{\"name\":\"gkbugrjqct\",\"vlans\":[\"mi\",\"of\"]}],\"portGroups\":[{\"name\":\"efojyqdhcupl\",\"ports\":[\"cwkhihi\",\"lhzdsqtzb\",\"rgnowcjhfgm\"]},{\"name\":\"cact\",\"ports\":[\"oteyowc\",\"uqovekqvgqouwif\"]},{\"name\":\"pjwyiv\",\"ports\":[\"f\",\"cvhrfsp\",\"uagrttikteusqc\"]},{\"name\":\"vyklxuby\",\"ports\":[\"fmmfblcqcu\"]}]},{\"ipGroups\":[{\"name\":\"ibrta\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"t\",\"gdslqxihhrmoo\"]},{\"name\":\"qseypxiutcxa\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"petogebjox\",\"lhvnhlab\",\"q\",\"kkzjcjbtrga\"]},{\"name\":\"vvib\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"toqbeitpkxztmoob\"]},{\"name\":\"ft\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wqmpimaqxzhemjyh\"]}],\"vlanGroups\":[{\"name\":\"swtwkozzwc\",\"vlans\":[\"bawpfajnjwltlwt\"]}],\"portGroups\":[{\"name\":\"ktalhsnvkcdmxz\",\"ports\":[\"aimlnwiaaom\",\"l\"]}]},{\"ipGroups\":[{\"name\":\"ulcsethwwnpj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"]}],\"vlanGroups\":[{\"name\":\"po\",\"vlans\":[\"xcjzhqizxfpxt\",\"qscjavftjuh\",\"qaz\",\"mtggu\"]},{\"name\":\"ijr\",\"vlans\":[\"ivmmghfcfiwrxgk\",\"euvyinzqodfvpgs\"]},{\"name\":\"xgsg\",\"vlans\":[\"gzdjtxvzf\",\"bqvgaqv\",\"gafcqu\"]},{\"name\":\"dvetnws\",\"vlans\":[\"tnwlduycv\"]}],\"portGroups\":[{\"name\":\"rmewipmve\",\"ports\":[\"ukuqgsj\",\"xundxgk\"]},{\"name\":\"wzhhzjhfjmhvvmuv\",\"ports\":[\"uneqsxvmhf\"]},{\"name\":\"zjyi\",\"ports\":[\"sbhud\"]},{\"name\":\"ohyuemslynsq\",\"ports\":[\"foobrlttyms\",\"nygq\"]}]}]},\"tags\":{\"yvi\":\"wqzdzgtilaxhnfhq\",\"ti\":\"ouwivkxoyzunbixx\"}}") + "{\"properties\":{\"configurationType\":\"File\",\"aclsUrl\":\"wpijrajci\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"cf\",\"sequenceNumber\":6256550625746718554,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"yinzqodfvpgs\"],\"fragments\":[\"gsgbpfgzdjt\"],\"ipLengths\":[\"flbqvgaq\",\"lgafcqusrdve\"],\"ttlValues\":[\"sdtutnwlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\"],\"dscpMarkings\":[\"hzjhf\",\"mhv\"],\"portCondition\":{},\"protocolNeighbors\":[\"gpmuneqsxvmhfbuz\",\"yihsasbhudypohyu\"],\"icmpConfiguration\":{},\"protocolTypes\":[\"ynsqyrpfoobr\",\"ttymsjny\",\"qdnfwqzdz\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"xhnfhqly\",\"ijouwivkxoyzunb\"],\"fragments\":[\"rtikvcpwpg\",\"lrcivtsoxfrke\",\"xpmyyefrpmpdnq\",\"skawaoqvmmb\"],\"ipLengths\":[\"fr\"],\"ttlValues\":[\"kzmegnitgvkxlz\",\"qdrfegcealzxwhc\",\"nsymoyqhlwigd\",\"vbkbxgomf\"],\"dscpMarkings\":[\"wasqvdaeyyg\",\"xakjsqzhzb\"],\"portCondition\":{},\"protocolNeighbors\":[\"imsidxasicddyvvj\"],\"icmpConfiguration\":{},\"protocolTypes\":[\"mocwa\",\"pqg\",\"tjeaahhvjhh\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"bbjjidjksyxk\",\"xvxevblbjednljla\",\"euaulxu\"],\"fragments\":[\"jbnkpp\",\"ynenlsvxeizz\"],\"ipLengths\":[\"lnsrmffe\",\"cxcktpi\",\"merteeammxqiek\"],\"ttlValues\":[\"ddrtkgdojb\",\"xv\"],\"dscpMarkings\":[\"efdeesve\",\"uij\"],\"portCondition\":{},\"protocolNeighbors\":[\"s\"],\"icmpConfiguration\":{},\"protocolTypes\":[\"tujwsawdd\",\"ibabxvititvtzeex\",\"vo\",\"tfgle\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"bwpypqtgsfjacb\"],\"fragments\":[\"hxudbxvodht\",\"sirudhzmmesckdlp\"],\"ipLengths\":[\"rcxfailcfxwmdb\",\"xdfgsftufqobr\",\"lnacgcc\",\"knh\"],\"ttlValues\":[\"zvytnrzvuljraaer\"],\"dscpMarkings\":[\"kqg\",\"kkjqnvbroylaxxu\",\"cdisd\"],\"portCondition\":{},\"protocolNeighbors\":[\"b\",\"svgjrwhryvy\",\"ytdc\"],\"icmpConfiguration\":{},\"protocolTypes\":[\"cknfnwmbtmvpd\",\"jdhttzaefedxi\",\"ch\",\"phkmcrjdqnsdfz\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"kdghrjeuutlwx\",\"remarkComment\":\"w\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"bwnhhtql\",\"remarkComment\":\"hgppipifhpfeoa\",\"policeRateConfiguration\":{}},{\"type\":\"Count\",\"counterName\":\"txjcsheafidlt\",\"remarkComment\":\"sr\",\"policeRateConfiguration\":{}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"h\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"f\",\"fwegprhptillu\",\"biqtgdq\",\"hm\"]},{\"name\":\"sldrizetpwbral\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"hbqzmizakakankjp\",\"n\"]},{\"name\":\"ha\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jlmuoyxprimrsopt\",\"ecj\"]},{\"name\":\"islstv\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xdza\",\"mweoohgu\",\"fuzboyjathwtzolb\",\"emwmdxmebwjs\"]}],\"vlanGroups\":[{\"name\":\"hlxvea\",\"vlans\":[\"xnmwmqtibxyijddt\",\"qcttadijaeukmrsi\"]}],\"portGroups\":[{\"name\":\"ndzaapmudq\",\"ports\":[\"wig\",\"ibudqwy\",\"eb\",\"ybpmzznrtffyaq\"]}]},{\"ipGroups\":[{\"name\":\"heioqa\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"ufuqyrx\",\"dlcgqlsismjqfr\",\"dgamquhiosrsj\",\"ivfcdisyirnx\"]}],\"vlanGroups\":[{\"name\":\"exrxzbujrtrhq\",\"vlans\":[\"evkh\",\"nlnzonzlrpi\",\"yw\"]},{\"name\":\"vjtszcofize\",\"vlans\":[\"hgbjkvrelje\",\"murvzm\",\"ov\"]},{\"name\":\"nashcxlp\",\"vlans\":[\"rbdkelvidiz\",\"zsdbccxjmon\"]},{\"name\":\"gnwncypuuwwlt\",\"vlans\":[\"jctzenkei\",\"zzhmkd\",\"svflyhbxcudch\"]}],\"portGroups\":[{\"name\":\"boldforobwj\",\"ports\":[\"zbfhfovvac\",\"pbt\",\"odxeszabbela\"]},{\"name\":\"muaslzkw\",\"ports\":[\"oycqucwy\",\"ahnomdrkywu\",\"psvfuurutlwexxwl\"]},{\"name\":\"niexzsrzpgepq\",\"ports\":[\"bwwpgdakchzy\"]}]},{\"ipGroups\":[{\"name\":\"q\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"kjibnxmysuxswqrn\",\"vl\",\"ijpstte\"]},{\"name\":\"qqpwcyyuf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cuwmqsp\"]},{\"name\":\"dqzh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"unqndyfpchrqb\",\"jjrcgegydc\"]},{\"name\":\"oxjumvqqo\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"aiouaubrjt\",\"oq\",\"fuojrngif\"]}],\"vlanGroups\":[{\"name\":\"asccbiui\",\"vlans\":[\"lyjdfqwm\",\"yoqufdvruz\"]}],\"portGroups\":[{\"name\":\"j\",\"ports\":[\"tfnmdx\",\"tngfdgugeyzihgr\",\"yui\"]},{\"name\":\"bsnmfpph\",\"ports\":[\"evy\"]},{\"name\":\"hsgz\",\"ports\":[\"bgomfgbegl\",\"gleohi\",\"etnluankrrfx\"]}]}],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"acvbmqz\",\"sequenceNumber\":137903725051553660,\"matchCondition\":{},\"action\":{}}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"acevehjkuyx\",\"sequenceNumber\":5046707434469334203,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"lt\",\"sequenceNumber\":2336181597653108768,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"mfgvxirpghriypo\",\"sequenceNumber\":7116262338386252749,\"matchCondition\":{},\"action\":{}}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"lpyznuciqdsmexi\",\"sequenceNumber\":7908176630325869623,\"matchCondition\":{},\"action\":{}},{\"matchConfigurationName\":\"yasiibmiy\",\"sequenceNumber\":1116985418326144663,\"matchCondition\":{},\"action\":{}}]},{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"nmgixh\",\"sequenceNumber\":1424200423877643928,\"matchCondition\":{},\"action\":{}}]}],\"aclType\":\"Management\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"annotation\":\"gyyprotwy\"},\"tags\":{\"bxhugcmjkavlgorb\":\"d\"}}") .toObject(AccessControlListPatch.class); - Assertions.assertEquals("wqzdzgtilaxhnfhq", model.tags().get("yvi")); - Assertions.assertEquals("yavluwmncstt", model.annotation()); + Assertions.assertEquals("d", model.tags().get("bxhugcmjkavlgorb")); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("bvpoekrsgsgbdhu", model.aclsUrl()); + Assertions.assertEquals("wpijrajci", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("gkynscliqh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1086161776680069290L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("cf", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6256550625746718554L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xvd", + Assertions.assertEquals("ynsqyrpfoobr", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("hfrbbc", + Assertions.assertEquals("yinzqodfvpgs", + model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("gsgbpfgzdjt", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("trdcnifmzzs", + Assertions.assertEquals("flbqvgaq", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("brn", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("xmprafwg", + Assertions.assertEquals("sdtutnwlduyc", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("hzjhf", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("moy", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("efaxvxilc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("gpmuneqsxvmhfbuz", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("kdghrjeuutlwx", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("w", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("h", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("nzeyqxtjj", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qhycavodggxdbees", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("knlrariaawiuagy", + Assertions.assertEquals("f", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("hlxvea", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("xnmwmqtibxyijddt", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("efojyqdhcupl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("cwkhihi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("ndzaapmudq", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("wig", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(IpAddressType.IPV4, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("acvbmqz", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(137903725051553660L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(AclType.MANAGEMENT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("gyyprotwy", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListPatch model = new AccessControlListPatch() - .withTags(mapOf("yvi", "wqzdzgtilaxhnfhq", "ti", "ouwivkxoyzunbixx")) - .withAnnotation("yavluwmncstt") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("bvpoekrsgsgbdhu") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfiguration() - .withMatchConfigurationName("gkynscliqh") - .withSequenceNumber(1086161776680069290L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("xvd", "ffwafq", "oudaspavehhrvk", "unzo")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("u", "otppnv", "xz")) - .withFragments(Arrays.asList("hfrbbc", "vqagtltdhlf", "qojpy")) - .withIpLengths(Arrays.asList("trdcnifmzzs")) - .withTtlValues(Arrays.asList("brn")) - .withDscpMarkings(Arrays.asList("xmprafwg")) - .withPortCondition(new AccessControlListPortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.LOG).withCounterName("moy"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("uibhmfdnbzydvfv"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("aeoisrvh"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("ffukiscvw"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("efaxvxilc") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("nzeyqxtjj")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("qhycavodggxdbees") - .withVlans(Arrays.asList("knlrariaawiuagy", "wqfbylyrfgiagt")), - new VlanGroupProperties().withName("jocqwogfnzjvusf") - .withVlans(Arrays.asList("mozuxylfsb", "kadpysown")), - new VlanGroupProperties().withName("gkbugrjqct").withVlans(Arrays.asList("mi", "of")))) - .withPortGroups(Arrays.asList(new PortGroupProperties() - .withName("efojyqdhcupl") - .withPorts(Arrays.asList("cwkhihi", "lhzdsqtzb", "rgnowcjhfgm")), - new PortGroupProperties().withName("cact") - .withPorts(Arrays.asList("oteyowc", "uqovekqvgqouwif")), - new PortGroupProperties().withName("pjwyiv") - .withPorts(Arrays.asList("f", "cvhrfsp", "uagrttikteusqc")), - new PortGroupProperties().withName("vyklxuby").withPorts(Arrays.asList("fmmfblcqcu")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ibrta") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("t", "gdslqxihhrmoo")), - new IpGroupProperties().withName("qseypxiutcxa") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("petogebjox", "lhvnhlab", "q", "kkzjcjbtrga")), - new IpGroupProperties().withName("vvib") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("toqbeitpkxztmoob")), - new IpGroupProperties().withName("ft") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wqmpimaqxzhemjyh")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("swtwkozzwc").withVlans(Arrays.asList("bawpfajnjwltlwt")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("ktalhsnvkcdmxz") - .withPorts(Arrays.asList("aimlnwiaaom", "l")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("ulcsethwwnpj") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("po") - .withVlans(Arrays.asList("xcjzhqizxfpxt", "qscjavftjuh", "qaz", "mtggu")), - new VlanGroupProperties().withName("ijr") - .withVlans(Arrays.asList("ivmmghfcfiwrxgk", "euvyinzqodfvpgs")), - new VlanGroupProperties().withName("xgsg") - .withVlans(Arrays.asList("gzdjtxvzf", "bqvgaqv", "gafcqu")), - new VlanGroupProperties().withName("dvetnws").withVlans(Arrays.asList("tnwlduycv")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("rmewipmve").withPorts(Arrays.asList("ukuqgsj", "xundxgk")), - new PortGroupProperties().withName("wzhhzjhfjmhvvmuv").withPorts(Arrays.asList("uneqsxvmhf")), - new PortGroupProperties().withName("zjyi").withPorts(Arrays.asList("sbhud")), - new PortGroupProperties().withName("ohyuemslynsq") - .withPorts(Arrays.asList("foobrlttyms", "nygq")))))); + AccessControlListPatch model + = new AccessControlListPatch().withTags(mapOf("bxhugcmjkavlgorb", "d")) + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("wpijrajci") + .withDefaultAction(CommunityActionTypes.DENY) + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("cf") + .withSequenceNumber(6256550625746718554L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("ynsqyrpfoobr", "ttymsjny", "qdnfwqzdz")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes(Arrays.asList("yinzqodfvpgs")) + .withFragments(Arrays.asList("gsgbpfgzdjt")) + .withIpLengths(Arrays.asList("flbqvgaq", "lgafcqusrdve")) + .withTtlValues(Arrays.asList("sdtutnwlduyc", "uzhyrmewipmvekdx", + "kuqgsjjxundxgket")) + .withDscpMarkings(Arrays.asList("hzjhf", "mhv")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors( + Arrays.asList("gpmuneqsxvmhfbuz", "yihsasbhudypohyu")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("mocwa", "pqg", "tjeaahhvjhh")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes(Arrays.asList("xhnfhqly", "ijouwivkxoyzunb")) + .withFragments(Arrays.asList("rtikvcpwpg", "lrcivtsoxfrke", + "xpmyyefrpmpdnq", "skawaoqvmmb")) + .withIpLengths(Arrays.asList("fr")) + .withTtlValues( + Arrays.asList( + "kzmegnitgvkxlz", "qdrfegcealzxwhc", "nsymoyqhlwigd", + "vbkbxgomf")) + .withDscpMarkings(Arrays.asList("wasqvdaeyyg", "xakjsqzhzb")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors(Arrays.asList("imsidxasicddyvvj")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()), + new AccessControlListMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("tujwsawdd", "ibabxvititvtzeex", "vo", "tfgle")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes( + Arrays.asList("bbjjidjksyxk", "xvxevblbjednljla", "euaulxu")) + .withFragments(Arrays.asList("jbnkpp", "ynenlsvxeizz")) + .withIpLengths(Arrays.asList("lnsrmffe", "cxcktpi", "merteeammxqiek")) + .withTtlValues(Arrays.asList("ddrtkgdojb", "xv")) + .withDscpMarkings(Arrays.asList("efdeesve", "uij")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors(Arrays.asList("s")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("cknfnwmbtmvpd", "jdhttzaefedxi", "ch", + "phkmcrjdqnsdfz")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes(Arrays.asList("bwpypqtgsfjacb")) + .withFragments(Arrays.asList("hxudbxvodht", "sirudhzmmesckdlp")) + .withIpLengths( + Arrays.asList("rcxfailcfxwmdb", "xdfgsftufqobr", "lnacgcc", "knh")) + .withTtlValues(Arrays.asList("zvytnrzvuljraaer")) + .withDscpMarkings(Arrays.asList("kqg", "kkjqnvbroylaxxu", "cdisd")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors(Arrays.asList("b", "svgjrwhryvy", "ytdc")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()))) + .withActions(Arrays.asList( + new AccessControlListActionPatch().withType(AclActionType.DROP) + .withCounterName("kdghrjeuutlwx") + .withRemarkComment("w") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("bwnhhtql") + .withRemarkComment("hgppipifhpfeoa") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListActionPatch().withType(AclActionType.COUNT) + .withCounterName("txjcsheafidlt") + .withRemarkComment("sr") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfigurationPatch() + .withIpGroups( + Arrays + .asList( + new IpGroupPatchProperties().withName("h") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("f", "fwegprhptillu", "biqtgdq", "hm")), + new IpGroupPatchProperties().withName("sldrizetpwbral") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("hbqzmizakakankjp", "n")), + new IpGroupPatchProperties().withName("ha") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("jlmuoyxprimrsopt", "ecj")), + new IpGroupPatchProperties().withName("islstv") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("xdza", "mweoohgu", "fuzboyjathwtzolb", + "emwmdxmebwjs")))) + .withVlanGroups(Arrays.asList(new VlanGroupPatchProperties().withName("hlxvea") + .withVlans(Arrays.asList("xnmwmqtibxyijddt", "qcttadijaeukmrsi")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("ndzaapmudq") + .withPorts(Arrays.asList("wig", "ibudqwy", "eb", "ybpmzznrtffyaq")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups( + Arrays.asList(new IpGroupPatchProperties().withName("heioqa") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("ufuqyrx", "dlcgqlsismjqfr", "dgamquhiosrsj", + "ivfcdisyirnx")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("exrxzbujrtrhq") + .withVlans(Arrays.asList("evkh", "nlnzonzlrpi", "yw")), + new VlanGroupPatchProperties().withName("vjtszcofize") + .withVlans(Arrays.asList("hgbjkvrelje", "murvzm", "ov")), + new VlanGroupPatchProperties().withName("nashcxlp") + .withVlans(Arrays.asList("rbdkelvidiz", "zsdbccxjmon")), + new VlanGroupPatchProperties().withName("gnwncypuuwwlt") + .withVlans(Arrays.asList("jctzenkei", "zzhmkd", "svflyhbxcudch")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("boldforobwj") + .withPorts(Arrays.asList("zbfhfovvac", "pbt", "odxeszabbela")), + new PortGroupPatchProperties().withName("muaslzkw") + .withPorts(Arrays.asList("oycqucwy", "ahnomdrkywu", "psvfuurutlwexxwl")), + new PortGroupPatchProperties().withName("niexzsrzpgepq") + .withPorts(Arrays.asList("bwwpgdakchzy")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("q") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("kjibnxmysuxswqrn", "vl", "ijpstte")), + new IpGroupPatchProperties().withName("qqpwcyyuf") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("cuwmqsp")), + new IpGroupPatchProperties().withName("dqzh") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("unqndyfpchrqb", "jjrcgegydc")), + new IpGroupPatchProperties().withName("oxjumvqqo") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("aiouaubrjt", "oq", "fuojrngif")))) + .withVlanGroups(Arrays.asList(new VlanGroupPatchProperties().withName("asccbiui") + .withVlans(Arrays.asList("lyjdfqwm", "yoqufdvruz")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("j") + .withPorts(Arrays.asList("tfnmdx", "tngfdgugeyzihgr", "yui")), + new PortGroupPatchProperties().withName("bsnmfpph").withPorts(Arrays.asList("evy")), + new PortGroupPatchProperties().withName("hsgz") + .withPorts(Arrays.asList("bgomfgbegl", "gleohi", "etnluankrrfx")))))) + .withControlPlaneAclConfiguration(Arrays.asList( + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations( + Arrays.asList(new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("acvbmqz") + .withSequenceNumber(137903725051553660L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("acevehjkuyx") + .withSequenceNumber(5046707434469334203L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("lt") + .withSequenceNumber(2336181597653108768L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()), + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("mfgvxirpghriypo") + .withSequenceNumber(7116262338386252749L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("lpyznuciqdsmexi") + .withSequenceNumber(7908176630325869623L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()), + new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("yasiibmiy") + .withSequenceNumber(1116985418326144663L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()))), + new ControlPlaneAclPatchProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("nmgixh") + .withSequenceNumber(1424200423877643928L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch()) + .withAction(new ControlPlaneAclActionPatch()))))) + .withAclType(AclType.MANAGEMENT) + .withDeviceRole(DeviceRole.NPB) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.FALSE)) + .withAnnotation("gyyprotwy"); model = BinaryData.fromObject(model).toObject(AccessControlListPatch.class); - Assertions.assertEquals("wqzdzgtilaxhnfhq", model.tags().get("yvi")); - Assertions.assertEquals("yavluwmncstt", model.annotation()); + Assertions.assertEquals("d", model.tags().get("bxhugcmjkavlgorb")); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("bvpoekrsgsgbdhu", model.aclsUrl()); + Assertions.assertEquals("wpijrajci", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("gkynscliqh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1086161776680069290L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("cf", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6256550625746718554L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xvd", + Assertions.assertEquals("ynsqyrpfoobr", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("hfrbbc", + Assertions.assertEquals("yinzqodfvpgs", + model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("gsgbpfgzdjt", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("trdcnifmzzs", + Assertions.assertEquals("flbqvgaq", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("brn", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("xmprafwg", + Assertions.assertEquals("sdtutnwlduyc", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("hzjhf", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("moy", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("efaxvxilc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("gpmuneqsxvmhfbuz", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("kdghrjeuutlwx", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("w", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("h", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("nzeyqxtjj", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qhycavodggxdbees", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("knlrariaawiuagy", + Assertions.assertEquals("f", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("hlxvea", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("xnmwmqtibxyijddt", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("efojyqdhcupl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("cwkhihi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("ndzaapmudq", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("wig", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(IpAddressType.IPV4, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("acvbmqz", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(137903725051553660L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(AclType.MANAGEMENT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("gyyprotwy", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java deleted file mode 100644 index d1e398851a06..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PortType; -import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; -import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListPatchableProperties model = BinaryData.fromString( - "{\"configurationType\":\"File\",\"aclsUrl\":\"lfltka\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dlfoakggkfp\",\"sequenceNumber\":2099147795702198960,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"blylsyxkqjnsj\",\"r\",\"tiagx\"],\"fragments\":[\"zuempsbzkf\"],\"ipLengths\":[\"yvpnqicvinvkjj\",\"dxrbuukzcle\",\"yhmlwpaztzp\",\"fn\"],\"ttlValues\":[\"wyfzqwhxxbuyqa\",\"zfeqztppri\",\"lxorjaltolmncws\",\"bqwcsdbnwdcf\"],\"dscpMarkings\":[\"qdpfuvglsbjjca\",\"vxb\"],\"portCondition\":{\"flags\":[\"dut\",\"cormr\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ofudflvkgju\",\"gdknnqv\",\"aznqntoru\",\"sgsahmkycgr\"],\"portGroupNames\":[\"juetaebur\"]},\"protocolTypes\":[\"movsmzlxwabmqoe\",\"kif\"],\"vlanMatchCondition\":{\"vlans\":[\"u\",\"ujmqlgkfbtndoa\",\"n\",\"bjcntujitc\"],\"innerVlans\":[\"ftwwaezkojvdc\"],\"vlanGroupNames\":[\"oqouicybxarzgszu\",\"oxciqopidoamcio\",\"hkh\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"onlwntoeg\"],\"ipGroupNames\":[\"wbw\",\"kszzcmrvexztv\",\"t\",\"gsfraoyzkoow\"]}},{\"etherTypes\":[\"nguxawqaldsy\",\"uximerqfobw\",\"znkbykutwpfhpagm\",\"r\"],\"fragments\":[\"snfdsdoakgtdl\",\"kkze\",\"dlhewp\",\"sdsttwvog\"],\"ipLengths\":[\"ejdcngqqmoakuf\",\"m\"],\"ttlValues\":[\"wr\"],\"dscpMarkings\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"portCondition\":{\"flags\":[\"oftrmaequia\",\"xicslfao\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"lhalnswh\",\"csphkaiv\",\"itqscywuggwoluhc\"],\"portGroupNames\":[\"emh\"]},\"protocolTypes\":[\"sbrgz\",\"wmsweypqwd\",\"ggicccnxqhue\"],\"vlanMatchCondition\":{\"vlans\":[\"tlstvlzywem\",\"zrncsdt\",\"lusiy\",\"bsfgytguslfea\"],\"innerVlans\":[\"gq\",\"kyhejhzisxgf\",\"elolppvksrpqvuj\"],\"vlanGroupNames\":[\"ehtwdwrft\",\"wib\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"ipGroupNames\":[\"ltiugcxnavv\"]}},{\"etherTypes\":[\"ibyqunyowxwlmdj\"],\"fragments\":[\"fgbvfvpdbo\",\"acizsjqlhkrr\",\"bdeibqipqk\",\"hvxndzwmkrefajpj\"],\"ipLengths\":[\"kqnyh\",\"b\"],\"ttlValues\":[\"jivfxzsjabib\",\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"dscpMarkings\":[\"jjklff\",\"mouwqlgzrfzeey\"],\"portCondition\":{\"flags\":[\"ikayuhqlbjbsybb\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"dgmfpgvmpipasl\",\"haq\",\"x\"],\"portGroupNames\":[\"wutwbdsre\",\"pdrhne\",\"yowqkdwytisibir\"]},\"protocolTypes\":[\"ikpzimejza\",\"lfzxiavrmbzonoki\"],\"vlanMatchCondition\":{\"vlans\":[\"cirgzp\"],\"innerVlans\":[\"azszrnwoiindfpw\",\"jylwbtlhflsj\"],\"vlanGroupNames\":[\"szfjvfbgofelja\",\"rqmq\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"ojnal\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"],\"ipGroupNames\":[\"hftqsxhqxujxukn\",\"xdigrjg\",\"ufzdmsyq\",\"fi\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"z\"},{\"type\":\"Drop\",\"counterName\":\"mvpp\"},{\"type\":\"Drop\",\"counterName\":\"qzudphq\"},{\"type\":\"Log\",\"counterName\":\"kfwynw\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ayhmtnvyqiatkz\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wzcjaesgvvsccy\"]}],\"vlanGroups\":[{\"name\":\"qfhwyg\",\"vlans\":[\"dnkfx\",\"semdwzrmu\",\"apfcqdpsq\"]}],\"portGroups\":[{\"name\":\"svuo\",\"ports\":[\"ccelve\"]},{\"name\":\"ypql\",\"ports\":[\"okerqwkyhkobop\",\"xedk\",\"wep\",\"qpcrf\"]},{\"name\":\"wccsnjvcdwxlpqek\",\"ports\":[\"khtj\",\"y\",\"ngwfqatm\"]}]},{\"ipGroups\":[{\"name\":\"mdvy\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"gszywk\",\"irryuzhlh\",\"joqrvqqaatj\",\"nrvgoupmfiibfgg\"]},{\"name\":\"ool\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"v\",\"kkgll\"]}],\"vlanGroups\":[{\"name\":\"gvjayvblmh\",\"vlans\":[\"uhbxvvy\",\"gsopbyrqufegxu\",\"wz\",\"bnhlmc\"]},{\"name\":\"p\",\"vlans\":[\"itvgbmhrixkwm\",\"ijejvegrhbpn\"]},{\"name\":\"xexccbdreaxhcexd\",\"vlans\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"]}],\"portGroups\":[{\"name\":\"owvrvmtgjqppyos\",\"ports\":[\"nzm\"]},{\"name\":\"gfipnsxk\",\"ports\":[\"a\",\"krrjrea\",\"xt\",\"gumhjglikkxws\"]}]},{\"ipGroups\":[{\"name\":\"qpvuzlmvfelf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"crpw\",\"xeznoi\"]},{\"name\":\"rnjwmw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"azej\"]},{\"name\":\"qkagfhsxt\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xnfaazpxdtnk\",\"mkqjj\"]},{\"name\":\"uenvrkp\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"bre\",\"qaaysjkixqt\"]}],\"vlanGroups\":[{\"name\":\"ezl\",\"vlans\":[\"fiakpjpqqm\",\"edltmmjihyeozp\"]},{\"name\":\"wau\",\"vlans\":[\"c\"]}],\"portGroups\":[{\"name\":\"kvi\",\"ports\":[\"scw\",\"qupevzh\",\"stotxh\",\"jujbypelmcuvhixb\"]},{\"name\":\"yfwnylr\",\"ports\":[\"lsttpkiwkkbnuj\"]},{\"name\":\"wvtylbfpncurdo\",\"ports\":[\"ithtywu\",\"xcbihw\"]}]},{\"ipGroups\":[{\"name\":\"dntwjchrdgo\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wct\",\"ndz\",\"luudfdlwggytsb\",\"tov\"]}],\"vlanGroups\":[{\"name\":\"einqf\",\"vlans\":[\"x\",\"knpirgnepttwq\",\"sniffc\",\"mqnrojlpijnkr\"]},{\"name\":\"rddh\",\"vlans\":[\"tizzronasxif\"]}],\"portGroups\":[{\"name\":\"yzhftwesgogczh\",\"ports\":[\"xkr\",\"gnyhmossxkkg\",\"h\",\"rghxjb\"]}]}]}") - .toObject(AccessControlListPatchableProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("lfltka", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("dlfoakggkfp", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2099147795702198960L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("movsmzlxwabmqoe", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ftwwaezkojvdc", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("oqouicybxarzgszu", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("onlwntoeg", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("wbw", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("blylsyxkqjnsj", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("zuempsbzkf", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("yvpnqicvinvkjj", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("qdpfuvglsbjjca", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ofudflvkgju", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("juetaebur", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dut", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("z", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ayhmtnvyqiatkz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wzcjaesgvvsccy", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qfhwyg", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dnkfx", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("svuo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("ccelve", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListPatchableProperties model - = new AccessControlListPatchableProperties().withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("lfltka") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfiguration() - .withMatchConfigurationName("dlfoakggkfp") - .withSequenceNumber(2099147795702198960L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("movsmzlxwabmqoe", "kif")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("u", "ujmqlgkfbtndoa", "n", "bjcntujitc")) - .withInnerVlans(Arrays.asList("ftwwaezkojvdc")) - .withVlanGroupNames(Arrays.asList("oqouicybxarzgszu", "oxciqopidoamcio", "hkh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("onlwntoeg")) - .withIpGroupNames(Arrays.asList("wbw", "kszzcmrvexztv", "t", "gsfraoyzkoow"))) - .withEtherTypes(Arrays.asList("blylsyxkqjnsj", "r", "tiagx")) - .withFragments(Arrays.asList("zuempsbzkf")) - .withIpLengths(Arrays.asList("yvpnqicvinvkjj", "dxrbuukzcle", "yhmlwpaztzp", "fn")) - .withTtlValues( - Arrays.asList("wyfzqwhxxbuyqa", "zfeqztppri", "lxorjaltolmncws", "bqwcsdbnwdcf")) - .withDscpMarkings(Arrays.asList("qdpfuvglsbjjca", "vxb")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ofudflvkgju", "gdknnqv", "aznqntoru", "sgsahmkycgr")) - .withPortGroupNames(Arrays.asList("juetaebur")) - .withFlags(Arrays.asList("dut", "cormr"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("sbrgz", "wmsweypqwd", "ggicccnxqhue")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("tlstvlzywem", "zrncsdt", "lusiy", "bsfgytguslfea")) - .withInnerVlans(Arrays.asList("gq", "kyhejhzisxgf", "elolppvksrpqvuj")) - .withVlanGroupNames(Arrays.asList("ehtwdwrft", "wib"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("hfwpracstwit", "khevxccedc", "nmdyodnwzxl", "jc")) - .withIpGroupNames(Arrays.asList("ltiugcxnavv"))) - .withEtherTypes(Arrays.asList("nguxawqaldsy", "uximerqfobw", "znkbykutwpfhpagm", "r")) - .withFragments(Arrays.asList("snfdsdoakgtdl", "kkze", "dlhewp", "sdsttwvog")) - .withIpLengths(Arrays.asList("ejdcngqqmoakuf", "m")) - .withTtlValues(Arrays.asList("wr")) - .withDscpMarkings(Arrays.asList("twaenuuzko", "bminrfdwoyuhhzi", "iefozbhdmsml")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("lhalnswh", "csphkaiv", "itqscywuggwoluhc")) - .withPortGroupNames(Arrays.asList("emh")) - .withFlags(Arrays.asList("oftrmaequia", "xicslfao"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ikpzimejza", "lfzxiavrmbzonoki")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("cirgzp")) - .withInnerVlans(Arrays.asList("azszrnwoiindfpw", "jylwbtlhflsj")) - .withVlanGroupNames(Arrays.asList("szfjvfbgofelja", "rqmq"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("ojnal", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws")) - .withIpGroupNames(Arrays.asList("hftqsxhqxujxukn", "xdigrjg", "ufzdmsyq", "fi"))) - .withEtherTypes(Arrays.asList("ibyqunyowxwlmdj")) - .withFragments( - Arrays.asList("fgbvfvpdbo", "acizsjqlhkrr", "bdeibqipqk", "hvxndzwmkrefajpj")) - .withIpLengths(Arrays.asList("kqnyh", "b")) - .withTtlValues( - Arrays.asList("jivfxzsjabib", "ystawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")) - .withDscpMarkings(Arrays.asList("jjklff", "mouwqlgzrfzeey")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("dgmfpgvmpipasl", "haq", "x")) - .withPortGroupNames(Arrays.asList("wutwbdsre", "pdrhne", "yowqkdwytisibir")) - .withFlags(Arrays.asList("ikayuhqlbjbsybb"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP).withCounterName("z"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("mvpp"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("qzudphq"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("kfwynw"))))) - .withDynamicMatchConfigurations( - Arrays - .asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("ayhmtnvyqiatkz") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wzcjaesgvvsccy")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("qfhwyg") - .withVlans(Arrays.asList("dnkfx", "semdwzrmu", "apfcqdpsq")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("svuo") - .withPorts(Arrays.asList("ccelve")), - new PortGroupProperties().withName("ypql") - .withPorts(Arrays.asList("okerqwkyhkobop", "xedk", "wep", "qpcrf")), - new PortGroupProperties().withName("wccsnjvcdwxlpqek") - .withPorts(Arrays.asList("khtj", "y", "ngwfqatm")))), - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays - .asList( - new IpGroupProperties().withName("mdvy") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("gszywk", "irryuzhlh", "joqrvqqaatj", - "nrvgoupmfiibfgg")), - new IpGroupProperties().withName("ool") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("v", "kkgll")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("gvjayvblmh") - .withVlans(Arrays.asList("uhbxvvy", "gsopbyrqufegxu", "wz", "bnhlmc")), - new VlanGroupProperties().withName("p") - .withVlans(Arrays.asList("itvgbmhrixkwm", "ijejvegrhbpn")), - new VlanGroupProperties().withName("xexccbdreaxhcexd") - .withVlans(Arrays.asList("qahqkghtpwijn", "yjsvfyc", "z")))) - .withPortGroups( - Arrays.asList( - new PortGroupProperties().withName("owvrvmtgjqppyos") - .withPorts(Arrays.asList("nzm")), - new PortGroupProperties().withName("gfipnsxk") - .withPorts(Arrays.asList("a", "krrjrea", "xt", "gumhjglikkxws")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("qpvuzlmvfelf") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("crpw", "xeznoi")), - new IpGroupProperties().withName("rnjwmw") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("azej")), - new IpGroupProperties().withName("qkagfhsxt") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("xnfaazpxdtnk", "mkqjj")), - new IpGroupProperties().withName("uenvrkp") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("bre", "qaaysjkixqt")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ezl") - .withVlans(Arrays.asList("fiakpjpqqm", "edltmmjihyeozp")), - new VlanGroupProperties().withName("wau").withVlans(Arrays.asList("c")))) - .withPortGroups(Arrays - .asList( - new PortGroupProperties().withName("kvi") - .withPorts(Arrays.asList("scw", "qupevzh", "stotxh", "jujbypelmcuvhixb")), - new PortGroupProperties().withName("yfwnylr") - .withPorts(Arrays.asList("lsttpkiwkkbnuj")), - new PortGroupProperties() - .withName("wvtylbfpncurdo") - .withPorts(Arrays.asList("ithtywu", "xcbihw")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("dntwjchrdgo") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wct", "ndz", "luudfdlwggytsb", "tov")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("einqf") - .withVlans(Arrays.asList("x", "knpirgnepttwq", "sniffc", "mqnrojlpijnkr")), - new VlanGroupProperties().withName("rddh") - .withVlans(Arrays.asList("tizzronasxif")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("yzhftwesgogczh") - .withPorts(Arrays.asList("xkr", "gnyhmossxkkg", "h", "rghxjb")))))); - model = BinaryData.fromObject(model).toObject(AccessControlListPatchableProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("lfltka", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("dlfoakggkfp", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2099147795702198960L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("movsmzlxwabmqoe", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ftwwaezkojvdc", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("oqouicybxarzgszu", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("onlwntoeg", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("wbw", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("blylsyxkqjnsj", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("zuempsbzkf", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("yvpnqicvinvkjj", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("qdpfuvglsbjjca", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ofudflvkgju", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("juetaebur", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dut", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("z", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ayhmtnvyqiatkz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wzcjaesgvvsccy", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qfhwyg", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dnkfx", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("svuo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("ccelve", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java new file mode 100644 index 000000000000..607877192a48 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListPortConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListPortConditionPatch model = BinaryData.fromString( + "{\"flags\":[\"vtzejetjklnti\",\"yjuzkdb\",\"zolxrzvhqjwtr\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"c\",\"rkolawjm\"],\"portGroupNames\":[\"wro\",\"cdxfzzzwyjafitl\",\"guyn\",\"chl\"]}") + .toObject(AccessControlListPortConditionPatch.class); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("c", model.ports().get(0)); + Assertions.assertEquals("wro", model.portGroupNames().get(0)); + Assertions.assertEquals("vtzejetjklnti", model.flags().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListPortConditionPatch model + = new AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("c", "rkolawjm")) + .withPortGroupNames(Arrays.asList("wro", "cdxfzzzwyjafitl", "guyn", "chl")) + .withFlags(Arrays.asList("vtzejetjklnti", "yjuzkdb", "zolxrzvhqjwtr")); + model = BinaryData.fromObject(model).toObject(AccessControlListPortConditionPatch.class); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("c", model.ports().get(0)); + Assertions.assertEquals("wro", model.portGroupNames().get(0)); + Assertions.assertEquals("vtzejetjklnti", model.flags().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java index a10f38e70b00..125d2a7e2364 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,28 +15,27 @@ public final class AccessControlListPortConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPortCondition model = BinaryData.fromString( - "{\"flags\":[\"oljxkcgx\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"gcvizqzdwlvwlyou\",\"fgfb\"],\"portGroupNames\":[\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}") + "{\"flags\":[\"zqujizdvoqytiby\",\"wb\",\"lgy\"],\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"hjoxo\",\"smsks\",\"pi\"],\"portGroupNames\":[\"oljxkcgx\"]}") .toObject(AccessControlListPortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); - Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); - Assertions.assertEquals("oljxkcgx", model.flags().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("hjoxo", model.ports().get(0)); + Assertions.assertEquals("oljxkcgx", model.portGroupNames().get(0)); + Assertions.assertEquals("zqujizdvoqytiby", model.flags().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListPortCondition model - = new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("gcvizqzdwlvwlyou", "fgfb")) - .withPortGroupNames(Arrays.asList("bdyhgkfminsgowz", "ttsttktlahbqact")) - .withFlags(Arrays.asList("oljxkcgx")); + AccessControlListPortCondition model = new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("hjoxo", "smsks", "pi")) + .withPortGroupNames(Arrays.asList("oljxkcgx")) + .withFlags(Arrays.asList("zqujizdvoqytiby", "wb", "lgy")); model = BinaryData.fromObject(model).toObject(AccessControlListPortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); - Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); - Assertions.assertEquals("oljxkcgx", model.flags().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("hjoxo", model.ports().get(0)); + Assertions.assertEquals("oljxkcgx", model.portGroupNames().get(0)); + Assertions.assertEquals("zqujizdvoqytiby", model.flags().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java index 419b9c380770..2dfc4829cbb1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,13 +11,29 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -31,449 +47,548 @@ public final class AccessControlListPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListProperties model = BinaryData.fromString( - "{\"lastSyncedTime\":\"2021-01-16T20:17:07Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"aclsUrl\":\"i\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xqbzvddntwnd\",\"sequenceNumber\":4634265215487541073,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"oqvuhr\",\"cffcyddglmj\"],\"fragments\":[\"qkwpyeicxmqc\",\"wqvhkhixuigdt\",\"pbobjo\"],\"ipLengths\":[\"e\"],\"ttlValues\":[\"m\"],\"dscpMarkings\":[\"rzayv\",\"t\",\"gvdfgiotkftutq\",\"ln\"],\"portCondition\":{\"flags\":[\"fgugnxkrxdqmid\",\"thz\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"bhj\",\"big\"],\"portGroupNames\":[\"qfbow\",\"kanyktzlcuiywg\",\"ywgndrv\"]},\"protocolTypes\":[\"zgpphrcgyncocpe\",\"fvm\",\"coofsxlzev\",\"bmqj\"],\"vlanMatchCondition\":{\"vlans\":[\"y\"],\"innerVlans\":[\"vkwlzuvccfwnf\",\"bacfionlebxetq\",\"tzxdpnqbqqwx\",\"jfeallnwsub\"],\"vlanGroupNames\":[\"jampmngnzscxaqw\",\"ochcbonqvpkvl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ipheoflokeyyien\",\"bdlwtgrhpdjpj\",\"masxazjpqyegu\",\"lhbxxhejjzzvdud\"],\"ipGroupNames\":[\"slfhotwm\",\"ynpwlbj\",\"pgacftadehxnlty\"]}},{\"etherTypes\":[\"ppusuesnzwdejba\",\"orxzdmohctbqvud\",\"xdn\"],\"fragments\":[\"owgujjugwdkcglhs\"],\"ipLengths\":[\"jdyggdtji\"],\"ttlValues\":[\"kuofqweykhme\"],\"dscpMarkings\":[\"fyexfwhy\",\"cibvyvdcsitynn\"],\"portCondition\":{\"flags\":[\"ectehf\",\"qsc\",\"eypvhezrkg\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fovgmkqsleyyvxy\",\"jpkcattpng\"],\"portGroupNames\":[\"cczsq\",\"jh\",\"mdajv\"]},\"protocolTypes\":[\"ounqecano\",\"eupfhyhltrpm\",\"pjmcmatuokthfuiu\",\"odsfcpkvxodpuozm\"],\"vlanMatchCondition\":{\"vlans\":[\"agfuaxbezyiu\",\"kktwhrdxw\",\"ywqsmbsurexim\",\"ryocfsfksymdd\"],\"innerVlans\":[\"kiiuxhqyudxor\"],\"vlanGroupNames\":[\"b\",\"oczvy\",\"fqrvkdvjsllrmvvd\",\"watkpnpulexxb\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"qzbqjvsov\",\"yokacspkw\"],\"ipGroupNames\":[\"dobpxjmflbvvn\",\"hrk\",\"ciwwzjuqkhr\",\"ajiwkuo\"]}},{\"etherTypes\":[\"kg\",\"sauuimj\",\"vxieduugidyj\"],\"fragments\":[\"byao\"],\"ipLengths\":[\"xc\"],\"ttlValues\":[\"pclhocohslk\"],\"dscpMarkings\":[\"eggzfb\",\"hfmvfaxkffe\"],\"portCondition\":{\"flags\":[\"lvmezyvshxmzsbbz\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xwburvjxxjns\",\"ydptkoen\"],\"portGroupNames\":[\"knvudwtiukb\",\"dng\",\"pocipazyxoegu\"]},\"protocolTypes\":[\"npiucgygevqznty\",\"mrbpizcdrqj\",\"dpydn\"],\"vlanMatchCondition\":{\"vlans\":[\"de\",\"ejzicwifsjtt\",\"zfbishcbkhaj\"],\"innerVlans\":[\"eamdp\",\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\"],\"vlanGroupNames\":[\"njeputtmrywn\",\"zoqftiyqzrnkcqvy\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"cohoq\",\"nwvlryavwhheunmm\",\"hgyxzkonoc\"],\"ipGroupNames\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"jektcxsenh\"},{\"type\":\"Drop\",\"counterName\":\"ffrzpwvlqdqgbiqy\"},{\"type\":\"Count\",\"counterName\":\"aetcktvfcivfs\"},{\"type\":\"Drop\",\"counterName\":\"uctqhjfbe\"}]},{\"matchConfigurationName\":\"jcxerfuwu\",\"sequenceNumber\":3193420375672203078,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"rp\"],\"fragments\":[\"pcyvahfnljkyqx\",\"vuujq\",\"idokgjlj\"],\"ipLengths\":[\"gvcl\",\"bgsncghkjeszzhb\"],\"ttlValues\":[\"txfvgx\",\"fsm\",\"nehmpvecx\",\"odebfqkkrbmpu\"],\"dscpMarkings\":[\"iw\",\"lzlfbxzpuz\",\"cispnqzahmgkbr\"],\"portCondition\":{\"flags\":[\"hibnuqqkpika\",\"rgvtqag\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ijggmebfsiar\",\"utrc\"],\"portGroupNames\":[\"azzmhjrunmpxt\"]},\"protocolTypes\":[\"hrbnlankxmyskpbh\"],\"vlanMatchCondition\":{\"vlans\":[\"kcxywnyt\",\"rsyn\",\"qidybyx\",\"zfcl\"],\"innerVlans\":[\"xdbabphlwr\",\"lfktsths\"],\"vlanGroupNames\":[\"cmnyyazttb\",\"wwrq\",\"uedck\",\"ywbiexzfeyueax\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"qwalmuzyoxaepd\"],\"ipGroupNames\":[\"ancuxrhd\",\"bavxbniwdjswzt\"]}},{\"etherTypes\":[\"pgn\"],\"fragments\":[\"x\"],\"ipLengths\":[\"xbzpfzab\",\"lcuhxwtctyqiklb\",\"ovplw\"],\"ttlValues\":[\"vgyuguos\",\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\"],\"dscpMarkings\":[\"yighxpk\"],\"portCondition\":{\"flags\":[\"aiuebbaumnyqu\",\"edeojnabc\",\"hsmtxpsiebtfhvp\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"rdqmhjjdhtldwkyz\",\"uutkncw\"],\"portGroupNames\":[\"svlxotogtwrup\",\"sx\",\"nmic\",\"kvceoveilovnotyf\"]},\"protocolTypes\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"],\"vlanMatchCondition\":{\"vlans\":[\"fpl\",\"hoxus\"],\"innerVlans\":[\"abgy\",\"psbjta\"],\"vlanGroupNames\":[\"gxywpmue\",\"fjz\",\"fqkquj\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bglaocqxtccm\",\"yudxytlmoy\",\"xv\"],\"ipGroupNames\":[\"dw\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"dzhlrq\"},{\"type\":\"Log\",\"counterName\":\"kfrlhrxsbky\"},{\"type\":\"Drop\",\"counterName\":\"anuzbpzkafkuw\"},{\"type\":\"Count\",\"counterName\":\"wbme\"}]},{\"matchConfigurationName\":\"seyvj\",\"sequenceNumber\":2840663437896188419,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"deemao\",\"mx\",\"gkvtmelmqkrhah\",\"ljuahaquhcdh\"],\"fragments\":[\"alaexqpvfadmwsrc\",\"gvxp\",\"gomz\",\"fmisg\"],\"ipLengths\":[\"b\",\"e\"],\"ttlValues\":[\"wkz\"],\"dscpMarkings\":[\"io\",\"rqhakauha\",\"hsfwxosowzxcug\"],\"portCondition\":{\"flags\":[\"oxdjebwpuc\",\"wfvovbv\",\"euecivyhzceuoj\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"eiotwmcdytdx\",\"it\",\"nrjawgqwg\"],\"portGroupNames\":[\"isk\"]},\"protocolTypes\":[\"kpycgklwndnhjd\",\"uwhvylwzbtdhxujz\"],\"vlanMatchCondition\":{\"vlans\":[\"ow\"],\"innerVlans\":[\"rzqlveu\",\"lupj\"],\"vlanGroupNames\":[\"fxobbcsws\",\"tjrip\",\"rbpbewtghfgblcg\",\"xzvlvqhjkbegib\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"waloayqcgwr\",\"zjuzgwyz\",\"htxongmtsavjc\",\"pwxqp\"],\"ipGroupNames\":[\"nftguvriuhpr\",\"mdyvxqtayriw\",\"ro\"]}},{\"etherTypes\":[\"exrmcqibycnojvk\",\"mefqsgzvahapjyzh\"],\"fragments\":[\"qzcjrvxdj\",\"lmwlxkvugfhzo\"],\"ipLengths\":[\"jvzunluthnnp\",\"nxipeil\",\"jzuaejxdultskzbb\"],\"ttlValues\":[\"umveekgpwozuhkf\",\"bsjyofdx\",\"uusdttouwa\"],\"dscpMarkings\":[\"kqvkelnsmvbxwyjs\",\"lh\"],\"portCondition\":{\"flags\":[\"lnjixisxya\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"cslyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"],\"portGroupNames\":[\"laulppg\",\"dtpnapnyiropuhp\",\"gvpgy\",\"gqgitxmedjvcsl\"]},\"protocolTypes\":[\"wwncwzzhxgk\",\"rmgucnap\"],\"vlanMatchCondition\":{\"vlans\":[\"ellwptfdy\",\"pfqbuaceopzf\"],\"innerVlans\":[\"huaoppp\",\"qeqxo\"],\"vlanGroupNames\":[\"ahzxctobgbk\",\"moizpos\",\"mgrcfbu\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kxbpvj\",\"mjh\"],\"ipGroupNames\":[\"yngudivk\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"qzvszjf\"},{\"type\":\"Log\",\"counterName\":\"fdxxivetvtcqaqtd\"}]},{\"matchConfigurationName\":\"mcbxvwvxysl\",\"sequenceNumber\":2902711033817845170,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"tkblmpewww\",\"bkrvrnsvshqj\",\"hxcr\"],\"fragments\":[\"ovasrruvwbhsqfsu\",\"cgjbirxbp\"],\"ipLengths\":[\"rfbjf\",\"twss\",\"t\"],\"ttlValues\":[\"vjz\",\"exilzznfqqnvwpmq\"],\"dscpMarkings\":[\"uoujmkcjhwqy\",\"jrybnwjewgdrjer\"],\"portCondition\":{\"flags\":[\"nqpeh\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"mifthnzdnd\",\"l\",\"nayqi\"],\"portGroupNames\":[\"duhavhqlkt\",\"umaq\",\"lbg\",\"cdui\"]},\"protocolTypes\":[\"gccymvaolpssl\",\"lfmmdnbbglzpswi\",\"d\",\"cwyhzdxssa\"],\"vlanMatchCondition\":{\"vlans\":[\"nvdfznuda\",\"dvxzbncblylpst\"],\"innerVlans\":[\"hxsrzdzucersc\"],\"vlanGroupNames\":[\"nevf\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"sslswtmweriof\",\"pyqs\"],\"ipGroupNames\":[\"abnetshh\"]}},{\"etherTypes\":[\"edplvwiwubmw\"],\"fragments\":[\"sldnkwwtppjflcxo\"],\"ipLengths\":[\"konzmnsik\",\"mkqzeqqkdltfzxmh\",\"v\",\"gureodkwobdag\"],\"ttlValues\":[\"bqdxbx\",\"akbogqxndlkzgxh\",\"ripl\",\"podxunkb\"],\"dscpMarkings\":[\"mubyynt\",\"lrb\",\"tkoievseotgq\",\"l\"],\"portCondition\":{\"flags\":[\"wlauwzizxbmpg\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"muvp\",\"ttdumorppxebmnzb\",\"bhjpglkfgohdne\",\"el\"],\"portGroupNames\":[\"sdyhtozfikdowwq\"]},\"protocolTypes\":[\"xzxcl\"],\"vlanMatchCondition\":{\"vlans\":[\"hqzonosggbhcoh\",\"wdsjnkalju\",\"iiswacffgdkzze\"],\"innerVlans\":[\"vhqcrail\",\"pnppfuf\"],\"vlanGroupNames\":[\"dmhdlxyjr\",\"sag\",\"fcnihgwq\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"cvkcvqvpkeqdcv\",\"rhvoods\",\"tbobz\"],\"ipGroupNames\":[\"cjwvn\",\"dldwmgxc\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"utwu\"},{\"type\":\"Log\",\"counterName\":\"pkhjwni\"},{\"type\":\"Log\",\"counterName\":\"uicpd\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"vmbmp\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"fv\",\"efyw\"]}],\"vlanGroups\":[{\"name\":\"vmwy\",\"vlans\":[\"ouyftaakc\",\"wiyzvqtmnubexkp\"]},{\"name\":\"smond\",\"vlans\":[\"uxvypomgkopkwh\",\"jvp\",\"jqg\"]},{\"name\":\"smocmbq\",\"vlans\":[\"mkcxozapvh\",\"lxprglyatddckcbc\"]}],\"portGroups\":[{\"name\":\"jxgciqibrh\",\"ports\":[\"sdqrhzoymibmrq\",\"ibahwflus\",\"dtmhrkwofyyvoqa\",\"piexpbtgiw\"]},{\"name\":\"oenwashr\",\"ports\":[\"kcnqxwbpo\",\"ulpiuj\"]},{\"name\":\"asipqiio\",\"ports\":[\"qerpqlpqwcc\",\"uqgbdbutauvfbt\",\"uwhhmhykojoxafn\"]},{\"name\":\"lpichk\",\"ports\":[\"kcdyhbpk\",\"pwdreqnovvqf\",\"vljxywsu\",\"syrsndsytgadgvra\"]}]},{\"ipGroups\":[{\"name\":\"e\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"]}],\"vlanGroups\":[{\"name\":\"aknynfsynljphuop\",\"vlans\":[\"lqiyntorzihl\",\"osjswsr\",\"slyzrpzbchckqq\"]}],\"portGroups\":[{\"name\":\"xiy\",\"ports\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"]},{\"name\":\"sorgj\",\"ports\":[\"ldtlwwr\",\"kdmtncvokotll\"]},{\"name\":\"yhgsy\",\"ports\":[\"gjltdtbnnhado\",\"crkvcikhnv\",\"amqgxqquezikyw\",\"gxk\"]}]},{\"ipGroups\":[{\"name\":\"tmelw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"]}],\"vlanGroups\":[{\"name\":\"wq\",\"vlans\":[\"healmfmtda\"]},{\"name\":\"gdv\",\"vlans\":[\"piohgwxrtfu\",\"xepxgyqagvrvmn\",\"k\",\"kghimdblxgwimfnj\"]},{\"name\":\"j\",\"vlans\":[\"szkkfoqre\",\"fkzikfj\"]}],\"portGroups\":[{\"name\":\"a\",\"ports\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]}]},{\"ipGroups\":[{\"name\":\"jhwuaanozjos\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"l\",\"jrvxaglrv\"]},{\"name\":\"jwosytxitcskfck\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ekkezzikhlyfjh\",\"gqggebdunygae\"]},{\"name\":\"db\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xllrxcyjm\",\"a\"]},{\"name\":\"uvarmywdmjsjq\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"x\",\"rw\",\"yc\"]}],\"vlanGroups\":[{\"name\":\"p\",\"vlans\":[\"gymare\",\"n\",\"jxqugjhky\",\"ubeddg\"]},{\"name\":\"ofwq\",\"vlans\":[\"alkrmn\"]},{\"name\":\"jpxac\",\"vlans\":[\"dfnbyxbaaabjyv\",\"yffimrzrtuzqogs\",\"xnevfdnwn\"]}],\"portGroups\":[{\"name\":\"zsyyceuzso\",\"ports\":[\"ud\",\"frxtrthzvaytdwk\"]},{\"name\":\"rqubpaxhexiil\",\"ports\":[\"dtiirqt\",\"qoaxoruzfgs\"]},{\"name\":\"yfxrx\",\"ports\":[\"ptramxj\",\"zwl\"]},{\"name\":\"wxuqlcvydypatdoo\",\"ports\":[\"kniod\",\"oo\"]}]}],\"annotation\":\"wnujhemmsbvdk\"}") + "{\"annotation\":\"xoegukgjnpiucgy\",\"configurationType\":\"Inline\",\"aclsUrl\":\"qzntypm\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"drqjsdpy\",\"sequenceNumber\":5766056983460655346,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"jzicwifsjt\",\"gzfbishcbk\",\"ajdeyeamdphaga\"],\"fragments\":[\"uxwgipwho\",\"ow\"],\"ipLengths\":[\"hwankixzbinjepu\",\"tmryw\",\"uzoqft\",\"yqzrnkcqvyxlw\"],\"ttlValues\":[\"sicohoqqnwvlry\",\"vwhheunmmqhgyx\",\"konocu\"],\"dscpMarkings\":[\"lyaxuc\",\"nuqszfkbey\",\"ewrmjmwvvjektc\"],\"protocolNeighbors\":[\"nhwlrsffrzpwvl\",\"dqgbiqylihkaetc\"],\"portCondition\":{\"flags\":[\"civfsnkymuctq\",\"jf\",\"ebrjcxe\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ttxfvjr\",\"i\",\"phxepcyvahf\"],\"portGroupNames\":[\"kyqxjvuujqgidokg\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"oxgvclt\",\"gsncghkjeszz\",\"bijhtxfvgxbf\",\"mxnehmp\"]},\"protocolTypes\":[\"xgodebfqkkrbmp\",\"kgriwflzlfbx\"],\"vlanMatchCondition\":{\"vlans\":[\"ycispnqzahmgkb\",\"pyydhi\"],\"innerVlans\":[\"qqkpikadrg\",\"tqagnbuynh\"],\"vlanGroupNames\":[\"gmebfsiarbutrcv\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"runmp\",\"ttdbhrbnl\",\"nkxmyskpbhenbtk\"],\"ipGroupNames\":[\"w\"]}},{\"etherTypes\":[\"nrs\",\"nlqidybyxczf\"],\"fragments\":[\"aaxdbabphlwrq\",\"fkts\",\"hsucoc\"],\"ipLengths\":[\"yazttbtwwrqpue\",\"ckzywbiexzfeyue\"],\"ttlValues\":[\"bxu\"],\"dscpMarkings\":[\"hqwa\",\"muzyoxaepdk\",\"jancu\",\"rhdwbavxbniw\"],\"protocolNeighbors\":[\"wz\",\"s\"],\"portCondition\":{\"flags\":[\"nxytxh\",\"zxbzpfzabglc\",\"hxw\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"klbb\",\"vplwzbhv\",\"yuguosvmkfssx\"],\"portGroupNames\":[\"kfplgmgsxnk\",\"zkd\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"vlopwiyighx\",\"kdwzbaiuebbaumny\",\"upedeojnabckhs\",\"txp\"]},\"protocolTypes\":[\"btfhvpesaps\",\"rdqmhjjdhtldwkyz\",\"uutkncw\"],\"vlanMatchCondition\":{\"vlans\":[\"vlxotogtwrupqsx\",\"nmic\",\"kvceoveilovnotyf\",\"fcnj\"],\"innerVlans\":[\"nxdhbt\"],\"vlanGroupNames\":[\"h\",\"wpn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"mclfplphoxuscr\",\"abgy\",\"psbjta\"],\"ipGroupNames\":[\"gxywpmue\",\"fjz\",\"fqkquj\"]}}],\"actions\":[{\"type\":\"Remark\",\"counterName\":\"nobglaocq\",\"remarkComment\":\"ccm\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"lmoyrx\",\"remarkComment\":\"fudwpznt\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"qj\",\"remarkComment\":\"ck\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"bkyvp\",\"remarkComment\":\"anuzbpzkafkuw\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"bmehh\",\"sequenceNumber\":3647688567520643313,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"lhspkdee\"],\"fragments\":[\"fm\",\"ag\",\"vt\",\"elmqk\"],\"ipLengths\":[\"hvljuahaquh\",\"dhmdua\",\"aex\"],\"ttlValues\":[\"fadmws\",\"crgvxpvgom\"],\"dscpMarkings\":[\"misgwbnb\",\"e\"],\"protocolNeighbors\":[\"wkz\"],\"portCondition\":{\"flags\":[\"ourqhakau\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"wxosowzxcug\",\"cjooxdjebwpucwwf\",\"ovbvmeueciv\"],\"portGroupNames\":[\"ce\",\"ojgjrwjueiotwmc\",\"ytdxwit\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"awgqwgxhni\",\"kxfbkpycgklwndn\"]},\"protocolTypes\":[\"auwhvylwzbtdhx\",\"jznb\",\"pow\",\"wpr\"],\"vlanMatchCondition\":{\"vlans\":[\"eualupjmkhf\",\"obbc\"],\"innerVlans\":[\"rtjriplrbpbew\"],\"vlanGroupNames\":[\"fgb\",\"c\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"hjkbegibtnmxieb\"],\"ipGroupNames\":[\"loayqcgw\",\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\",\"nftguvriuhpr\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"qtayri\",\"remarkComment\":\"ro\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Drop\",\"counterName\":\"cqibycnojv\",\"remarkComment\":\"mefqsgzvahapjyzh\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Log\",\"counterName\":\"rvxdjzlmw\",\"remarkComment\":\"kvugfhzovawjvzun\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"n\",\"sequenceNumber\":7986653224206637858,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"jzuaejxdultskzbb\"],\"fragments\":[\"umveekgpwozuhkf\",\"bsjyofdx\",\"uusdttouwa\"],\"ipLengths\":[\"kqvkelnsmvbxwyjs\",\"lh\"],\"ttlValues\":[\"aln\",\"ixisxyawjoy\"],\"dscpMarkings\":[\"slyjpkiid\",\"yexz\"],\"protocolNeighbors\":[\"ixhnrztf\",\"lhbnxkna\",\"aulppggd\"],\"portCondition\":{\"flags\":[\"pnyiropuhp\",\"gvpgy\",\"gqgitxmedjvcsl\",\"n\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"zzhxgktrm\"],\"portGroupNames\":[\"napkteoellw\",\"tfdygpfqb\",\"ac\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"fqrhhuaopppc\"]},\"protocolTypes\":[\"xolzdahzx\",\"t\",\"bgbkdmoizpost\"],\"vlanMatchCondition\":{\"vlans\":[\"fbunrmfqjhhk\"],\"innerVlans\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"],\"vlanGroupNames\":[\"qaqtdoqmcbxvwvxy\",\"lqbhsf\",\"obl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wwwfbkr\",\"rn\",\"vshqjohxcr\",\"bfovasrruvwbhsq\"],\"ipGroupNames\":[\"bcgjbirxbp\",\"bsrfbj\",\"dtws\"]}},{\"etherTypes\":[\"ftpvjzbexil\"],\"fragments\":[\"fqqnvwpmqtaruo\",\"jmkcjhwqytj\"],\"ipLengths\":[\"n\"],\"ttlValues\":[\"wgdrjervnaenqp\",\"hin\",\"oygmift\"],\"dscpMarkings\":[\"d\",\"dslgnayqigynduh\"],\"protocolNeighbors\":[\"qlkth\",\"maqolbgycduie\",\"tgccymvaolpss\"],\"portCondition\":{\"flags\":[\"mmdnbbglzps\",\"iydmcwyhzdxs\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"nvdfznuda\",\"dvxzbncblylpst\"],\"portGroupNames\":[\"hxsrzdzucersc\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"evfiwjmygt\"]},\"protocolTypes\":[\"lswtmweriofzpyqs\",\"mwabnetshhszhedp\"],\"vlanMatchCondition\":{\"vlans\":[\"wubmwmbesldn\",\"wwtppj\",\"lcxog\",\"okonzmnsikvmkqz\"],\"innerVlans\":[\"kdltfzxmhhvhg\",\"r\"],\"vlanGroupNames\":[\"kwobdagxtibq\",\"xbxwa\",\"bogqxndlkzgxhu\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"xunkbebxmubyynt\",\"lrb\",\"tkoievseotgq\",\"l\"],\"ipGroupNames\":[\"u\",\"lauwzizxbmpgcjef\",\"zmuvpbttdumorppx\",\"bmnzbtbhjpgl\"]}},{\"etherTypes\":[\"ohdneuel\",\"phsdyhto\",\"fikdowwqu\",\"v\"],\"fragments\":[\"clvit\",\"hqzonosggbhcoh\"],\"ipLengths\":[\"sjnkal\",\"utiiswacf\"],\"ttlValues\":[\"k\",\"zewk\",\"vhqcrail\",\"pnppfuf\"],\"dscpMarkings\":[\"dmhdlxyjr\",\"sag\",\"fcnihgwq\"],\"protocolNeighbors\":[\"edgfbcvkcvq\",\"pkeqdcvdrhvoo\"],\"portCondition\":{\"flags\":[\"bobzdopcjwvnhd\",\"d\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"rslpmutwuoeg\",\"pkhjwni\"],\"portGroupNames\":[\"luicpdggkzzlvmbm\",\"axmodfvuef\",\"wsbpfvm\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"fouyf\",\"aakc\",\"wiyzvqtmnubexkp\",\"ksmond\"]},\"protocolTypes\":[\"uxvypomgkopkwh\",\"jvp\",\"jqg\"],\"vlanMatchCondition\":{\"vlans\":[\"ocmbqfqvmkcxoza\",\"vhelxprglyatdd\",\"kcbcue\"],\"innerVlans\":[\"xgc\",\"qibrhosxsdqrhzoy\",\"i\"],\"vlanGroupNames\":[\"qyib\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"dtmhrkwofyyvoqa\",\"piexpbtgiw\",\"wo\"],\"ipGroupNames\":[\"ashrt\",\"tkcnqxwb\"]}},{\"etherTypes\":[\"ulpiuj\",\"aasipqi\",\"obyu\"],\"fragments\":[\"pqlpq\",\"cciuqgbdbutau\"],\"ipLengths\":[\"tkuwhhmhykojo\",\"afnn\"],\"ttlValues\":[\"ichkoymkcdyhb\",\"kkpwdreqnovvq\",\"ovljxywsu\"],\"dscpMarkings\":[\"rsndsytgadgvra\"],\"protocolNeighbors\":[\"neqn\"],\"portCondition\":{\"flags\":[\"wlquuijfqkace\",\"iipfpubj\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"tohqkvpuvksgp\"],\"portGroupNames\":[\"kn\",\"n\",\"synljphuopxodl\",\"iyntorzihle\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"w\",\"rmslyzrpzbchckqq\"]},\"protocolTypes\":[\"ox\",\"ysuiizynkedya\",\"rwyhqmibzyhwitsm\"],\"vlanMatchCondition\":{\"vlans\":[\"npcdpumnzgm\",\"z\",\"mabiknsorgjhxb\",\"dtlwwrlkd\"],\"innerVlans\":[\"cvokotllxdyhg\",\"y\",\"cogjltdtbn\",\"hadoocrk\"],\"vlanGroupNames\":[\"khnvpam\",\"gxqquezik\",\"wggxkallat\",\"elwuipi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"gvvcnayrhyr\"],\"ipGroupNames\":[\"mueedndrdvstk\",\"qqtch\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"tdaaygdvwvg\",\"remarkComment\":\"ohgwxrtfudxepxg\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"mnpkukghimdblxg\",\"remarkComment\":\"mfnjh\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"PoliceRate\",\"counterName\":\"kkfoqr\",\"remarkComment\":\"fkzikfj\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"ivx\",\"sequenceNumber\":2373068837860943179,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"lsfeaenwabfatkld\",\"xbjhwuaanozjosph\"],\"fragments\":[\"l\",\"jrvxaglrv\"],\"ipLengths\":[\"wosytxitcskf\",\"k\",\"qumiek\",\"ez\"],\"ttlValues\":[\"hlyfjhdgqgg\"],\"dscpMarkings\":[\"unygaeqid\",\"qfatpxllrxcyjm\"],\"protocolNeighbors\":[\"su\",\"arm\",\"wdmjsjqbjhhyx\",\"rw\"],\"portCondition\":{\"flags\":[\"duhpk\",\"kgymareqnajxqug\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"beddgssofw\",\"mzqa\"],\"portGroupNames\":[\"mnjijpxacqqudf\",\"byxbaaabjy\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"fimrzrtuzqogse\",\"nevfdnw\",\"wmewzsyy\",\"euzsoi\"]},\"protocolTypes\":[\"dpfrxtrthzvaytdw\"],\"vlanMatchCondition\":{\"vlans\":[\"qu\",\"paxh\",\"xiilivpdtiirqt\",\"qoaxoruzfgs\"],\"innerVlans\":[\"fxrxxle\",\"tramxjez\"],\"vlanGroupNames\":[\"nwxuqlcvydyp\",\"tdooaoj\",\"niodkooeb\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"sbvdkcrodtjinfw\",\"lfltka\",\"jvefkdlfoakggkfp\",\"gaowpulpqblylsyx\"],\"ipGroupNames\":[\"nsj\",\"r\",\"tiagx\",\"dszue\"]}},{\"etherTypes\":[\"bzkfzbeyvpn\",\"icvi\"],\"fragments\":[\"jjxd\"],\"ipLengths\":[\"uukzclewyhmlw\",\"aztz\",\"ofncckwyfzqwhxxb\",\"yq\"],\"ttlValues\":[\"feqztppriol\",\"or\",\"altol\"],\"dscpMarkings\":[\"wsobqwcsdbn\",\"dcfhucqdpf\",\"vglsbjjca\"],\"protocolNeighbors\":[\"bvtvudutncormr\",\"xqtvcofu\"],\"portCondition\":{\"flags\":[\"kgjubgdknnqvsazn\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"dsg\",\"a\"],\"portGroupNames\":[\"yc\",\"rauwjuetaebu\",\"u\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"vsmzlxwab\"]},\"protocolTypes\":[\"efkifr\",\"tpuqujmq\"],\"vlanMatchCondition\":{\"vlans\":[\"btndo\",\"ongbjcnt\",\"jitcjedftwwaez\"],\"innerVlans\":[\"v\",\"c\",\"zfoqouicybxar\",\"gszufoxciqopid\"],\"vlanGroupNames\":[\"ciodhkhaz\",\"khnzbonlw\",\"toego\",\"dwbwhkszzcmrvexz\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"ra\"],\"ipGroupNames\":[\"koowtl\",\"nguxawqaldsy\",\"uximerqfobw\",\"znkbykutwpfhpagm\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"nfd\",\"remarkComment\":\"oakgtdlmkkzev\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"PoliceRate\",\"counterName\":\"sdsttwvog\",\"remarkComment\":\"bejdcn\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"ufgmjzrwrdg\",\"remarkComment\":\"wae\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"PoliceRate\",\"counterName\":\"bminrfdwoyuhhzi\",\"remarkComment\":\"efozbhdms\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"rmaequ\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cslfaoqzpiyylha\",\"nswhcc\"]}],\"vlanGroups\":[{\"name\":\"aivwitqscywu\",\"vlans\":[\"oluhczbwemh\",\"i\",\"sbrgz\",\"wmsweypqwd\"]}],\"portGroups\":[{\"name\":\"cccnxqhuexmktt\",\"ports\":[\"vlz\"]},{\"name\":\"emhzrncsdtc\",\"ports\":[\"iypbsfgytgusl\",\"eadcygqukyhejhz\"]},{\"name\":\"xgfpelolppv\",\"ports\":[\"pqvujzraehtwdwrf\"]}]},{\"ipGroups\":[{\"name\":\"byrcdlbhshfwp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wity\",\"hevxcced\",\"pnmdyodnwzxltjcv\"]}],\"vlanGroups\":[{\"name\":\"iugcxnavvwxq\",\"vlans\":[\"qunyowxwlmdjr\"]},{\"name\":\"fgbvfvpdbo\",\"vlans\":[\"izsjqlhkrr\",\"bdeibqipqk\",\"hvxndzwmkrefajpj\",\"rwkq\"]},{\"name\":\"hgbijt\",\"vlans\":[\"fxzsjabibsyst\",\"wfsdjpvkvpbj\"]}],\"portGroups\":[{\"name\":\"bzkdvn\",\"ports\":[\"budurgkakmo\",\"zhjjklffhmouwq\"]},{\"name\":\"zrfze\",\"ports\":[\"bizikayuhq\",\"bjbsybb\",\"wrv\"]},{\"name\":\"dgmfpgvmpipasl\",\"ports\":[\"qfxssmwutw\",\"dsrezpdrhneuyow\"]},{\"name\":\"d\",\"ports\":[\"i\"]}]}],\"lastSyncedTime\":\"2020-12-27T08:51:44Z\",\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"imejzanl\"},\"networkFabricIds\":[\"iavrm\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{\"matchConfigurationName\":\"rjqc\",\"sequenceNumber\":7350940410985010764,\"matchCondition\":{\"protocolTypes\":\"rlazszrnw\",\"ipCondition\":{},\"ttlMatchCondition\":{},\"portCondition\":{},\"flags\":[\"pwp\",\"ylwbtlhflsjcdhsz\",\"jvfbgofelja\"],\"icmpConfiguration\":{}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"ldvriiiojnalghfk\"}}]}],\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"}") .toObject(AccessControlListProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("i", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("xqbzvddntwnd", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4634265215487541073L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("zgpphrcgyncocpe", + Assertions.assertEquals("xoegukgjnpiucgy", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("qzntypm", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("drqjsdpy", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5766056983460655346L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("xgodebfqkkrbmp", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("y", + Assertions.assertEquals("ycispnqzahmgkb", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", + Assertions.assertEquals("qqkpikadrg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", + Assertions.assertEquals("gmebfsiarbutrcv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ipheoflokeyyien", + Assertions.assertEquals("runmp", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("slfhotwm", + Assertions.assertEquals("w", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("oqvuhr", + Assertions.assertEquals("jzicwifsjt", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("qkwpyeicxmqc", + Assertions.assertEquals("uxwgipwho", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("e", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("m", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("rzayv", + Assertions.assertEquals("hwankixzbinjepu", + model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("sicohoqqnwvlry", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("lyaxuc", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("nhwlrsffrzpwvl", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("bhj", + Assertions.assertEquals("ttxfvjr", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("qfbow", + Assertions.assertEquals("kyqxjvuujqgidokg", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("fgugnxkrxdqmid", + Assertions.assertEquals("civfsnkymuctq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("jektcxsenh", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("vmbmp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("oxgvclt", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("nobglaocq", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("ccm", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("rmaequ", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("fv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("vmwy", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ouyftaakc", + Assertions.assertEquals("cslfaoqzpiyylha", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("aivwitqscywu", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("oluhczbwemh", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("jxgciqibrh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("sdqrhzoymibmrq", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("cccnxqhuexmktt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("vlz", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("rjqc", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7350940410985010764L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rlazszrnw", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("pwp", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.PERMIT, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().type()); + Assertions.assertEquals("ldvriiiojnalghfk", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().remarkComment()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListProperties model - = new AccessControlListProperties().withAnnotation("wnujhemmsbvdk") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("i") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations( - Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("xqbzvddntwnd") - .withSequenceNumber(4634265215487541073L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("zgpphrcgyncocpe", "fvm", "coofsxlzev", "bmqj")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("y")) - .withInnerVlans(Arrays.asList("vkwlzuvccfwnf", "bacfionlebxetq", "tzxdpnqbqqwx", - "jfeallnwsub")) - .withVlanGroupNames(Arrays.asList("jampmngnzscxaqw", "ochcbonqvpkvl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ipheoflokeyyien", "bdlwtgrhpdjpj", - "masxazjpqyegu", "lhbxxhejjzzvdud")) - .withIpGroupNames(Arrays.asList("slfhotwm", "ynpwlbj", "pgacftadehxnlty"))) - .withEtherTypes(Arrays.asList("oqvuhr", "cffcyddglmj")) - .withFragments(Arrays.asList("qkwpyeicxmqc", "wqvhkhixuigdt", "pbobjo")) - .withIpLengths(Arrays.asList("e")) - .withTtlValues(Arrays.asList("m")) - .withDscpMarkings(Arrays.asList("rzayv", "t", "gvdfgiotkftutq", "ln")) - .withPortCondition( - new AccessControlListPortCondition().withPortType( - PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("bhj", "big")) - .withPortGroupNames(Arrays.asList("qfbow", "kanyktzlcuiywg", "ywgndrv")) - .withFlags(Arrays.asList("fgugnxkrxdqmid", "thz"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ounqecano", "eupfhyhltrpm", "pjmcmatuokthfuiu", - "odsfcpkvxodpuozm")) - .withVlanMatchCondition( - new VlanMatchCondition() - .withVlans(Arrays.asList("agfuaxbezyiu", "kktwhrdxw", "ywqsmbsurexim", - "ryocfsfksymdd")) - .withInnerVlans(Arrays.asList("kiiuxhqyudxor")) - .withVlanGroupNames( - Arrays.asList("b", "oczvy", "fqrvkdvjsllrmvvd", "watkpnpulexxb"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("qzbqjvsov", "yokacspkw")) - .withIpGroupNames( - Arrays.asList("dobpxjmflbvvn", "hrk", "ciwwzjuqkhr", "ajiwkuo"))) - .withEtherTypes(Arrays.asList("ppusuesnzwdejba", "orxzdmohctbqvud", "xdn")) - .withFragments(Arrays.asList("owgujjugwdkcglhs")) - .withIpLengths(Arrays.asList("jdyggdtji")) - .withTtlValues(Arrays.asList("kuofqweykhme")) - .withDscpMarkings(Arrays.asList("fyexfwhy", "cibvyvdcsitynn")) - .withPortCondition( - new AccessControlListPortCondition().withPortType( - PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("fovgmkqsleyyvxy", "jpkcattpng")) - .withPortGroupNames(Arrays.asList("cczsq", "jh", "mdajv")) - .withFlags(Arrays.asList("ectehf", "qsc", "eypvhezrkg"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("npiucgygevqznty", "mrbpizcdrqj", "dpydn")) - .withVlanMatchCondition( - new VlanMatchCondition() - .withVlans(Arrays.asList("de", "ejzicwifsjtt", "zfbishcbkhaj")) - .withInnerVlans( - Arrays.asList("eamdp", "agalpbuxwgipwhon", "wkgshwa", "kix")) - .withVlanGroupNames(Arrays.asList("njeputtmrywn", "zoqftiyqzrnkcqvy"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("cohoq", "nwvlryavwhheunmm", "hgyxzkonoc")) - .withIpGroupNames(Arrays.asList("klyaxuconu", "szfkbe", "pewr"))) - .withEtherTypes(Arrays.asList("kg", "sauuimj", "vxieduugidyj")) - .withFragments(Arrays.asList("byao")) - .withIpLengths(Arrays.asList("xc")) - .withTtlValues(Arrays.asList("pclhocohslk")) - .withDscpMarkings(Arrays.asList("eggzfb", "hfmvfaxkffe")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xwburvjxxjns", "ydptkoen")) - .withPortGroupNames(Arrays.asList("knvudwtiukb", "dng", "pocipazyxoegu")) - .withFlags(Arrays.asList("lvmezyvshxmzsbbz"))))) - .withActions( - Arrays - .asList( - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("jektcxsenh"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("ffrzpwvlqdqgbiqy"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("aetcktvfcivfs"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("uctqhjfbe"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("jcxerfuwu") - .withSequenceNumber(3193420375672203078L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("hrbnlankxmyskpbh")) + = new AccessControlListProperties().withAnnotation("xoegukgjnpiucgy") + .withConfigurationType(ConfigurationType.INLINE) + .withAclsUrl("qzntypm") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withMatchConfigurations(Arrays.asList( + new AccessControlListMatchConfiguration().withMatchConfigurationName("drqjsdpy") + .withSequenceNumber(5766056983460655346L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("xgodebfqkkrbmp", "kgriwflzlfbx")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("ycispnqzahmgkb", "pyydhi")) + .withInnerVlans(Arrays.asList("qqkpikadrg", "tqagnbuynh")) + .withVlanGroupNames(Arrays.asList("gmebfsiarbutrcv"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("runmp", "ttdbhrbnl", "nkxmyskpbhenbtk")) + .withIpGroupNames(Arrays.asList("w"))) + .withEtherTypes(Arrays.asList("jzicwifsjt", "gzfbishcbk", "ajdeyeamdphaga")) + .withFragments(Arrays.asList("uxwgipwho", "ow")) + .withIpLengths(Arrays.asList("hwankixzbinjepu", "tmryw", "uzoqft", "yqzrnkcqvyxlw")) + .withTtlValues(Arrays.asList("sicohoqqnwvlry", "vwhheunmmqhgyx", "konocu")) + .withDscpMarkings(Arrays.asList("lyaxuc", "nuqszfkbey", "ewrmjmwvvjektc")) + .withProtocolNeighbors(Arrays.asList("nhwlrsffrzpwvl", "dqgbiqylihkaetc")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("ttxfvjr", "i", "phxepcyvahf")) + .withPortGroupNames(Arrays.asList("kyqxjvuujqgidokg")) + .withFlags(Arrays.asList("civfsnkymuctq", "jf", "ebrjcxe"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes( + Arrays.asList("oxgvclt", "gsncghkjeszz", "bijhtxfvgxbf", "mxnehmp"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("btfhvpesaps", "rdqmhjjdhtldwkyz", "uutkncw")) .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("kcxywnyt", "rsyn", "qidybyx", "zfcl")) - .withInnerVlans(Arrays.asList("xdbabphlwr", "lfktsths")) - .withVlanGroupNames(Arrays.asList("cmnyyazttb", "wwrq", "uedck", "ywbiexzfeyueax"))) + .withVlans(Arrays.asList("vlxotogtwrupqsx", "nmic", "kvceoveilovnotyf", "fcnj")) + .withInnerVlans(Arrays.asList("nxdhbt")) + .withVlanGroupNames(Arrays.asList("h", "wpn"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("qwalmuzyoxaepd")) - .withIpGroupNames(Arrays.asList("ancuxrhd", "bavxbniwdjswzt"))) - .withEtherTypes(Arrays.asList("rp")) - .withFragments(Arrays.asList("pcyvahfnljkyqx", "vuujq", "idokgjlj")) - .withIpLengths(Arrays.asList("gvcl", "bgsncghkjeszzhb")) - .withTtlValues(Arrays.asList("txfvgx", "fsm", "nehmpvecx", "odebfqkkrbmpu")) - .withDscpMarkings(Arrays.asList("iw", "lzlfbxzpuz", "cispnqzahmgkbr")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("ijggmebfsiar", "utrc")) - .withPortGroupNames(Arrays.asList("azzmhjrunmpxt")) - .withFlags(Arrays.asList("hibnuqqkpika", "rgvtqag"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("njbkcnxdhbttkph", "wpn", "jtoqne")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("fpl", "hoxus")) - .withInnerVlans(Arrays.asList("abgy", "psbjta")) - .withVlanGroupNames(Arrays.asList("gxywpmue", "fjz", "fqkquj"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("bglaocqxtccm", "yudxytlmoy", "xv")) - .withIpGroupNames(Arrays.asList("dw"))) - .withEtherTypes(Arrays.asList("pgn")) - .withFragments(Arrays.asList("x")) - .withIpLengths(Arrays.asList("xbzpfzab", "lcuhxwtctyqiklb", "ovplw")) - .withTtlValues(Arrays.asList("vgyuguos", "mkfssxqukkfplgm", "sxnkjzkdeslpvlo")) - .withDscpMarkings(Arrays.asList("yighxpk")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("rdqmhjjdhtldwkyz", "uutkncw")) - .withPortGroupNames(Arrays.asList("svlxotogtwrup", "sx", "nmic", - "kvceoveilovnotyf")) - .withFlags( - Arrays.asList("aiuebbaumnyqu", "edeojnabc", "hsmtxpsiebtfhvp"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("dzhlrq"), + .withIpPrefixValues(Arrays.asList("mclfplphoxuscr", "abgy", "psbjta")) + .withIpGroupNames(Arrays.asList("gxywpmue", "fjz", "fqkquj"))) + .withEtherTypes(Arrays.asList("nrs", "nlqidybyxczf")) + .withFragments(Arrays.asList("aaxdbabphlwrq", "fkts", "hsucoc")) + .withIpLengths(Arrays.asList("yazttbtwwrqpue", "ckzywbiexzfeyue")) + .withTtlValues(Arrays.asList("bxu")) + .withDscpMarkings(Arrays.asList("hqwa", "muzyoxaepdk", "jancu", "rhdwbavxbniw")) + .withProtocolNeighbors(Arrays.asList("wz", "s")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("klbb", "vplwzbhv", "yuguosvmkfssx")) + .withPortGroupNames(Arrays.asList("kfplgmgsxnk", "zkd")) + .withFlags(Arrays.asList("nxytxh", "zxbzpfzabglc", "hxw"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes( + Arrays.asList("vlopwiyighx", "kdwzbaiuebbaumny", "upedeojnabckhs", "txp"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("nobglaocq") + .withRemarkComment("ccm") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("lmoyrx") + .withRemarkComment("fudwpznt") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("qj") + .withRemarkComment("ck") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("bkyvp") + .withRemarkComment("anuzbpzkafkuw") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("bmehh") + .withSequenceNumber(3647688567520643313L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("auwhvylwzbtdhx", "jznb", "pow", "wpr")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("eualupjmkhf", "obbc")) + .withInnerVlans(Arrays.asList("rtjriplrbpbew")) + .withVlanGroupNames(Arrays.asList("fgb", "c"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("hjkbegibtnmxieb")) + .withIpGroupNames(Arrays.asList("loayqcgw", "tzjuzgwyzmhtxo", "gmtsavjcbpwxqpsr", + "nftguvriuhpr"))) + .withEtherTypes(Arrays.asList("lhspkdee")) + .withFragments(Arrays.asList("fm", "ag", "vt", "elmqk")) + .withIpLengths(Arrays.asList("hvljuahaquh", "dhmdua", "aex")) + .withTtlValues(Arrays.asList("fadmws", "crgvxpvgom")) + .withDscpMarkings(Arrays.asList("misgwbnb", "e")) + .withProtocolNeighbors(Arrays.asList("wkz")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("wxosowzxcug", "cjooxdjebwpucwwf", "ovbvmeueciv")) + .withPortGroupNames(Arrays.asList("ce", "ojgjrwjueiotwmc", "ytdxwit")) + .withFlags(Arrays.asList("ourqhakau"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("awgqwgxhni", "kxfbkpycgklwndn"))))) + .withActions( + Arrays.asList( new AccessControlListAction().withType(AclActionType.LOG) - .withCounterName("kfrlhrxsbky"), + .withCounterName("qtayri") + .withRemarkComment("ro") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("anuzbpzkafkuw"), - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("wbme"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("seyvj") - .withSequenceNumber(2840663437896188419L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays.asList( - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("kpycgklwndnhjd", "uwhvylwzbtdhxujz")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("ow")) - .withInnerVlans(Arrays.asList("rzqlveu", "lupj")) - .withVlanGroupNames(Arrays.asList("fxobbcsws", "tjrip", "rbpbewtghfgblcg", - "xzvlvqhjkbegib"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("waloayqcgwr", "zjuzgwyz", "htxongmtsavjc", "pwxqp")) - .withIpGroupNames(Arrays.asList("nftguvriuhpr", "mdyvxqtayriw", "ro"))) - .withEtherTypes(Arrays.asList("deemao", "mx", "gkvtmelmqkrhah", "ljuahaquhcdh")) - .withFragments(Arrays.asList("alaexqpvfadmwsrc", "gvxp", "gomz", "fmisg")) - .withIpLengths(Arrays.asList("b", "e")) - .withTtlValues(Arrays.asList("wkz")) - .withDscpMarkings(Arrays.asList("io", "rqhakauha", "hsfwxosowzxcug")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("eiotwmcdytdx", "it", "nrjawgqwg")) - .withPortGroupNames(Arrays.asList("isk")) - .withFlags(Arrays.asList("oxdjebwpuc", "wfvovbv", "euecivyhzceuoj"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("wwncwzzhxgk", "rmgucnap")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("ellwptfdy", "pfqbuaceopzf")) - .withInnerVlans(Arrays.asList("huaoppp", "qeqxo")) - .withVlanGroupNames(Arrays.asList("ahzxctobgbk", "moizpos", "mgrcfbu"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("kxbpvj", "mjh")) - .withIpGroupNames(Arrays.asList("yngudivk"))) - .withEtherTypes(Arrays.asList("exrmcqibycnojvk", "mefqsgzvahapjyzh")) - .withFragments(Arrays.asList("qzcjrvxdj", "lmwlxkvugfhzo")) - .withIpLengths(Arrays.asList("jvzunluthnnp", "nxipeil", "jzuaejxdultskzbb")) - .withTtlValues(Arrays.asList("umveekgpwozuhkf", "bsjyofdx", "uusdttouwa")) - .withDscpMarkings(Arrays.asList("kqvkelnsmvbxwyjs", "lh")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("cslyjpk", "idzyexznelixhnr", "tfolhbnx")) - .withPortGroupNames( - Arrays.asList("laulppg", "dtpnapnyiropuhp", "gvpgy", "gqgitxmedjvcsl")) - .withFlags(Arrays.asList("lnjixisxya"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("qzvszjf"), - new AccessControlListAction() - .withType(AclActionType.LOG) - .withCounterName("fdxxivetvtcqaqtd"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("mcbxvwvxysl") - .withSequenceNumber(2902711033817845170L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("gccymvaolpssl", "lfmmdnbbglzpswi", "d", "cwyhzdxssa")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("nvdfznuda", "dvxzbncblylpst")) - .withInnerVlans(Arrays.asList("hxsrzdzucersc")) - .withVlanGroupNames(Arrays.asList("nevf"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("sslswtmweriof", "pyqs")) - .withIpGroupNames(Arrays.asList("abnetshh"))) - .withEtherTypes(Arrays.asList("tkblmpewww", "bkrvrnsvshqj", "hxcr")) - .withFragments(Arrays.asList("ovasrruvwbhsqfsu", "cgjbirxbp")) - .withIpLengths(Arrays.asList("rfbjf", "twss", "t")) - .withTtlValues(Arrays.asList("vjz", "exilzznfqqnvwpmq")) - .withDscpMarkings(Arrays.asList("uoujmkcjhwqy", "jrybnwjewgdrjer")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("mifthnzdnd", "l", "nayqi")) - .withPortGroupNames(Arrays.asList("duhavhqlkt", "umaq", "lbg", "cdui")) - .withFlags(Arrays.asList("nqpeh"))), - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("xzxcl")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("hqzonosggbhcoh", "wdsjnkalju", "iiswacffgdkzze")) - .withInnerVlans(Arrays.asList("vhqcrail", "pnppfuf")) - .withVlanGroupNames(Arrays.asList("dmhdlxyjr", "sag", "fcnihgwq"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("cvkcvqvpkeqdcv", "rhvoods", "tbobz")) - .withIpGroupNames(Arrays.asList("cjwvn", "dldwmgxc"))) - .withEtherTypes(Arrays.asList("edplvwiwubmw")) - .withFragments(Arrays.asList("sldnkwwtppjflcxo")) - .withIpLengths(Arrays.asList("konzmnsik", "mkqzeqqkdltfzxmh", "v", "gureodkwobdag")) - .withTtlValues(Arrays.asList("bqdxbx", "akbogqxndlkzgxh", "ripl", "podxunkb")) - .withDscpMarkings(Arrays.asList("mubyynt", "lrb", "tkoievseotgq", "l")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("muvp", "ttdumorppxebmnzb", "bhjpglkfgohdne", "el")) - .withPortGroupNames(Arrays.asList("sdyhtozfikdowwq")) - .withFlags(Arrays.asList("wlauwzizxbmpg"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("utwu"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("pkhjwni"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("uicpd"))))) + .withCounterName("cqibycnojv") + .withRemarkComment("mefqsgzvahapjyzh") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("rvxdjzlmw") + .withRemarkComment("kvugfhzovawjvzun") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("n") + .withSequenceNumber(7986653224206637858L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("xolzdahzx", "t", "bgbkdmoizpost")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("fbunrmfqjhhk")) + .withInnerVlans( + Arrays.asList("vjymjhxxjyngud", "vkr", "swbxqz", "szjfauvjfdxxivet")) + .withVlanGroupNames(Arrays.asList("qaqtdoqmcbxvwvxy", "lqbhsf", "obl"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("wwwfbkr", "rn", "vshqjohxcr", "bfovasrruvwbhsq")) + .withIpGroupNames(Arrays.asList("bcgjbirxbp", "bsrfbj", "dtws"))) + .withEtherTypes(Arrays.asList("jzuaejxdultskzbb")) + .withFragments(Arrays.asList("umveekgpwozuhkf", "bsjyofdx", "uusdttouwa")) + .withIpLengths(Arrays.asList("kqvkelnsmvbxwyjs", "lh")) + .withTtlValues(Arrays.asList("aln", "ixisxyawjoy")) + .withDscpMarkings(Arrays.asList("slyjpkiid", "yexz")) + .withProtocolNeighbors(Arrays.asList("ixhnrztf", "lhbnxkna", "aulppggd")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("zzhxgktrm")) + .withPortGroupNames(Arrays.asList("napkteoellw", "tfdygpfqb", "ac")) + .withFlags(Arrays.asList("pnyiropuhp", "gvpgy", "gqgitxmedjvcsl", "n"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("fqrhhuaopppc"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("lswtmweriofzpyqs", "mwabnetshhszhedp")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("wubmwmbesldn", "wwtppj", "lcxog", "okonzmnsikvmkqz")) + .withInnerVlans(Arrays.asList("kdltfzxmhhvhg", "r")) + .withVlanGroupNames(Arrays.asList("kwobdagxtibq", "xbxwa", "bogqxndlkzgxhu"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("xunkbebxmubyynt", "lrb", "tkoievseotgq", "l")) + .withIpGroupNames( + Arrays.asList("u", "lauwzizxbmpgcjef", "zmuvpbttdumorppx", "bmnzbtbhjpgl"))) + .withEtherTypes(Arrays.asList("ftpvjzbexil")) + .withFragments(Arrays.asList("fqqnvwpmqtaruo", "jmkcjhwqytj")) + .withIpLengths(Arrays.asList("n")) + .withTtlValues(Arrays.asList("wgdrjervnaenqp", "hin", "oygmift")) + .withDscpMarkings(Arrays.asList("d", "dslgnayqigynduh")) + .withProtocolNeighbors(Arrays.asList("qlkth", "maqolbgycduie", "tgccymvaolpss")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("nvdfznuda", "dvxzbncblylpst")) + .withPortGroupNames(Arrays.asList("hxsrzdzucersc")) + .withFlags(Arrays.asList("mmdnbbglzps", "iydmcwyhzdxs"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("evfiwjmygt"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("uxvypomgkopkwh", "jvp", "jqg")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("ocmbqfqvmkcxoza", "vhelxprglyatdd", "kcbcue")) + .withInnerVlans(Arrays.asList("xgc", "qibrhosxsdqrhzoy", "i")) + .withVlanGroupNames(Arrays.asList("qyib"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("dtmhrkwofyyvoqa", "piexpbtgiw", "wo")) + .withIpGroupNames(Arrays.asList("ashrt", "tkcnqxwb"))) + .withEtherTypes(Arrays.asList("ohdneuel", "phsdyhto", "fikdowwqu", "v")) + .withFragments(Arrays.asList("clvit", "hqzonosggbhcoh")) + .withIpLengths(Arrays.asList("sjnkal", "utiiswacf")) + .withTtlValues(Arrays.asList("k", "zewk", "vhqcrail", "pnppfuf")) + .withDscpMarkings(Arrays.asList("dmhdlxyjr", "sag", "fcnihgwq")) + .withProtocolNeighbors(Arrays.asList("edgfbcvkcvq", "pkeqdcvdrhvoo")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("rslpmutwuoeg", "pkhjwni")) + .withPortGroupNames(Arrays.asList("luicpdggkzzlvmbm", "axmodfvuef", "wsbpfvm")) + .withFlags(Arrays.asList("bobzdopcjwvnhd", "d"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("fouyf", "aakc", "wiyzvqtmnubexkp", "ksmond"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("ox", "ysuiizynkedya", "rwyhqmibzyhwitsm")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("npcdpumnzgm", "z", "mabiknsorgjhxb", "dtlwwrlkd")) + .withInnerVlans(Arrays.asList("cvokotllxdyhg", "y", "cogjltdtbn", "hadoocrk")) + .withVlanGroupNames(Arrays.asList("khnvpam", "gxqquezik", "wggxkallat", "elwuipi"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("gvvcnayrhyr")) + .withIpGroupNames(Arrays.asList("mueedndrdvstk", "qqtch"))) + .withEtherTypes(Arrays.asList("ulpiuj", "aasipqi", "obyu")) + .withFragments(Arrays.asList("pqlpq", "cciuqgbdbutau")) + .withIpLengths(Arrays.asList("tkuwhhmhykojo", "afnn")) + .withTtlValues(Arrays.asList("ichkoymkcdyhb", "kkpwdreqnovvq", "ovljxywsu")) + .withDscpMarkings(Arrays.asList("rsndsytgadgvra")) + .withProtocolNeighbors(Arrays.asList("neqn")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("tohqkvpuvksgp")) + .withPortGroupNames(Arrays.asList("kn", "n", "synljphuopxodl", "iyntorzihle")) + .withFlags(Arrays.asList("wlquuijfqkace", "iipfpubj"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("w", "rmslyzrpzbchckqq"))))) + .withActions(Arrays.asList( + new AccessControlListAction() + .withType(AclActionType.LOG) + .withCounterName("tdaaygdvwvg") + .withRemarkComment("ohgwxrtfudxepxg") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("mnpkukghimdblxg") + .withRemarkComment("mfnjh") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.POLICE_RATE) + .withCounterName("kkfoqr") + .withRemarkComment("fkzikfj") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("ivx") + .withSequenceNumber(2373068837860943179L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("dpfrxtrthzvaytdw")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("qu", "paxh", "xiilivpdtiirqt", "qoaxoruzfgs")) + .withInnerVlans(Arrays.asList("fxrxxle", "tramxjez")) + .withVlanGroupNames(Arrays.asList("nwxuqlcvydyp", "tdooaoj", "niodkooeb"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays + .asList("sbvdkcrodtjinfw", "lfltka", "jvefkdlfoakggkfp", "gaowpulpqblylsyx")) + .withIpGroupNames(Arrays.asList("nsj", "r", "tiagx", "dszue"))) + .withEtherTypes(Arrays.asList("lsfeaenwabfatkld", "xbjhwuaanozjosph")) + .withFragments(Arrays.asList("l", "jrvxaglrv")) + .withIpLengths(Arrays.asList("wosytxitcskf", "k", "qumiek", "ez")) + .withTtlValues(Arrays.asList("hlyfjhdgqgg")) + .withDscpMarkings(Arrays.asList("unygaeqid", "qfatpxllrxcyjm")) + .withProtocolNeighbors(Arrays.asList("su", "arm", "wdmjsjqbjhhyx", "rw")) + .withPortCondition(new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("beddgssofw", "mzqa")) + .withPortGroupNames(Arrays.asList("mnjijpxacqqudf", "byxbaaabjy")) + .withFlags(Arrays.asList("duhpk", "kgymareqnajxqug"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("fimrzrtuzqogse", "nevfdnw", "wmewzsyy", "euzsoi"))), + new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("efkifr", "tpuqujmq")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("btndo", "ongbjcnt", "jitcjedftwwaez")) + .withInnerVlans(Arrays.asList("v", "c", "zfoqouicybxar", "gszufoxciqopid")) + .withVlanGroupNames( + Arrays.asList("ciodhkhaz", "khnzbonlw", "toego", "dwbwhkszzcmrvexz"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("ra")) + .withIpGroupNames( + Arrays.asList("koowtl", "nguxawqaldsy", "uximerqfobw", "znkbykutwpfhpagm"))) + .withEtherTypes(Arrays.asList("bzkfzbeyvpn", "icvi")) + .withFragments(Arrays.asList("jjxd")) + .withIpLengths(Arrays.asList("uukzclewyhmlw", "aztz", "ofncckwyfzqwhxxb", "yq")) + .withTtlValues(Arrays.asList("feqztppriol", "or", "altol")) + .withDscpMarkings(Arrays.asList("wsobqwcsdbn", "dcfhucqdpf", "vglsbjjca")) + .withProtocolNeighbors(Arrays.asList("bvtvudutncormr", "xqtvcofu")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("dsg", "a")) + .withPortGroupNames(Arrays.asList("yc", "rauwjuetaebu", "u")) + .withFlags(Arrays.asList("kgjubgdknnqvsazn"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("vsmzlxwab"))))) + .withActions(Arrays.asList( + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("nfd") + .withRemarkComment("oakgtdlmkkzev") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.POLICE_RATE) + .withCounterName("sdsttwvog") + .withRemarkComment("bejdcn") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("ufgmjzrwrdg") + .withRemarkComment("wae") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.POLICE_RATE) + .withCounterName("bminrfdwoyuhhzi") + .withRemarkComment("efozbhdms") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))))) .withDynamicMatchConfigurations(Arrays.asList( new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("vmbmp") + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("rmaequ") .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("fv", "efyw")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("vmwy") - .withVlans(Arrays.asList("ouyftaakc", "wiyzvqtmnubexkp")), - new VlanGroupProperties().withName("smond") - .withVlans(Arrays.asList("uxvypomgkopkwh", "jvp", "jqg")), - new VlanGroupProperties().withName("smocmbq") - .withVlans(Arrays.asList("mkcxozapvh", "lxprglyatddckcbc")))) - .withPortGroups(Arrays.asList(new PortGroupProperties() - .withName("jxgciqibrh") - .withPorts(Arrays.asList("sdqrhzoymibmrq", "ibahwflus", "dtmhrkwofyyvoqa", "piexpbtgiw")), - new PortGroupProperties().withName("oenwashr") - .withPorts(Arrays.asList("kcnqxwbpo", "ulpiuj")), - new PortGroupProperties().withName("asipqiio") - .withPorts(Arrays.asList("qerpqlpqwcc", "uqgbdbutauvfbt", "uwhhmhykojoxafn")), - new PortGroupProperties().withName("lpichk") - .withPorts(Arrays.asList("kcdyhbpk", "pwdreqnovvqf", "vljxywsu", "syrsndsytgadgvra")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("e") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("aknynfsynljphuop") - .withVlans(Arrays.asList("lqiyntorzihl", "osjswsr", "slyzrpzbchckqq")))) + .withIpPrefixes(Arrays.asList("cslfaoqzpiyylha", "nswhcc")))) + .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("aivwitqscywu") + .withVlans(Arrays.asList("oluhczbwemh", "i", "sbrgz", "wmsweypqwd")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("xiy") - .withPorts(Arrays.asList("i", "ynkedyatrwyhqmib", "yhwitsmypyynpcdp", "mnzgmwznmabi")), - new PortGroupProperties().withName("sorgj") - .withPorts(Arrays.asList("ldtlwwr", "kdmtncvokotll")), - new PortGroupProperties().withName("yhgsy") - .withPorts(Arrays.asList("gjltdtbnnhado", "crkvcikhnv", "amqgxqquezikyw", "gxk")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("tmelw") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("wq").withVlans(Arrays.asList("healmfmtda")), - new VlanGroupProperties().withName("gdv") - .withVlans(Arrays.asList("piohgwxrtfu", "xepxgyqagvrvmn", "k", "kghimdblxgwimfnj")), - new VlanGroupProperties().withName("j").withVlans(Arrays.asList("szkkfoqre", "fkzikfj")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("a") - .withPorts(Arrays.asList("wczelpci", "elsfeaen", "abfatkl")))), + new PortGroupProperties().withName("cccnxqhuexmktt").withPorts(Arrays.asList("vlz")), + new PortGroupProperties().withName("emhzrncsdtc") + .withPorts(Arrays.asList("iypbsfgytgusl", "eadcygqukyhejhz")), + new PortGroupProperties() + .withName("xgfpelolppv") + .withPorts(Arrays.asList("pqvujzraehtwdwrf")))), new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("jhwuaanozjos") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("l", "jrvxaglrv")), - new IpGroupProperties().withName("jwosytxitcskfck") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("ekkezzikhlyfjh", "gqggebdunygae")), - new IpGroupProperties().withName("db") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("xllrxcyjm", "a")), - new IpGroupProperties().withName("uvarmywdmjsjq") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("x", "rw", "yc")))) + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("byrcdlbhshfwp") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("wity", "hevxcced", "pnmdyodnwzxltjcv")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("p") - .withVlans(Arrays.asList("gymare", "n", "jxqugjhky", "ubeddg")), - new VlanGroupProperties().withName("ofwq").withVlans(Arrays.asList("alkrmn")), - new VlanGroupProperties().withName("jpxac") - .withVlans(Arrays.asList("dfnbyxbaaabjyv", "yffimrzrtuzqogs", "xnevfdnwn")))) + new VlanGroupProperties().withName("iugcxnavvwxq") + .withVlans(Arrays.asList("qunyowxwlmdjr")), + new VlanGroupProperties().withName("fgbvfvpdbo") + .withVlans(Arrays.asList("izsjqlhkrr", "bdeibqipqk", "hvxndzwmkrefajpj", "rwkq")), + new VlanGroupProperties().withName("hgbijt") + .withVlans(Arrays.asList("fxzsjabibsyst", "wfsdjpvkvpbj")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("zsyyceuzso") - .withPorts(Arrays.asList("ud", "frxtrthzvaytdwk")), - new PortGroupProperties().withName("rqubpaxhexiil") - .withPorts(Arrays.asList("dtiirqt", "qoaxoruzfgs")), - new PortGroupProperties().withName("yfxrx").withPorts(Arrays.asList("ptramxj", "zwl")), - new PortGroupProperties().withName("wxuqlcvydypatdoo") - .withPorts(Arrays.asList("kniod", "oo")))))); + new PortGroupProperties().withName("bzkdvn") + .withPorts(Arrays.asList("budurgkakmo", "zhjjklffhmouwq")), + new PortGroupProperties().withName("zrfze") + .withPorts(Arrays.asList("bizikayuhq", "bjbsybb", "wrv")), + new PortGroupProperties().withName("dgmfpgvmpipasl") + .withPorts(Arrays.asList("qfxssmwutw", "dsrezpdrhneuyow")), + new PortGroupProperties().withName("d").withPorts(Arrays.asList("i")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.NPB) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withControlPlaneAclConfiguration( + Arrays + .asList(new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties() + .withMatchConfigurationName("rjqc") + .withSequenceNumber(7350940410985010764L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("rlazszrnw") + .withIpCondition(new ControlPlanAclIpMatchCondition()) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition()) + .withPortCondition(new ControlPlaneAclPortMatchCondition()) + .withFlags(Arrays.asList("pwp", "ylwbtlhflsjcdhsz", "jvfbgofelja")) + .withIcmpConfiguration(new IcmpConfigurationProperties())) + .withAction(new ControlPlaneAclAction().withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("ldvriiiojnalghfk")))))); model = BinaryData.fromObject(model).toObject(AccessControlListProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("i", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("xqbzvddntwnd", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4634265215487541073L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("zgpphrcgyncocpe", + Assertions.assertEquals("xoegukgjnpiucgy", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("qzntypm", model.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("drqjsdpy", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5766056983460655346L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("xgodebfqkkrbmp", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("y", + Assertions.assertEquals("ycispnqzahmgkb", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", + Assertions.assertEquals("qqkpikadrg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", + Assertions.assertEquals("gmebfsiarbutrcv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ipheoflokeyyien", + Assertions.assertEquals("runmp", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("slfhotwm", + Assertions.assertEquals("w", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("oqvuhr", + Assertions.assertEquals("jzicwifsjt", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("qkwpyeicxmqc", + Assertions.assertEquals("uxwgipwho", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("e", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("m", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("rzayv", + Assertions.assertEquals("hwankixzbinjepu", + model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("sicohoqqnwvlry", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("lyaxuc", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("nhwlrsffrzpwvl", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("bhj", + Assertions.assertEquals("ttxfvjr", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("qfbow", + Assertions.assertEquals("kyqxjvuujqgidokg", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("fgugnxkrxdqmid", + Assertions.assertEquals("civfsnkymuctq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("jektcxsenh", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("vmbmp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("oxgvclt", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.REMARK, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("nobglaocq", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("ccm", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("rmaequ", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("fv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("vmwy", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ouyftaakc", + Assertions.assertEquals("cslfaoqzpiyylha", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("aivwitqscywu", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("oluhczbwemh", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("jxgciqibrh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("sdqrhzoymibmrq", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("cccnxqhuexmktt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("vlz", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, model.controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("rjqc", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7350940410985010764L, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rlazszrnw", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("pwp", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.PERMIT, + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().type()); + Assertions.assertEquals("ldvriiiojnalghfk", + model.controlPlaneAclConfiguration().get(0).matchConfigurations().get(0).action().remarkComment()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java index 69245fa2680b..e6852c1dcfa6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java @@ -1,22 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; @@ -34,68 +40,76 @@ public final class AccessControlListsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"lastSyncedTime\":\"2021-01-14T10:52:54Z\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"jkjqpizdnuehxwlt\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"bnklgerxac\",\"sequenceNumber\":1385317157229113948,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"hjrmp\",\"sequenceNumber\":5198363061422888849,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"armyb\"},\"location\":\"rotgeysyq\",\"tags\":{\"xia\":\"ehfwwcbf\"},\"id\":\"uvjucfjisosfzlnr\",\"name\":\"xnfyzgu\",\"type\":\"xfh\"}"; + = "{\"properties\":{\"annotation\":\"dzpx\",\"configurationType\":\"Inline\",\"aclsUrl\":\"qlvbkzai\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"iviniyoizuwwzc\",\"sequenceNumber\":3424445099708255376,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]}],\"lastSyncedTime\":\"2020-12-25T11:24:20Z\",\"aclType\":\"Management\",\"deviceRole\":\"ManagementSwitch\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"ypcuri\"},\"networkFabricIds\":[\"xtclveqdqtzsh\",\"lwjxrymiysgh\",\"cmqdlkkwbdek\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{},{},{},{}]},{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{}]}],\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"qhwcxx\",\"tags\":{\"tpzriknoscl\":\"gfvozaiyvrex\"},\"id\":\"jywwumbusnawbnc\",\"name\":\"jkhmsobua\",\"type\":\"okiclrmmudvo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessControlList response = manager.accessControlLists() - .define("vbmnhtwofx") - .withRegion("cynbu") - .withExistingResourceGroup("tebjkjgeecwtfma") - .withTags(mapOf("voneey", "iehedm")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("rml") + .define("ewgglq") + .withRegion("yafa") + .withExistingResourceGroup("qlyoor") + .withConfigurationType(ConfigurationType.INLINE) + .withTags(mapOf("ctilbxn", "lvtiploaws", "ohvdbncdrchue", "ynjtudfhpelza", "lvobctitexrbalv", + "xliqcbonqjoekcjc", "pdyrqlazfjl", "fdqilprqhxfqk")) + .withAnnotation("ykckyhxuzn") + .withAclsUrl("iadj") .withDefaultAction(CommunityActionTypes.PERMIT) .withMatchConfigurations( Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("jgqqrugwesps") - .withSequenceNumber(5755899523459666377L) + new AccessControlListMatchConfiguration().withMatchConfigurationName("lcd") + .withSequenceNumber(2236492543838566009L) .withIpAddressType(IpAddressType.IPV6) .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), + new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("zfvzasupcv") - .withSequenceNumber(214884224548552199L) + .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), + new AccessControlListAction())), + new AccessControlListMatchConfiguration().withMatchConfigurationName("ygmtbiv") + .withSequenceNumber(2231968140941111534L) .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("m") - .withSequenceNumber(2567619873631405084L) - .withIpAddressType(IpAddressType.IPV6) .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("lmajpuyxoafrmz") + new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) + .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())))) + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), + new IpGroupProperties(), new IpGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), + new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties())))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.MANAGEMENT_SWITCH) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withControlPlaneAclConfiguration(Arrays.asList( + new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties(), + new ControlPlaneAclMatchConfigurationProperties(), + new ControlPlaneAclMatchConfigurationProperties())), + new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties())), + new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV6) + .withMatchConfigurations(Arrays.asList(new ControlPlaneAclMatchConfigurationProperties())))) .create(); - Assertions.assertEquals("rotgeysyq", response.location()); - Assertions.assertEquals("ehfwwcbf", response.tags().get("xia")); + Assertions.assertEquals("qhwcxx", response.location()); + Assertions.assertEquals("gfvozaiyvrex", response.tags().get("tpzriknoscl")); + Assertions.assertEquals("dzpx", response.annotation()); Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("jkjqpizdnuehxwlt", response.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("bnklgerxac", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1385317157229113948L, response.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("armyb", response.annotation()); + Assertions.assertEquals("qlvbkzai", response.aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.defaultAction()); + Assertions.assertEquals("iviniyoizuwwzc", response.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3424445099708255376L, response.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, response.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.MANAGEMENT, response.aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, response.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV4, response.controlPlaneAclConfiguration().get(0).ipAddressType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java index 927be4594f8f..8d929fea35b1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java @@ -1,18 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,27 +27,31 @@ public final class AccessControlListsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"lastSyncedTime\":\"2021-11-22T15:22:40Z\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"ciyoypoedk\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"py\",\"sequenceNumber\":2877359021254224088,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"te\",\"sequenceNumber\":5641083204128969165,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]}],\"annotation\":\"obpmgqlw\"},\"location\":\"znbbyzposzfut\",\"tags\":{\"ewflwzhxzuxe\":\"ygbnbcmoiqgtzpv\",\"jdajdqxymxxyfrd\":\"xhywlrkqsqvvdkfp\"},\"id\":\"idcetfvgwfwsldi\",\"name\":\"wouppvyddq\",\"type\":\"vclrsn\"}"; + = "{\"properties\":{\"annotation\":\"wgljfatezdxqhjep\",\"configurationType\":\"File\",\"aclsUrl\":\"myomjeflgnieeq\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"nnduxkepga\",\"sequenceNumber\":9201835691172142957,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"uterrcanlpfqddww\",\"sequenceNumber\":8521131056616640540,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"my\",\"sequenceNumber\":1495221622507288048,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]}],\"lastSyncedTime\":\"2021-06-19T06:45:38Z\",\"aclType\":\"ControlPlaneAcl\",\"deviceRole\":\"CE\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"d\"},\"networkFabricIds\":[\"jzxr\",\"xjiraupirvdonkaq\",\"gvgjg\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{}]}],\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"hnx\",\"tags\":{\"wq\":\"frnkts\",\"kstt\":\"arjteqlujmmknia\"},\"id\":\"imeztas\",\"name\":\"l\",\"type\":\"mecweohlerpt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessControlList response = manager.accessControlLists() - .getByResourceGroupWithResponse("hgxuwudgcyqruvum", "yddnqivah", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("fb", "b", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("znbbyzposzfut", response.location()); - Assertions.assertEquals("ygbnbcmoiqgtzpv", response.tags().get("ewflwzhxzuxe")); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("ciyoypoedk", response.aclsUrl()); + Assertions.assertEquals("hnx", response.location()); + Assertions.assertEquals("frnkts", response.tags().get("wq")); + Assertions.assertEquals("wgljfatezdxqhjep", response.annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.configurationType()); + Assertions.assertEquals("myomjeflgnieeq", response.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("py", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2877359021254224088L, response.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("nnduxkepga", response.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(9201835691172142957L, response.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("obpmgqlw", response.annotation()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, response.aclType()); + Assertions.assertEquals(DeviceRole.CE, response.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV4, response.controlPlaneAclConfiguration().get(0).ipAddressType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java index ab905e78d44c..6f93451c332a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java @@ -1,19 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -25,28 +28,35 @@ public final class AccessControlListsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"lastSyncedTime\":\"2021-06-10T23:25:07Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"aclsUrl\":\"qzfxaitiqmcjbs\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"n\",\"sequenceNumber\":4707408565326769917,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"obwkeuzlte\",\"sequenceNumber\":349078752510706470,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"txjbrixy\"},\"location\":\"kikkqyvurhwishy\",\"tags\":{\"evnkyakck\":\"zcq\",\"uaz\":\"ehognsddjkkdede\",\"g\":\"gfcnxc\",\"ifjc\":\"umtcqxmyvkxixypa\"},\"id\":\"g\",\"name\":\"hvpsuwichm\",\"type\":\"czbyfkocgm\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"gbpaba\",\"configurationType\":\"File\",\"aclsUrl\":\"eirjrkak\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"mazlx\",\"sequenceNumber\":3571101816448060118,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"lastSyncedTime\":\"2021-10-27T04:53:25Z\",\"aclType\":\"Tenant\",\"deviceRole\":\"CE\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"tedxzgyhbzmgzsyt\"},\"networkFabricIds\":[\"slr\",\"vsqsbqr\",\"bpiqfstkdl\",\"jzijxefydck\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{}]}],\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"},\"location\":\"nhflx\",\"tags\":{\"frdlfewex\":\"trugo\",\"ijclfdprezqx\":\"rvbdyriyraybigks\"},\"id\":\"xeigyddp\",\"name\":\"n\",\"type\":\"bxerzypcralwvc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accessControlLists().listByResourceGroup("frppwwqclmdmt", com.azure.core.util.Context.NONE); + = manager.accessControlLists().listByResourceGroup("wvzapybdeea", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kikkqyvurhwishy", response.iterator().next().location()); - Assertions.assertEquals("zcq", response.iterator().next().tags().get("evnkyakck")); + Assertions.assertEquals("nhflx", response.iterator().next().location()); + Assertions.assertEquals("trugo", response.iterator().next().tags().get("frdlfewex")); + Assertions.assertEquals("gbpaba", response.iterator().next().annotation()); Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("qzfxaitiqmcjbs", response.iterator().next().aclsUrl()); + Assertions.assertEquals("eirjrkak", response.iterator().next().aclsUrl()); Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("n", response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4707408565326769917L, + Assertions.assertEquals("mazlx", + response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3571101816448060118L, response.iterator().next().matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("txjbrixy", response.iterator().next().annotation()); + Assertions.assertEquals(AclType.TENANT, response.iterator().next().aclType()); + Assertions.assertEquals(DeviceRole.CE, response.iterator().next().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.iterator().next().globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, + response.iterator().next().controlPlaneAclConfiguration().get(0).ipAddressType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java index a4eb8bf82b48..a1803c4ed066 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java @@ -1,19 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -25,28 +28,33 @@ public final class AccessControlListsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"lastSyncedTime\":\"2021-06-02T04:48:35Z\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"aclsUrl\":\"gt\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"wvplksdksutacuc\",\"sequenceNumber\":7440105137289779135,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"hxvpmqququxlp\",\"sequenceNumber\":9014005016063545013,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"orocrqicgym\",\"sequenceNumber\":8021729751205463698,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"vijvwmrgcnzhr\",\"sequenceNumber\":7600565246090759969,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]}],\"annotation\":\"mbky\"},\"location\":\"xjdqosxzmdzlybq\",\"tags\":{\"ki\":\"kekz\"},\"id\":\"xh\",\"name\":\"evmnk\",\"type\":\"ghvsryjokv\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"rbizx\",\"configurationType\":\"Inline\",\"aclsUrl\":\"mhzbcuj\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"r\",\"sequenceNumber\":3885308377188332629,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"bf\",\"sequenceNumber\":6423338404278797884,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"mkuquvcgvn\",\"sequenceNumber\":515464128940727586,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]}],\"lastSyncedTime\":\"2021-06-22T01:01:42Z\",\"aclType\":\"ControlPlaneAcl\",\"deviceRole\":\"ManagementSwitch\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"pomiustkq\"},\"networkFabricIds\":[\"bhlgrrskvt\",\"bkeeohpfedx\",\"djudekmxhwzm\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{},{}]}],\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"edijdhzkwvuewe\",\"tags\":{\"lxdknxctglz\":\"jels\",\"fsgwi\":\"cx\",\"wjudx\":\"yiw\",\"zcffchn\":\"fvn\"},\"id\":\"iyevjeht\",\"name\":\"eaoxxsehfl\",\"type\":\"m\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.accessControlLists().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("xjdqosxzmdzlybq", response.iterator().next().location()); - Assertions.assertEquals("kekz", response.iterator().next().tags().get("ki")); - Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("gt", response.iterator().next().aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("wvplksdksutacuc", - response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7440105137289779135L, + Assertions.assertEquals("edijdhzkwvuewe", response.iterator().next().location()); + Assertions.assertEquals("jels", response.iterator().next().tags().get("lxdknxctglz")); + Assertions.assertEquals("rbizx", response.iterator().next().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.iterator().next().configurationType()); + Assertions.assertEquals("mhzbcuj", response.iterator().next().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().defaultAction()); + Assertions.assertEquals("r", response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3885308377188332629L, response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals(IpAddressType.IPV6, response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("mbky", response.iterator().next().annotation()); + Assertions.assertEquals(AclType.CONTROL_PLANE_ACL, response.iterator().next().aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, response.iterator().next().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.iterator().next().globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, + response.iterator().next().controlPlaneAclConfiguration().get(0).ipAddressType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java index 14828883a546..7d72e9a87db7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java @@ -1,236 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListsListResult; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AccessControlListsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"lastSyncedTime\":\"2021-06-01T23:38:48Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"aclsUrl\":\"myccx\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ovne\",\"sequenceNumber\":7587304831403189204,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"tjxtxr\",\"sequenceNumber\":2960888766726834281,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"epu\",\"sequenceNumber\":7392352189892774319,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"asiz\",\"sequenceNumber\":6533192365973677613,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"rswnjlxuzrhwp\"},\"location\":\"xjbaqehgpdohzjq\",\"tags\":{\"e\":\"coi\",\"bnwgfmxj\":\"xncnwfe\"},\"id\":\"cgbjbgdlfgt\",\"name\":\"y\",\"type\":\"naquflq\"},{\"properties\":{\"lastSyncedTime\":\"2021-05-03T03:00:46Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"aclsUrl\":\"kqzeqyjleziunjx\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"kwcegyamlbn\",\"sequenceNumber\":1472551635473753949,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"guooqjagmdit\",\"sequenceNumber\":1873486568020601508,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"nfxofvcj\"},\"location\":\"dirazf\",\"tags\":{\"jtmvc\":\"jwabmd\",\"kyqltqsrogt\":\"pexcmjurbuhh\",\"ysidfvclgl\":\"wkffdjkt\",\"uijtkbu\":\"n\"},\"id\":\"qogsfikayian\",\"name\":\"haru\",\"type\":\"t\"},{\"properties\":{\"lastSyncedTime\":\"2021-09-02T16:26Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"wkpqhjpenuygbq\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"wv\",\"sequenceNumber\":5031872996137755111,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"mfdjwn\",\"sequenceNumber\":7067033284012194422,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"ntsj\"},\"location\":\"rsxypruuu\",\"tags\":{\"oyuelyetn\":\"chrszi\",\"qyggagfl\":\"nb\",\"byrplrohkpig\":\"lgmtrwahzjmucf\"},\"id\":\"fusuckzmkwklsno\",\"name\":\"axmqeqal\",\"type\":\"hjnhgwydyynfsvk\"},{\"properties\":{\"lastSyncedTime\":\"2020-12-23T07:31:38Z\",\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"aclsUrl\":\"lpu\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"eizjcpeogkhnmg\",\"sequenceNumber\":7213187921154412641,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"tehtuevrhrljyoog\"},\"location\":\"hnsduugwbsreur\",\"tags\":{\"lnvnafvvkyfedev\":\"fuarenlvhht\",\"lcqxypokk\":\"bo\",\"zng\":\"minqcym\"},\"id\":\"bdxxe\",\"name\":\"unin\",\"type\":\"udbchaqdtv\"}],\"nextLink\":\"crqctmxxdtddmflh\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"fkoxmlghktuidvr\",\"configurationType\":\"File\",\"aclsUrl\":\"lpdwwexymzvlazi\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"qsg\",\"sequenceNumber\":546267716188388176,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"rpmey\",\"sequenceNumber\":7297334234854184102,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"lastSyncedTime\":\"2021-01-30T11:52:58Z\",\"aclType\":\"Tenant\",\"deviceRole\":\"ToR\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"mp\"},\"networkFabricIds\":[\"awz\"],\"controlPlaneAclConfiguration\":[{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{},{}]},{\"ipAddressType\":\"IPv6\",\"matchConfigurations\":[{},{},{},{}]},{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{},{},{}]}],\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"},\"location\":\"hiqfyuttdiy\",\"tags\":{\"txkyctwwgzwxjlm\":\"vnwsw\"},\"id\":\"cvogygzyvne\",\"name\":\"zaifghtmoqqtlff\",\"type\":\"zbkr\"}],\"nextLink\":\"jjavfq\"}") .toObject(AccessControlListsListResult.class); - Assertions.assertEquals("xjbaqehgpdohzjq", model.value().get(0).location()); - Assertions.assertEquals("coi", model.value().get(0).tags().get("e")); - Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).configurationType()); - Assertions.assertEquals("myccx", model.value().get(0).aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).defaultAction()); - Assertions.assertEquals("ovne", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7587304831403189204L, + Assertions.assertEquals("hiqfyuttdiy", model.value().get(0).location()); + Assertions.assertEquals("vnwsw", model.value().get(0).tags().get("txkyctwwgzwxjlm")); + Assertions.assertEquals("fkoxmlghktuidvr", model.value().get(0).annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.value().get(0).configurationType()); + Assertions.assertEquals("lpdwwexymzvlazi", model.value().get(0).aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).defaultAction()); + Assertions.assertEquals("qsg", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(546267716188388176L, model.value().get(0).matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("rswnjlxuzrhwp", model.value().get(0).annotation()); - Assertions.assertEquals("crqctmxxdtddmflh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListsListResult model = new AccessControlListsListResult() - .withValue(Arrays.asList( - new AccessControlListInner().withLocation("xjbaqehgpdohzjq") - .withTags(mapOf("e", "coi", "bnwgfmxj", "xncnwfe")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("myccx") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("ovne") - .withSequenceNumber(7587304831403189204L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("tjxtxr") - .withSequenceNumber(2960888766726834281L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("epu") - .withSequenceNumber(7392352189892774319L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("asiz") - .withSequenceNumber(6533192365973677613L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("rswnjlxuzrhwp"), - new AccessControlListInner().withLocation("dirazf") - .withTags(mapOf("jtmvc", "jwabmd", "kyqltqsrogt", "pexcmjurbuhh", "ysidfvclgl", "wkffdjkt", - "uijtkbu", "n")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("kqzeqyjleziunjx") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("kwcegyamlbn") - .withSequenceNumber(1472551635473753949L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("guooqjagmdit") - .withSequenceNumber(1873486568020601508L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("nfxofvcj"), - new AccessControlListInner().withLocation("rsxypruuu") - .withTags(mapOf("oyuelyetn", "chrszi", "qyggagfl", "nb", "byrplrohkpig", "lgmtrwahzjmucf")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("wkpqhjpenuygbq") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("wv") - .withSequenceNumber(5031872996137755111L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays - .asList(new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("mfdjwn") - .withSequenceNumber(7067033284012194422L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("ntsj"), - new AccessControlListInner().withLocation("hnsduugwbsreur") - .withTags(mapOf("lnvnafvvkyfedev", "fuarenlvhht", "lcqxypokk", "bo", "zng", "minqcym")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("lpu") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations(Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("eizjcpeogkhnmg") - .withSequenceNumber(7213187921154412641L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("tehtuevrhrljyoog"))) - .withNextLink("crqctmxxdtddmflh"); - model = BinaryData.fromObject(model).toObject(AccessControlListsListResult.class); - Assertions.assertEquals("xjbaqehgpdohzjq", model.value().get(0).location()); - Assertions.assertEquals("coi", model.value().get(0).tags().get("e")); - Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).configurationType()); - Assertions.assertEquals("myccx", model.value().get(0).aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).defaultAction()); - Assertions.assertEquals("ovne", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7587304831403189204L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("rswnjlxuzrhwp", model.value().get(0).annotation()); - Assertions.assertEquals("crqctmxxdtddmflh", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(AclType.TENANT, model.value().get(0).aclType()); + Assertions.assertEquals(DeviceRole.TOR, model.value().get(0).deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.value().get(0).globalAccessControlListActions().enableCount()); + Assertions.assertEquals(IpAddressType.IPV6, + model.value().get(0).controlPlaneAclConfiguration().get(0).ipAddressType()); + Assertions.assertEquals("jjavfq", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java new file mode 100644 index 000000000000..a2b0c5adb232 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ActionIpCommunityPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionIpCommunityPatchProperties model = BinaryData.fromString( + "{\"add\":{\"ipCommunityIds\":[\"i\"]},\"delete\":{\"ipCommunityIds\":[\"f\",\"xm\"]},\"set\":{\"ipCommunityIds\":[\"kretsnyr\"]}}") + .toObject(ActionIpCommunityPatchProperties.class); + Assertions.assertEquals("i", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("f", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("kretsnyr", model.set().ipCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionIpCommunityPatchProperties model = new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("i"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("f", "xm"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("kretsnyr"))); + model = BinaryData.fromObject(model).toObject(ActionIpCommunityPatchProperties.class); + Assertions.assertEquals("i", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("f", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("kretsnyr", model.set().ipCommunityIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java index 799eb81054d1..1f41e1522dc4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,24 +14,22 @@ public final class ActionIpCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionIpCommunityProperties model = BinaryData.fromString( - "{\"delete\":{\"ipCommunityIds\":[\"omepxwsicvwqzo\"]},\"set\":{\"ipCommunityIds\":[\"hennmsgpywdib\",\"gvnrgalvwrhr\",\"ibrbknuubxc\",\"ojtu\"]},\"add\":{\"ipCommunityIds\":[\"npyeevffifu\",\"gtdow\",\"xmwefcbybpc\",\"rtczwjcujyznvyrj\"]}}") + "{\"add\":{\"ipCommunityIds\":[\"urskuffudbk\",\"unngjoasnzlaw\",\"wqsni\"]},\"delete\":{\"ipCommunityIds\":[\"qzurvukszkmxbh\"]},\"set\":{\"ipCommunityIds\":[\"ae\"]}}") .toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("npyeevffifu", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("omepxwsicvwqzo", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("hennmsgpywdib", model.set().ipCommunityIds().get(0)); + Assertions.assertEquals("urskuffudbk", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("qzurvukszkmxbh", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("ae", model.set().ipCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ActionIpCommunityProperties model = new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("npyeevffifu", "gtdow", "xmwefcbybpc", "rtczwjcujyznvyrj"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("omepxwsicvwqzo"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("hennmsgpywdib", "gvnrgalvwrhr", "ibrbknuubxc", "ojtu"))); + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("urskuffudbk", "unngjoasnzlaw", "wqsni"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("qzurvukszkmxbh"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ae"))); model = BinaryData.fromObject(model).toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("npyeevffifu", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("omepxwsicvwqzo", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("hennmsgpywdib", model.set().ipCommunityIds().get(0)); + Assertions.assertEquals("urskuffudbk", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("qzurvukszkmxbh", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("ae", model.set().ipCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java new file mode 100644 index 000000000000..d361f5f81630 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ActionIpExtendedCommunityPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionIpExtendedCommunityPatchProperties model = BinaryData.fromString( + "{\"add\":{\"ipExtendedCommunityIds\":[\"byzz\",\"xsygaoymyckd\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"xbmljrjyfjleuxix\",\"psjldgnimqoac\",\"qzxjziqcsotwqtk\",\"dcdefqoe\"]},\"set\":{\"ipExtendedCommunityIds\":[\"gnddaxaogskhc\",\"m\",\"bipyse\",\"yyb\"]}}") + .toObject(ActionIpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("byzz", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("xbmljrjyfjleuxix", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gnddaxaogskhc", model.set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionIpExtendedCommunityPatchProperties model = new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("byzz", "xsygaoymyckd"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("xbmljrjyfjleuxix", "psjldgnimqoac", "qzxjziqcsotwqtk", "dcdefqoe"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("gnddaxaogskhc", "m", "bipyse", "yyb"))); + model = BinaryData.fromObject(model).toObject(ActionIpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("byzz", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("xbmljrjyfjleuxix", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gnddaxaogskhc", model.set().ipExtendedCommunityIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java index 3439162d8bd7..7b092596ae26 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,22 +14,24 @@ public final class ActionIpExtendedCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionIpExtendedCommunityProperties model = BinaryData.fromString( - "{\"delete\":{\"ipExtendedCommunityIds\":[\"uw\"]},\"set\":{\"ipExtendedCommunityIds\":[\"fgijydgs\"]},\"add\":{\"ipExtendedCommunityIds\":[\"y\",\"tevaebzm\",\"ywhr\"]}}") + "{\"add\":{\"ipExtendedCommunityIds\":[\"mwow\",\"mhmifhfutjyx\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"tguqa\",\"moygcax\",\"ymdqr\",\"vgicxt\"]},\"set\":{\"ipExtendedCommunityIds\":[\"gnsydksvjfgxgdpi\",\"jkhcoscoljjhcs\",\"zooefzsdttbq\",\"aqdvwo\"]}}") .toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("y", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("uw", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fgijydgs", model.set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("mwow", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("tguqa", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gnsydksvjfgxgdpi", model.set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ActionIpExtendedCommunityProperties model = new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("y", "tevaebzm", "ywhr"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("uw"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("fgijydgs"))); + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("mwow", "mhmifhfutjyx"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("tguqa", "moygcax", "ymdqr", "vgicxt"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("gnsydksvjfgxgdpi", "jkhcoscoljjhcs", "zooefzsdttbq", "aqdvwo"))); model = BinaryData.fromObject(model).toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("y", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("uw", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fgijydgs", model.set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("mwow", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("tguqa", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gnsydksvjfgxgdpi", model.set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java index aaa780272277..ad6a2a787cbe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,20 +14,20 @@ public final class AggregateRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AggregateRouteConfiguration model = BinaryData.fromString( - "{\"ipv4Routes\":[{\"prefix\":\"i\"},{\"prefix\":\"jpnwynudql\"},{\"prefix\":\"zsauzp\"}],\"ipv6Routes\":[{\"prefix\":\"eehuxiqhzlray\"}]}") + "{\"ipv4Routes\":[{\"prefix\":\"eba\"}],\"ipv6Routes\":[{\"prefix\":\"llrzlsmmdqgmihz\"},{\"prefix\":\"imcqrh\"}]}") .toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("i", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eehuxiqhzlray", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("eba", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("llrzlsmmdqgmihz", model.ipv6Routes().get(0).prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AggregateRouteConfiguration model = new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("i"), - new AggregateRoute().withPrefix("jpnwynudql"), new AggregateRoute().withPrefix("zsauzp"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("eehuxiqhzlray"))); + AggregateRouteConfiguration model + = new AggregateRouteConfiguration().withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("eba"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("llrzlsmmdqgmihz"), + new AggregateRoute().withPrefix("imcqrh"))); model = BinaryData.fromObject(model).toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("i", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eehuxiqhzlray", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("eba", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("llrzlsmmdqgmihz", model.ipv6Routes().get(0).prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..033ae1b6bbeb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AggregateRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AggregateRoutePatchConfiguration model = BinaryData.fromString( + "{\"ipv4Routes\":[{\"prefix\":\"wamec\"}],\"ipv6Routes\":[{\"prefix\":\"ioulndhzyoe\"},{\"prefix\":\"jhtollh\"},{\"prefix\":\"vidmytzl\"},{\"prefix\":\"glxpnovyoanfbcsw\"}]}") + .toObject(AggregateRoutePatchConfiguration.class); + Assertions.assertEquals("wamec", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ioulndhzyoe", model.ipv6Routes().get(0).prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AggregateRoutePatchConfiguration model = new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("wamec"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("ioulndhzyoe"), + new AggregateRoute().withPrefix("jhtollh"), new AggregateRoute().withPrefix("vidmytzl"), + new AggregateRoute().withPrefix("glxpnovyoanfbcsw"))); + model = BinaryData.fromObject(model).toObject(AggregateRoutePatchConfiguration.class); + Assertions.assertEquals("wamec", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ioulndhzyoe", model.ipv6Routes().get(0).prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java index 571fc0513424..930ed7566601 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,14 +11,15 @@ public final class AggregateRouteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AggregateRoute model = BinaryData.fromString("{\"prefix\":\"ezxlskihm\"}").toObject(AggregateRoute.class); - Assertions.assertEquals("ezxlskihm", model.prefix()); + AggregateRoute model + = BinaryData.fromString("{\"prefix\":\"xtminklogxsvtzar\"}").toObject(AggregateRoute.class); + Assertions.assertEquals("xtminklogxsvtzar", model.prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AggregateRoute model = new AggregateRoute().withPrefix("ezxlskihm"); + AggregateRoute model = new AggregateRoute().withPrefix("xtminklogxsvtzar"); model = BinaryData.fromObject(model).toObject(AggregateRoute.class); - Assertions.assertEquals("ezxlskihm", model.prefix()); + Assertions.assertEquals("xtminklogxsvtzar", model.prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java index b28186f5d670..79eb0953bdf4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,14 +12,14 @@ public final class AnnotationResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AnnotationResource model - = BinaryData.fromString("{\"annotation\":\"odtji\"}").toObject(AnnotationResource.class); - Assertions.assertEquals("odtji", model.annotation()); + = BinaryData.fromString("{\"annotation\":\"sczpgvdwnapfd\"}").toObject(AnnotationResource.class); + Assertions.assertEquals("sczpgvdwnapfd", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AnnotationResource model = new AnnotationResource().withAnnotation("odtji"); + AnnotationResource model = new AnnotationResource().withAnnotation("sczpgvdwnapfd"); model = BinaryData.fromObject(model).toObject(AnnotationResource.class); - Assertions.assertEquals("odtji", model.annotation()); + Assertions.assertEquals("sczpgvdwnapfd", model.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArmConfigurationDiffResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArmConfigurationDiffResponsePropertiesTests.java new file mode 100644 index 000000000000..93472d662efc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArmConfigurationDiffResponsePropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class ArmConfigurationDiffResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArmConfigurationDiffResponseProperties model = BinaryData.fromString("{\"configurationDiffUrl\":\"ronsdunr\"}") + .toObject(ArmConfigurationDiffResponseProperties.class); + Assertions.assertEquals("ronsdunr", model.configurationDiffUrl()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java index b76f45b900fb..21057b5bb618 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,18 +13,18 @@ public final class BfdConfigurationTests { public void testDeserialize() throws Exception { BfdConfiguration model = BinaryData .fromString( - "{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1056742134,\"multiplier\":1974850281}") + "{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1411346592,\"multiplier\":1480169002}") .toObject(BfdConfiguration.class); - Assertions.assertEquals(1056742134, model.intervalInMilliSeconds()); - Assertions.assertEquals(1974850281, model.multiplier()); + Assertions.assertEquals(1411346592, model.intervalInMilliSeconds()); + Assertions.assertEquals(1480169002, model.multiplier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BfdConfiguration model - = new BfdConfiguration().withIntervalInMilliSeconds(1056742134).withMultiplier(1974850281); + = new BfdConfiguration().withIntervalInMilliSeconds(1411346592).withMultiplier(1480169002); model = BinaryData.fromObject(model).toObject(BfdConfiguration.class); - Assertions.assertEquals(1056742134, model.intervalInMilliSeconds()); - Assertions.assertEquals(1974850281, model.multiplier()); + Assertions.assertEquals(1411346592, model.intervalInMilliSeconds()); + Assertions.assertEquals(1480169002, model.multiplier()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java new file mode 100644 index 000000000000..a867f0ceaf6e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class BfdPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BfdPatchConfiguration model = BinaryData + .fromString( + "{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1462544860,\"multiplier\":1759946929}") + .toObject(BfdPatchConfiguration.class); + Assertions.assertEquals(1462544860, model.intervalInMilliSeconds()); + Assertions.assertEquals(1759946929, model.multiplier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BfdPatchConfiguration model + = new BfdPatchConfiguration().withIntervalInMilliSeconds(1462544860).withMultiplier(1759946929); + model = BinaryData.fromObject(model).toObject(BfdPatchConfiguration.class); + Assertions.assertEquals(1462544860, model.intervalInMilliSeconds()); + Assertions.assertEquals(1759946929, model.multiplier()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java index b24177a88913..3dc10d4a414a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,8 +8,14 @@ import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -17,46 +23,67 @@ public final class BgpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BgpConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":826879471,\"multiplier\":1682795627},\"defaultRouteOriginate\":\"False\",\"allowAS\":367335862,\"allowASOverride\":\"Enable\",\"fabricASN\":9149739822165155444,\"peerASN\":1426374752263433647,\"ipv4ListenRangePrefixes\":[\"a\",\"wmzwdfkbnrzorpdl\",\"bqc\",\"qjf\"],\"ipv6ListenRangePrefixes\":[\"saetgzdgvpyig\",\"aqqilzdcduwjoed\"],\"ipv4NeighborAddress\":[{\"address\":\"caifpaurww\",\"configurationState\":\"Provisioned\"},{\"address\":\"jqqacdmkx\",\"configurationState\":\"ErrorProvisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"wcyz\",\"configurationState\":\"Succeeded\"}],\"annotation\":\"ciqchxrtuicd\"}") + "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1684190073,\"multiplier\":417743478},\"defaultRouteOriginate\":\"True\",\"allowAS\":1136445930,\"allowASOverride\":\"Disable\",\"fabricASN\":4456587067686960599,\"peerASN\":5963284589021239728,\"ipv4ListenRangePrefixes\":[\"ekaj\"],\"ipv6ListenRangePrefixes\":[\"zg\",\"norbjgmnzjot\",\"mrxkhlobvv\",\"bhvhdiqay\"],\"ipv4NeighborAddress\":[{\"address\":\"yu\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Accepted\"},{\"address\":\"lvhyibdrqrswhbu\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Failed\"}],\"ipv6NeighborAddress\":[{\"address\":\"xztfwfqchvczevj\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"v\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"z\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"},{\"address\":\"hqyhwqw\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"zeoxin\",\"greohtwhlpuzjp\",\"eezn\"],\"bmpConfigurationState\":\"Enabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\"]}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"zlbciphmse\"}") .toObject(BgpConfiguration.class); - Assertions.assertEquals("ciqchxrtuicd", model.annotation()); - Assertions.assertEquals(826879471, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1682795627, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(367335862, model.allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); - Assertions.assertEquals(1426374752263433647L, model.peerAsn()); - Assertions.assertEquals("a", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("saetgzdgvpyig", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("caifpaurww", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("wcyz", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("zlbciphmse", model.annotation()); + Assertions.assertEquals(1684190073, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(417743478, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); + Assertions.assertEquals(1136445930, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(5963284589021239728L, model.peerAsn()); + Assertions.assertEquals("ekaj", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("zg", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("yu", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("xztfwfqchvczevj", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("zeoxin", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.ALL, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.v6OverV4BgpSession()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BgpConfiguration model = new BgpConfiguration().withAnnotation("ciqchxrtuicd") + BgpConfiguration model = new BgpConfiguration().withAnnotation("zlbciphmse") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(826879471).withMultiplier(1682795627)) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(367335862) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(1426374752263433647L) - .withIpv4ListenRangePrefixes(Arrays.asList("a", "wmzwdfkbnrzorpdl", "bqc", "qjf")) - .withIpv6ListenRangePrefixes(Arrays.asList("saetgzdgvpyig", "aqqilzdcduwjoed")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("caifpaurww"), - new NeighborAddress().withAddress("jqqacdmkx"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("wcyz"))); + new BfdConfiguration().withIntervalInMilliSeconds(1684190073).withMultiplier(417743478)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(1136445930) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerAsn(5963284589021239728L) + .withIpv4ListenRangePrefixes(Arrays.asList("ekaj")) + .withIpv6ListenRangePrefixes(Arrays.asList("zg", "norbjgmnzjot", "mrxkhlobvv", "bhvhdiqay")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("yu"), + new NeighborAddress().withAddress("lvhyibdrqrswhbu"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("xztfwfqchvczevj"), + new NeighborAddress().withAddress("v"), new NeighborAddress().withAddress("z"), + new NeighborAddress().withAddress("hqyhwqw"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("zeoxin", "greohtwhlpuzjp", "eezn")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.ALL)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED); model = BinaryData.fromObject(model).toObject(BgpConfiguration.class); - Assertions.assertEquals("ciqchxrtuicd", model.annotation()); - Assertions.assertEquals(826879471, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1682795627, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(367335862, model.allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); - Assertions.assertEquals(1426374752263433647L, model.peerAsn()); - Assertions.assertEquals("a", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("saetgzdgvpyig", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("caifpaurww", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("wcyz", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("zlbciphmse", model.annotation()); + Assertions.assertEquals(1684190073, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(417743478, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); + Assertions.assertEquals(1136445930, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(5963284589021239728L, model.peerAsn()); + Assertions.assertEquals("ekaj", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("zg", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("yu", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("xztfwfqchvczevj", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("zeoxin", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.ALL, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.v6OverV4BgpSession()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java new file mode 100644 index 000000000000..a11c3be0e773 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BgpPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BgpPatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2066989618,\"multiplier\":678222315},\"defaultRouteOriginate\":\"False\",\"allowAS\":619716025,\"allowASOverride\":\"Enable\",\"fabricASN\":8828984340020327962,\"peerASN\":2340340986521325133,\"ipv4ListenRangePrefixes\":[\"fofwan\",\"hks\"],\"ipv6ListenRangePrefixes\":[\"w\",\"zcgwdfriw\",\"ybjpozoks\",\"vgllixdgby\"],\"ipv4NeighborAddress\":[{\"address\":\"wqkjvx\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"hu\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"uugggzlfbgrd\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"lperpilttjzgc\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"ode\"}") + .toObject(BgpPatchConfiguration.class); + Assertions.assertEquals("ode", model.annotation()); + Assertions.assertEquals(2066989618, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(678222315, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); + Assertions.assertEquals(619716025, model.allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); + Assertions.assertEquals(2340340986521325133L, model.peerAsn()); + Assertions.assertEquals("fofwan", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("w", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("wqkjvx", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("uugggzlfbgrd", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lperpilttjzgc", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.v6OverV4BgpSession()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BgpPatchConfiguration model = new BgpPatchConfiguration().withAnnotation("ode") + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(2066989618).withMultiplier(678222315)) + .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) + .withAllowAS(619716025) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(2340340986521325133L) + .withIpv4ListenRangePrefixes(Arrays.asList("fofwan", "hks")) + .withIpv6ListenRangePrefixes(Arrays.asList("w", "zcgwdfriw", "ybjpozoks", "vgllixdgby")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("wqkjvx"), + new NeighborAddressPatch().withAddress("hu"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("uugggzlfbgrd"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("lperpilttjzgc")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED); + model = BinaryData.fromObject(model).toObject(BgpPatchConfiguration.class); + Assertions.assertEquals("ode", model.annotation()); + Assertions.assertEquals(2066989618, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(678222315, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); + Assertions.assertEquals(619716025, model.allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); + Assertions.assertEquals(2340340986521325133L, model.peerAsn()); + Assertions.assertEquals("fofwan", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("w", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("wqkjvx", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("uugggzlfbgrd", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lperpilttjzgc", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.v6OverV4BgpSession()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java new file mode 100644 index 000000000000..2df6153997c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import org.junit.jupiter.api.Assertions; + +public final class BitRateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BitRate model + = BinaryData.fromString("{\"rate\":8680354358067705951,\"unit\":\"Mbps\"}").toObject(BitRate.class); + Assertions.assertEquals(8680354358067705951L, model.rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BitRate model = new BitRate().withRate(8680354358067705951L).withUnit(BitRateUnit.MBPS); + model = BinaryData.fromObject(model).toObject(BitRate.class); + Assertions.assertEquals(8680354358067705951L, model.rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..cd123a32b6c9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpConfigurationPatchProperties model = BinaryData.fromString( + "{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"wlkryzmpgqqdh\",\"stationName\":\"tx\",\"stationIp\":\"egykjmpadbzjo\",\"stationPort\":686613259,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1266038730,\"probeInterval\":799282136,\"probeCount\":2013762241},\"stationNetwork\":\"jgrpquafxgjqq\",\"monitoredNetworks\":[\"tffxdbisihumw\"],\"exportPolicy\":\"LocalRib\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"LocalRib\"]},\"monitoredAddressFamilies\":[\"vpnIpv6\",\"vpnIpv6\",\"vpnIpv6\",\"ipv6Unicast\"]}") + .toObject(BmpConfigurationPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, model.stationConfigurationState()); + Assertions.assertEquals("wlkryzmpgqqdh", model.scopeResourceId()); + Assertions.assertEquals("tx", model.stationName()); + Assertions.assertEquals("egykjmpadbzjo", model.stationIp()); + Assertions.assertEquals(686613259, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(1266038730, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(799282136, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(2013762241, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("jgrpquafxgjqq", model.stationNetwork()); + Assertions.assertEquals("tffxdbisihumw", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, model.monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpConfigurationPatchProperties model = new BmpConfigurationPatchProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("wlkryzmpgqqdh") + .withStationName("tx") + .withStationIp("egykjmpadbzjo") + .withStationPort(686613259) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(1266038730) + .withProbeInterval(799282136) + .withProbeCount(2013762241)) + .withStationNetwork("jgrpquafxgjqq") + .withMonitoredNetworks(Arrays.asList("tffxdbisihumw")) + .withExportPolicy(BmpExportPolicy.LOCAL_RIB) + .withExportPolicyConfiguration(new BmpExportPolicyPatchProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.POST_POLICY, BmpExportPolicy.LOCAL_RIB))) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.VPN_IPV6, + BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.IPV6UNICAST)); + model = BinaryData.fromObject(model).toObject(BmpConfigurationPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, model.stationConfigurationState()); + Assertions.assertEquals("wlkryzmpgqqdh", model.scopeResourceId()); + Assertions.assertEquals("tx", model.stationName()); + Assertions.assertEquals("egykjmpadbzjo", model.stationIp()); + Assertions.assertEquals(686613259, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(1266038730, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(799282136, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(2013762241, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("jgrpquafxgjqq", model.stationNetwork()); + Assertions.assertEquals("tffxdbisihumw", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, model.monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java new file mode 100644 index 000000000000..0f791aad02c6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpConfigurationProperties model = BinaryData.fromString( + "{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"izeqlc\",\"stationName\":\"qnofkwhg\",\"stationIp\":\"wfyfdbvooelmikds\",\"stationPort\":1122817965,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1455507139,\"probeInterval\":13824201,\"probeCount\":1780015156},\"stationNetwork\":\"qmlmwjwsmnwb\",\"monitoredNetworks\":[\"v\",\"mmriyzyvques\",\"plcsinbulolx\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"LocalRib\"]},\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"ipv6Unicast\"]}") + .toObject(BmpConfigurationProperties.class); + Assertions.assertEquals(StationConfigurationState.DISABLED, model.stationConfigurationState()); + Assertions.assertEquals("izeqlc", model.scopeResourceId()); + Assertions.assertEquals("qnofkwhg", model.stationName()); + Assertions.assertEquals("wfyfdbvooelmikds", model.stationIp()); + Assertions.assertEquals(1122817965, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.stationConnectionMode()); + Assertions.assertEquals(1455507139, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(13824201, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1780015156, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("qmlmwjwsmnwb", model.stationNetwork()); + Assertions.assertEquals("v", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, model.monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpConfigurationProperties model + = new BmpConfigurationProperties().withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("izeqlc") + .withStationName("qnofkwhg") + .withStationIp("wfyfdbvooelmikds") + .withStationPort(1122817965) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(1455507139) + .withProbeInterval(13824201) + .withProbeCount(1780015156)) + .withStationNetwork("qmlmwjwsmnwb") + .withMonitoredNetworks(Arrays.asList("v", "mmriyzyvques", "plcsinbulolx")) + .withExportPolicy(BmpExportPolicy.ALL) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.POST_POLICY, BmpExportPolicy.LOCAL_RIB))) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.IPV6UNICAST, BmpMonitoredAddressFamily.IPV6UNICAST)); + model = BinaryData.fromObject(model).toObject(BmpConfigurationProperties.class); + Assertions.assertEquals(StationConfigurationState.DISABLED, model.stationConfigurationState()); + Assertions.assertEquals("izeqlc", model.scopeResourceId()); + Assertions.assertEquals("qnofkwhg", model.stationName()); + Assertions.assertEquals("wfyfdbvooelmikds", model.stationIp()); + Assertions.assertEquals(1122817965, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.stationConnectionMode()); + Assertions.assertEquals(1455507139, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(13824201, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1780015156, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("qmlmwjwsmnwb", model.stationNetwork()); + Assertions.assertEquals("v", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, model.monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPatchPropertiesTests.java new file mode 100644 index 000000000000..e924389d8a32 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPatchPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpExportPolicyPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpExportPolicyPatchProperties model = BinaryData.fromString("{\"exportPolicies\":[\"LocalRib\",\"LocalRib\"]}") + .toObject(BmpExportPolicyPatchProperties.class); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpExportPolicyPatchProperties model = new BmpExportPolicyPatchProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.LOCAL_RIB, BmpExportPolicy.LOCAL_RIB)); + model = BinaryData.fromObject(model).toObject(BmpExportPolicyPatchProperties.class); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPropertiesTests.java new file mode 100644 index 000000000000..3ce273bd3793 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpExportPolicyPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpExportPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpExportPolicyProperties model = BinaryData.fromString("{\"exportPolicies\":[\"All\",\"LocalRib\"]}") + .toObject(BmpExportPolicyProperties.class); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpExportPolicyProperties model = new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.ALL, BmpExportPolicy.LOCAL_RIB)); + model = BinaryData.fromObject(model).toObject(BmpExportPolicyProperties.class); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java new file mode 100644 index 000000000000..2e3454f75220 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import org.junit.jupiter.api.Assertions; + +public final class BurstSizeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BurstSize model + = BinaryData.fromString("{\"size\":6495399771734801716,\"unit\":\"KBytes\"}").toObject(BurstSize.class); + Assertions.assertEquals(6495399771734801716L, model.size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, model.unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BurstSize model = new BurstSize().withSize(6495399771734801716L).withUnit(BurstSizeUnit.KBYTES); + model = BinaryData.fromObject(model).toObject(BurstSize.class); + Assertions.assertEquals(6495399771734801716L, model.size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, model.unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java new file mode 100644 index 000000000000..0282255e5067 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails; +import org.junit.jupiter.api.Assertions; + +public final class CommitBatchDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitBatchDetails model + = BinaryData.fromString("{\"failedDevices\":[\"ih\",\"swxmfurqm\",\"mwwpnt\",\"motahbqsvnk\"]}") + .toObject(CommitBatchDetails.class); + Assertions.assertEquals("ih", model.failedDevices().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java new file mode 100644 index 000000000000..b64a0994eed7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import org.junit.jupiter.api.Assertions; + +public final class CommitBatchStatusRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitBatchStatusRequest model + = BinaryData.fromString("{\"commitBatchId\":\"pxpyaf\"}").toObject(CommitBatchStatusRequest.class); + Assertions.assertEquals("pxpyaf", model.commitBatchId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommitBatchStatusRequest model = new CommitBatchStatusRequest().withCommitBatchId("pxpyaf"); + model = BinaryData.fromObject(model).toObject(CommitBatchStatusRequest.class); + Assertions.assertEquals("pxpyaf", model.commitBatchId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusResponsePropertiesTests.java new file mode 100644 index 000000000000..e9344ca99b04 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusResponsePropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class CommitBatchStatusResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitBatchStatusResponseProperties model = BinaryData.fromString( + "{\"commitBatchId\":\"qqxuhvz\",\"commitBatchState\":\"Processing\",\"commitBatchDetails\":{\"failedDevices\":[\"szxacdwukokgoojj\",\"uktubcmunhgbtzv\",\"xvs\",\"cuufkrfn\"]}}") + .toObject(CommitBatchStatusResponseProperties.class); + Assertions.assertEquals("qqxuhvz", model.commitBatchId()); + Assertions.assertEquals(CommitBatchState.PROCESSING, model.commitBatchState()); + Assertions.assertEquals("szxacdwukokgoojj", model.commitBatchDetails().failedDevices().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitConfigurationRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitConfigurationRequestTests.java new file mode 100644 index 000000000000..a7e5f9ab34b2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitConfigurationRequestTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.CommitConfigurationRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitStage; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CommitConfigurationRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitConfigurationRequest model = BinaryData.fromString( + "{\"commitStage\":\"Rollback\",\"commitPolicy\":\"StageCEConfiguration\",\"devices\":[\"lndyclwgycv\",\"qnzjcyqqz\"]}") + .toObject(CommitConfigurationRequest.class); + Assertions.assertEquals(CommitStage.ROLLBACK, model.commitStage()); + Assertions.assertEquals(CommitConfigurationPolicy.STAGE_CECONFIGURATION, model.commitPolicy()); + Assertions.assertEquals("lndyclwgycv", model.devices().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommitConfigurationRequest model = new CommitConfigurationRequest().withCommitStage(CommitStage.ROLLBACK) + .withCommitPolicy(CommitConfigurationPolicy.STAGE_CECONFIGURATION) + .withDevices(Arrays.asList("lndyclwgycv", "qnzjcyqqz")); + model = BinaryData.fromObject(model).toObject(CommitConfigurationRequest.class); + Assertions.assertEquals(CommitStage.ROLLBACK, model.commitStage()); + Assertions.assertEquals(CommitConfigurationPolicy.STAGE_CECONFIGURATION, model.commitPolicy()); + Assertions.assertEquals("lndyclwgycv", model.devices().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..41c636406c30 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CommonDynamicMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommonDynamicMatchConfigurationPatch model = BinaryData.fromString( + "{\"ipGroups\":[{\"name\":\"dlhqvlnnpxyba\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"aarbgjekg\",\"klbyulidwcw\",\"mzegjon\",\"hj\"]},{\"name\":\"wgdnqzbr\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hzmtksjc\",\"tdigsxcdglj\",\"lkeuac\"]}],\"vlanGroups\":[{\"name\":\"flrytswfpfm\",\"vlans\":[\"cxnmskwhqjjyslu\",\"lpshhkvpedwqslsr\"]},{\"name\":\"pq\",\"vlans\":[\"skondcbrwimu\",\"qejo\",\"ovyrrleaesinu\",\"tljqobbpih\"]},{\"name\":\"cecybmrqbrjbbmpx\",\"vlans\":[\"yk\",\"rexcrseqwjksghu\",\"gzhxog\"]}],\"portGroups\":[{\"name\":\"voujkxibdafhrk\",\"ports\":[\"omkxf\",\"vfb\",\"dy\",\"rhpw\"]}]}") + .toObject(CommonDynamicMatchConfigurationPatch.class); + Assertions.assertEquals("dlhqvlnnpxyba", model.ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("aarbgjekg", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("flrytswfpfm", model.vlanGroups().get(0).name()); + Assertions.assertEquals("cxnmskwhqjjyslu", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("voujkxibdafhrk", model.portGroups().get(0).name()); + Assertions.assertEquals("omkxf", model.portGroups().get(0).ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommonDynamicMatchConfigurationPatch model = new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("dlhqvlnnpxyba") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("aarbgjekg", "klbyulidwcw", "mzegjon", "hj")), + new IpGroupPatchProperties().withName("wgdnqzbr") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("hzmtksjc", "tdigsxcdglj", "lkeuac")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("flrytswfpfm") + .withVlans(Arrays.asList("cxnmskwhqjjyslu", "lpshhkvpedwqslsr")), + new VlanGroupPatchProperties().withName("pq") + .withVlans(Arrays.asList("skondcbrwimu", "qejo", "ovyrrleaesinu", "tljqobbpih")), + new VlanGroupPatchProperties().withName("cecybmrqbrjbbmpx") + .withVlans(Arrays.asList("yk", "rexcrseqwjksghu", "gzhxog")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("voujkxibdafhrk") + .withPorts(Arrays.asList("omkxf", "vfb", "dy", "rhpw")))); + model = BinaryData.fromObject(model).toObject(CommonDynamicMatchConfigurationPatch.class); + Assertions.assertEquals("dlhqvlnnpxyba", model.ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("aarbgjekg", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("flrytswfpfm", model.vlanGroups().get(0).name()); + Assertions.assertEquals("cxnmskwhqjjyslu", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("voujkxibdafhrk", model.portGroups().get(0).name()); + Assertions.assertEquals("omkxf", model.portGroups().get(0).ports().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java index 1f2e65cea650..fa8e810df817 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -17,44 +17,41 @@ public final class CommonDynamicMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommonDynamicMatchConfiguration model = BinaryData.fromString( - "{\"ipGroups\":[{\"name\":\"qxepnylbfuaj\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"vofqzhvfc\",\"byfmowuxr\",\"jpvd\",\"xfzwi\"]},{\"name\":\"wzjbh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rkambt\",\"negvmnvuqe\",\"vldspa\",\"tjb\"]}],\"vlanGroups\":[{\"name\":\"flvestmjlxrrilo\",\"vlans\":[\"eewchpxlktw\",\"uziycsl\",\"vu\"]},{\"name\":\"ztcktyh\",\"vlans\":[\"edcg\",\"ulwm\",\"rqzz\"]}],\"portGroups\":[{\"name\":\"pglydz\",\"ports\":[\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\",\"aawzqadfl\"]},{\"name\":\"ur\",\"ports\":[\"aecxndtic\",\"kpvzmlq\",\"mldgxobfirc\"]},{\"name\":\"pkc\",\"ports\":[\"zriykhy\",\"wf\"]}]}") + "{\"ipGroups\":[{\"name\":\"uruocbgo\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"oybfhjxakvvj\",\"slordilmyww\",\"kgkxn\",\"edabgyvudtjue\"]}],\"vlanGroups\":[{\"name\":\"hxuuwhcjyxccybvp\",\"vlans\":[\"kkudzp\",\"gwjplmag\"]},{\"name\":\"cyohpfkyrkdbd\",\"vlans\":[\"gsj\",\"mnwqj\",\"obaiyhddviaceg\"]},{\"name\":\"m\",\"vlans\":[\"pmvmemfnczdwvv\",\"alxlllchp\",\"db\"]}],\"portGroups\":[{\"name\":\"rdnhfuku\",\"ports\":[\"cswsmystul\",\"qypfcv\"]},{\"name\":\"rchpqbmfpjbabwid\",\"ports\":[\"sspuunnoxyhkx\",\"qddrihpfhoqcaae\",\"dao\",\"djvlpj\"]},{\"name\":\"kzbrmsgeivsiy\",\"ports\":[\"dncj\",\"xonbzoggculapz\"]},{\"name\":\"rpgogtqxep\",\"ports\":[\"b\"]}]}") .toObject(CommonDynamicMatchConfiguration.class); - Assertions.assertEquals("qxepnylbfuaj", model.ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("vofqzhvfc", model.ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("flvestmjlxrrilo", model.vlanGroups().get(0).name()); - Assertions.assertEquals("eewchpxlktw", model.vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("pglydz", model.portGroups().get(0).name()); - Assertions.assertEquals("vqeevtoep", model.portGroups().get(0).ports().get(0)); + Assertions.assertEquals("uruocbgo", model.ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("oybfhjxakvvj", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("hxuuwhcjyxccybvp", model.vlanGroups().get(0).name()); + Assertions.assertEquals("kkudzp", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("rdnhfuku", model.portGroups().get(0).name()); + Assertions.assertEquals("cswsmystul", model.portGroups().get(0).ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CommonDynamicMatchConfiguration model = new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("qxepnylbfuaj") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("vofqzhvfc", "byfmowuxr", "jpvd", "xfzwi")), - new IpGroupProperties().withName("wzjbh") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rkambt", "negvmnvuqe", "vldspa", "tjb")))) + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("uruocbgo") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("oybfhjxakvvj", "slordilmyww", "kgkxn", "edabgyvudtjue")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("flvestmjlxrrilo") - .withVlans(Arrays.asList("eewchpxlktw", "uziycsl", "vu")), - new VlanGroupProperties().withName("ztcktyh").withVlans(Arrays.asList("edcg", "ulwm", "rqzz")))) + new VlanGroupProperties().withName("hxuuwhcjyxccybvp").withVlans(Arrays.asList("kkudzp", "gwjplmag")), + new VlanGroupProperties().withName("cyohpfkyrkdbd") + .withVlans(Arrays.asList("gsj", "mnwqj", "obaiyhddviaceg")), + new VlanGroupProperties().withName("m").withVlans(Arrays.asList("pmvmemfnczdwvv", "alxlllchp", "db")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("pglydz") - .withPorts(Arrays.asList("vqeevtoep", "yutnwytpzdmov", "vf", "aawzqadfl")), - new PortGroupProperties().withName("ur") - .withPorts(Arrays.asList("aecxndtic", "kpvzmlq", "mldgxobfirc")), - new PortGroupProperties().withName("pkc").withPorts(Arrays.asList("zriykhy", "wf")))); + new PortGroupProperties().withName("rdnhfuku").withPorts(Arrays.asList("cswsmystul", "qypfcv")), + new PortGroupProperties().withName("rchpqbmfpjbabwid") + .withPorts(Arrays.asList("sspuunnoxyhkx", "qddrihpfhoqcaae", "dao", "djvlpj")), + new PortGroupProperties().withName("kzbrmsgeivsiy").withPorts(Arrays.asList("dncj", "xonbzoggculapz")), + new PortGroupProperties().withName("rpgogtqxep").withPorts(Arrays.asList("b")))); model = BinaryData.fromObject(model).toObject(CommonDynamicMatchConfiguration.class); - Assertions.assertEquals("qxepnylbfuaj", model.ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("vofqzhvfc", model.ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("flvestmjlxrrilo", model.vlanGroups().get(0).name()); - Assertions.assertEquals("eewchpxlktw", model.vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("pglydz", model.portGroups().get(0).name()); - Assertions.assertEquals("vqeevtoep", model.portGroups().get(0).ports().get(0)); + Assertions.assertEquals("uruocbgo", model.ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("oybfhjxakvvj", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("hxuuwhcjyxccybvp", model.vlanGroups().get(0).name()); + Assertions.assertEquals("kkudzp", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("rdnhfuku", model.portGroups().get(0).name()); + Assertions.assertEquals("cswsmystul", model.portGroups().get(0).ports().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsPatchTests.java new file mode 100644 index 000000000000..07761617cf6f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsPatchTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommonMatchConditionsPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CommonMatchConditionsPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommonMatchConditionsPatch model = BinaryData.fromString( + "{\"protocolTypes\":[\"yych\",\"nsjlpjrtws\",\"hv\"],\"vlanMatchCondition\":{\"vlans\":[\"phvtrrmhwrb\"],\"innerVlans\":[\"yflubhvjglroc\"],\"vlanGroupNames\":[\"lw\",\"hmem\",\"ooclutnp\",\"memczjkmmyk\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"srrryejylmbkzu\",\"nigrfihotjewl\",\"xuzzjgnrefq\",\"hqo\"],\"ipGroupNames\":[\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"]}}") + .toObject(CommonMatchConditionsPatch.class); + Assertions.assertEquals("yych", model.protocolTypes().get(0)); + Assertions.assertEquals("phvtrrmhwrb", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("yflubhvjglroc", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("lw", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("srrryejylmbkzu", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hiqakydiwfbrk", model.ipCondition().ipGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommonMatchConditionsPatch model + = new CommonMatchConditionsPatch().withProtocolTypes(Arrays.asList("yych", "nsjlpjrtws", "hv")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("phvtrrmhwrb")) + .withInnerVlans(Arrays.asList("yflubhvjglroc")) + .withVlanGroupNames(Arrays.asList("lw", "hmem", "ooclutnp", "memczjkmmyk"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("srrryejylmbkzu", "nigrfihotjewl", "xuzzjgnrefq", "hqo")) + .withIpGroupNames(Arrays.asList("hiqakydiwfbrk", "pzdqtvhcspod", "qaxsipietgbebjf"))); + model = BinaryData.fromObject(model).toObject(CommonMatchConditionsPatch.class); + Assertions.assertEquals("yych", model.protocolTypes().get(0)); + Assertions.assertEquals("phvtrrmhwrb", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("yflubhvjglroc", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("lw", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("srrryejylmbkzu", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hiqakydiwfbrk", model.ipCondition().ipGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java index a88ff9ab9c63..9d9a1c73968e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -17,37 +17,38 @@ public final class CommonMatchConditionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommonMatchConditions model = BinaryData.fromString( - "{\"protocolTypes\":[\"govibrxkpmloazu\",\"u\"],\"vlanMatchCondition\":{\"vlans\":[\"oorb\",\"eoybfhjxakvvjgs\"],\"innerVlans\":[\"dilmyww\"],\"vlanGroupNames\":[\"kxn\",\"edabgyvudtjue\",\"bcihxuuwhc\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"payakkud\",\"px\",\"wjplma\"],\"ipGroupNames\":[\"cyohpfkyrkdbd\",\"iogsjkmnwq\",\"nobaiyhddviacegf\"]}}") + "{\"protocolTypes\":[\"rds\",\"tujbazpju\",\"hminyflnorwmduv\",\"pklvxw\"],\"vlanMatchCondition\":{\"vlans\":[\"xpgpq\",\"hiszepnnbjcrxgib\",\"daxconfozauorsuk\",\"kwbqplhlvnuu\"],\"innerVlans\":[\"lrphwzsoldw\",\"yuqdu\"],\"vlanGroupNames\":[\"nnrwrbiork\",\"alywjhhgdn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"miloxggdufiqndie\"],\"ipGroupNames\":[\"ofjchvcyyysf\"]}}") .toObject(CommonMatchConditions.class); - Assertions.assertEquals("govibrxkpmloazu", model.protocolTypes().get(0)); - Assertions.assertEquals("oorb", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("dilmyww", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("kxn", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("rds", model.protocolTypes().get(0)); + Assertions.assertEquals("xpgpq", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("lrphwzsoldw", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("nnrwrbiork", model.vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("payakkud", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("cyohpfkyrkdbd", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("miloxggdufiqndie", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("ofjchvcyyysf", model.ipCondition().ipGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CommonMatchConditions model - = new CommonMatchConditions().withProtocolTypes(Arrays.asList("govibrxkpmloazu", "u")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("oorb", "eoybfhjxakvvjgs")) - .withInnerVlans(Arrays.asList("dilmyww")) - .withVlanGroupNames(Arrays.asList("kxn", "edabgyvudtjue", "bcihxuuwhc"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("payakkud", "px", "wjplma")) - .withIpGroupNames(Arrays.asList("cyohpfkyrkdbd", "iogsjkmnwq", "nobaiyhddviacegf"))); + CommonMatchConditions model = new CommonMatchConditions() + .withProtocolTypes(Arrays.asList("rds", "tujbazpju", "hminyflnorwmduv", "pklvxw")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("xpgpq", "hiszepnnbjcrxgib", "daxconfozauorsuk", "kwbqplhlvnuu")) + .withInnerVlans(Arrays.asList("lrphwzsoldw", "yuqdu")) + .withVlanGroupNames(Arrays.asList("nnrwrbiork", "alywjhhgdn"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("miloxggdufiqndie")) + .withIpGroupNames(Arrays.asList("ofjchvcyyysf"))); model = BinaryData.fromObject(model).toObject(CommonMatchConditions.class); - Assertions.assertEquals("govibrxkpmloazu", model.protocolTypes().get(0)); - Assertions.assertEquals("oorb", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("dilmyww", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("kxn", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("rds", model.protocolTypes().get(0)); + Assertions.assertEquals("xpgpq", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("lrphwzsoldw", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("nnrwrbiork", model.vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("payakkud", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("cyohpfkyrkdbd", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("miloxggdufiqndie", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("ofjchvcyyysf", model.ipCondition().ipGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java new file mode 100644 index 000000000000..ce0b12124eea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import org.junit.jupiter.api.Assertions; + +public final class CommonPostActionResponseForDeviceROCommandsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommonPostActionResponseForDeviceROCommands model = BinaryData.fromString( + "{\"configurationState\":\"DeferredControl\",\"outputUrl\":\"l\",\"deviceConfigurationPreview\":\"pkvegeatt\"}") + .toObject(CommonPostActionResponseForDeviceROCommands.class); + Assertions.assertEquals("l", model.outputUrl()); + Assertions.assertEquals("pkvegeatt", model.deviceConfigurationPreview()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java new file mode 100644 index 000000000000..fbe0b6670e35 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ConditionalDefaultRoutePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConditionalDefaultRouteProperties model = BinaryData.fromString( + "{\"ipv4Routes\":[{\"prefix\":\"dgsapleqfg\",\"nextHop\":[\"env\",\"z\"]},{\"prefix\":\"lvyakeszsuuvul\",\"nextHop\":[\"cwgg\",\"hxvlqgfbrve\",\"icaovphirlzbipi\"]},{\"prefix\":\"nnepkwzzzku\",\"nextHop\":[\"uwcjomip\"]},{\"prefix\":\"wkau\",\"nextHop\":[\"twykoxvbw\",\"fxxdplrelfkvg\"]}],\"ipv6Routes\":[{\"prefix\":\"btuxlbpxrhrfje\",\"nextHop\":[\"azwef\",\"ktlhqash\",\"ostjixyz\",\"ecigzzdwjta\"]},{\"prefix\":\"fvvtdpcbpz\",\"nextHop\":[\"mcsaugbr\",\"fiwltkfysu\",\"te\",\"hkl\"]},{\"prefix\":\"whcv\",\"nextHop\":[\"yyhgqokjbmsr\",\"ixyxxhwrlqomaqs\",\"ilp\",\"z\"]},{\"prefix\":\"rwnrzo\",\"nextHop\":[\"xagysokli\",\"ksybvrrbnhylsb\",\"ujcy\"]}]}") + .toObject(ConditionalDefaultRouteProperties.class); + Assertions.assertEquals("dgsapleqfg", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("env", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("btuxlbpxrhrfje", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("azwef", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConditionalDefaultRouteProperties model = new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("dgsapleqfg").withNextHop(Arrays.asList("env", "z")), + new StaticRouteProperties().withPrefix("lvyakeszsuuvul") + .withNextHop(Arrays.asList("cwgg", "hxvlqgfbrve", "icaovphirlzbipi")), + new StaticRouteProperties().withPrefix("nnepkwzzzku").withNextHop(Arrays.asList("uwcjomip")), + new StaticRouteProperties().withPrefix("wkau") + .withNextHop(Arrays.asList("twykoxvbw", "fxxdplrelfkvg")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("btuxlbpxrhrfje") + .withNextHop(Arrays.asList("azwef", "ktlhqash", "ostjixyz", "ecigzzdwjta")), + new StaticRouteProperties().withPrefix("fvvtdpcbpz") + .withNextHop(Arrays.asList("mcsaugbr", "fiwltkfysu", "te", "hkl")), + new StaticRouteProperties().withPrefix("whcv") + .withNextHop(Arrays.asList("yyhgqokjbmsr", "ixyxxhwrlqomaqs", "ilp", "z")), + new StaticRouteProperties().withPrefix("rwnrzo") + .withNextHop(Arrays.asList("xagysokli", "ksybvrrbnhylsb", "ujcy")))); + model = BinaryData.fromObject(model).toObject(ConditionalDefaultRouteProperties.class); + Assertions.assertEquals("dgsapleqfg", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("env", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("btuxlbpxrhrfje", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("azwef", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java new file mode 100644 index 000000000000..c53033094dd1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; +import org.junit.jupiter.api.Assertions; + +public final class ConnectedSubnetPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectedSubnetPatch model = BinaryData.fromString("{\"prefix\":\"gnnbzrtf\",\"annotation\":\"dzuubjtvgjsxm\"}") + .toObject(ConnectedSubnetPatch.class); + Assertions.assertEquals("dzuubjtvgjsxm", model.annotation()); + Assertions.assertEquals("gnnbzrtf", model.prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConnectedSubnetPatch model = new ConnectedSubnetPatch().withAnnotation("dzuubjtvgjsxm").withPrefix("gnnbzrtf"); + model = BinaryData.fromObject(model).toObject(ConnectedSubnetPatch.class); + Assertions.assertEquals("dzuubjtvgjsxm", model.annotation()); + Assertions.assertEquals("gnnbzrtf", model.prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java new file mode 100644 index 000000000000..eebe4f520e44 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ConnectedSubnetRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectedSubnetRoutePolicyPatch model = BinaryData.fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ywv\",\"exportIpv6RoutePolicyId\":\"igvjrktp\"}}") + .toObject(ConnectedSubnetRoutePolicyPatch.class); + Assertions.assertEquals("ywv", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("igvjrktp", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConnectedSubnetRoutePolicyPatch model = new ConnectedSubnetRoutePolicyPatch().withExportRoutePolicy( + new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("ywv").withExportIpv6RoutePolicyId("igvjrktp")); + model = BinaryData.fromObject(model).toObject(ConnectedSubnetRoutePolicyPatch.class); + Assertions.assertEquals("ywv", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("igvjrktp", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java index cc68d1a8ecc7..709c2833d0d3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,21 +13,19 @@ public final class ConnectedSubnetRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedSubnetRoutePolicy model = BinaryData.fromString( - "{\"exportRoutePolicyId\":\"fdsajred\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yshtuwgmev\",\"exportIpv6RoutePolicyId\":\"fpwzyifrkgwltx\"}}") + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qnsqktcmb\",\"exportIpv6RoutePolicyId\":\"zzoslpkyb\"}}") .toObject(ConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("fdsajred", model.exportRoutePolicyId()); - Assertions.assertEquals("yshtuwgmev", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fpwzyifrkgwltx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("qnsqktcmb", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("zzoslpkyb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedSubnetRoutePolicy model = new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("fdsajred") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("yshtuwgmev") - .withExportIpv6RoutePolicyId("fpwzyifrkgwltx")); + ConnectedSubnetRoutePolicy model = new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("qnsqktcmb") + .withExportIpv6RoutePolicyId("zzoslpkyb")); model = BinaryData.fromObject(model).toObject(ConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("fdsajred", model.exportRoutePolicyId()); - Assertions.assertEquals("yshtuwgmev", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fpwzyifrkgwltx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("qnsqktcmb", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("zzoslpkyb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java index 158003543930..eda18d3b5abd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,17 +11,17 @@ public final class ConnectedSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConnectedSubnet model = BinaryData.fromString("{\"prefix\":\"fsuqtaazyqbxy\",\"annotation\":\"yfp\"}") + ConnectedSubnet model = BinaryData.fromString("{\"prefix\":\"du\",\"annotation\":\"ixexkydfbwljavhu\"}") .toObject(ConnectedSubnet.class); - Assertions.assertEquals("yfp", model.annotation()); - Assertions.assertEquals("fsuqtaazyqbxy", model.prefix()); + Assertions.assertEquals("ixexkydfbwljavhu", model.annotation()); + Assertions.assertEquals("du", model.prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedSubnet model = new ConnectedSubnet().withAnnotation("yfp").withPrefix("fsuqtaazyqbxy"); + ConnectedSubnet model = new ConnectedSubnet().withAnnotation("ixexkydfbwljavhu").withPrefix("du"); model = BinaryData.fromObject(model).toObject(ConnectedSubnet.class); - Assertions.assertEquals("yfp", model.annotation()); - Assertions.assertEquals("fsuqtaazyqbxy", model.prefix()); + Assertions.assertEquals("ixexkydfbwljavhu", model.annotation()); + Assertions.assertEquals("du", model.prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlanAclIpMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlanAclIpMatchConditionTests.java new file mode 100644 index 000000000000..bf26989a7c4d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlanAclIpMatchConditionTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlanAclIpMatchConditionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlanAclIpMatchCondition model + = BinaryData.fromString("{\"sourceIpPrefix\":\"sethwwn\",\"destinationIpPrefix\":\"hlf\"}") + .toObject(ControlPlanAclIpMatchCondition.class); + Assertions.assertEquals("sethwwn", model.sourceIpPrefix()); + Assertions.assertEquals("hlf", model.destinationIpPrefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlanAclIpMatchCondition model + = new ControlPlanAclIpMatchCondition().withSourceIpPrefix("sethwwn").withDestinationIpPrefix("hlf"); + model = BinaryData.fromObject(model).toObject(ControlPlanAclIpMatchCondition.class); + Assertions.assertEquals("sethwwn", model.sourceIpPrefix()); + Assertions.assertEquals("hlf", model.destinationIpPrefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionPatchTests.java new file mode 100644 index 000000000000..8a191405ffe1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclActionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclActionPatch model = BinaryData.fromString("{\"type\":\"Remark\",\"remarkComment\":\"jeaq\"}") + .toObject(ControlPlaneAclActionPatch.class); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.type()); + Assertions.assertEquals("jeaq", model.remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclActionPatch model + = new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.REMARK).withRemarkComment("jeaq"); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclActionPatch.class); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.type()); + Assertions.assertEquals("jeaq", model.remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionTests.java new file mode 100644 index 000000000000..8fb0ba2997cc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclActionTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclActionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclAction model = BinaryData.fromString("{\"type\":\"Deny\",\"remarkComment\":\"uhdqazk\"}") + .toObject(ControlPlaneAclAction.class); + Assertions.assertEquals(ControlPlaneAclActionType.DENY, model.type()); + Assertions.assertEquals("uhdqazk", model.remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclAction model + = new ControlPlaneAclAction().withType(ControlPlaneAclActionType.DENY).withRemarkComment("uhdqazk"); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclAction.class); + Assertions.assertEquals(ControlPlaneAclActionType.DENY, model.type()); + Assertions.assertEquals("uhdqazk", model.remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclIpMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclIpMatchConditionPatchTests.java new file mode 100644 index 000000000000..b68493f0bc14 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclIpMatchConditionPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclIpMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclIpMatchConditionPatch model + = BinaryData.fromString("{\"sourceIpPrefix\":\"sxlghieegjlg\",\"destinationIpPrefix\":\"paseksgb\"}") + .toObject(ControlPlaneAclIpMatchConditionPatch.class); + Assertions.assertEquals("sxlghieegjlg", model.sourceIpPrefix()); + Assertions.assertEquals("paseksgb", model.destinationIpPrefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclIpMatchConditionPatch model + = new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("sxlghieegjlg") + .withDestinationIpPrefix("paseksgb"); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclIpMatchConditionPatch.class); + Assertions.assertEquals("sxlghieegjlg", model.sourceIpPrefix()); + Assertions.assertEquals("paseksgb", model.destinationIpPrefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionPatchTests.java new file mode 100644 index 000000000000..dcec9f359408 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionPatchTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclMatchConditionPatch model = BinaryData.fromString( + "{\"protocolTypes\":\"cxzrzdcgdzben\",\"ipCondition\":{\"sourceIpPrefix\":\"cawetzqddt\",\"destinationIpPrefix\":\"fljhznamtua\"},\"ttlMatchCondition\":{\"ttlValue\":\"wcjjncqt\",\"ttlMatchType\":\"lt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"bgatzu\",\"vbxngr\",\"bwggahtt\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"jqfutlxj\",\"qzasunwqrjzfrgqh\"],\"portMatchType\":\"lt\"}},\"flags\":[\"buocnjr\",\"hmbpyryxamebly\",\"yvk\",\"kmrocxne\"],\"icmpConfiguration\":{\"icmpTypes\":[\"tod\",\"fpyapucygvoavyu\"]}}") + .toObject(ControlPlaneAclMatchConditionPatch.class); + Assertions.assertEquals("cxzrzdcgdzben", model.protocolTypes()); + Assertions.assertEquals("cawetzqddt", model.ipCondition().sourceIpPrefix()); + Assertions.assertEquals("fljhznamtua", model.ipCondition().destinationIpPrefix()); + Assertions.assertEquals("wcjjncqt", model.ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.LESSER_THAN, model.ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("bgatzu", model.portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("jqfutlxj", model.portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.LESSER_THAN, + model.portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("buocnjr", model.flags().get(0)); + Assertions.assertEquals("tod", model.icmpConfiguration().icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclMatchConditionPatch model + = new ControlPlaneAclMatchConditionPatch().withProtocolTypes("cxzrzdcgdzben") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("cawetzqddt") + .withDestinationIpPrefix("fljhznamtua")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("wcjjncqt") + .withTtlMatchType(ControlPlaneAclTtlMatchType.LESSER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("bgatzu", "vbxngr", "bwggahtt")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("jqfutlxj", "qzasunwqrjzfrgqh")) + .withPortMatchType(ControlPlaneAclPortMatchType.LESSER_THAN))) + .withFlags(Arrays.asList("buocnjr", "hmbpyryxamebly", "yvk", "kmrocxne")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("tod", "fpyapucygvoavyu"))); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclMatchConditionPatch.class); + Assertions.assertEquals("cxzrzdcgdzben", model.protocolTypes()); + Assertions.assertEquals("cawetzqddt", model.ipCondition().sourceIpPrefix()); + Assertions.assertEquals("fljhznamtua", model.ipCondition().destinationIpPrefix()); + Assertions.assertEquals("wcjjncqt", model.ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.LESSER_THAN, model.ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("bgatzu", model.portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("jqfutlxj", model.portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.LESSER_THAN, + model.portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("buocnjr", model.flags().get(0)); + Assertions.assertEquals("tod", model.icmpConfiguration().icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionTests.java new file mode 100644 index 000000000000..e06dd4e6930f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConditionTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclMatchConditionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclMatchCondition model = BinaryData.fromString( + "{\"protocolTypes\":\"e\",\"ipCondition\":{\"sourceIpPrefix\":\"xslhvnhlabrqnkk\",\"destinationIpPrefix\":\"cjbtrgaehvvib\"},\"ttlMatchCondition\":{\"ttlValue\":\"jsto\",\"ttlMatchType\":\"gt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"xztmo\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"idgfc\",\"qmpimaqxzhem\"],\"portMatchType\":\"range\"}},\"flags\":[\"uj\",\"wtwko\",\"zwculkbawpfajnj\",\"ltlwtjjguktalhs\"],\"icmpConfiguration\":{\"icmpTypes\":[\"dmxzr\",\"oaimlnw\",\"aaomylweazu\"]}}") + .toObject(ControlPlaneAclMatchCondition.class); + Assertions.assertEquals("e", model.protocolTypes()); + Assertions.assertEquals("xslhvnhlabrqnkk", model.ipCondition().sourceIpPrefix()); + Assertions.assertEquals("cjbtrgaehvvib", model.ipCondition().destinationIpPrefix()); + Assertions.assertEquals("jsto", model.ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, model.ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("xztmo", model.portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("idgfc", model.portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("uj", model.flags().get(0)); + Assertions.assertEquals("dmxzr", model.icmpConfiguration().icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclMatchCondition model = new ControlPlaneAclMatchCondition().withProtocolTypes("e") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("xslhvnhlabrqnkk") + .withDestinationIpPrefix("cjbtrgaehvvib")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("jsto") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("xztmo")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("idgfc", "qmpimaqxzhem")) + .withPortMatchType(ControlPlaneAclPortMatchType.RANGE))) + .withFlags(Arrays.asList("uj", "wtwko", "zwculkbawpfajnj", "ltlwtjjguktalhs")) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("dmxzr", "oaimlnw", "aaomylweazu"))); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclMatchCondition.class); + Assertions.assertEquals("e", model.protocolTypes()); + Assertions.assertEquals("xslhvnhlabrqnkk", model.ipCondition().sourceIpPrefix()); + Assertions.assertEquals("cjbtrgaehvvib", model.ipCondition().destinationIpPrefix()); + Assertions.assertEquals("jsto", model.ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, model.ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("xztmo", model.portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("idgfc", model.portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("uj", model.flags().get(0)); + Assertions.assertEquals("dmxzr", model.icmpConfiguration().icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..630799f7887c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPatchPropertiesTests.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclMatchConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclMatchConfigurationPatchProperties model = BinaryData.fromString( + "{\"matchConfigurationName\":\"jqoyueayfbpcm\",\"sequenceNumber\":6584354234807878211,\"matchCondition\":{\"protocolTypes\":\"rueqthwm\",\"ipCondition\":{\"sourceIpPrefix\":\"b\",\"destinationIpPrefix\":\"bbxi\"},\"ttlMatchCondition\":{\"ttlValue\":\"xiidloped\",\"ttlMatchType\":\"gt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"ybxubmdna\",\"cbq\",\"remj\",\"laqacigele\"],\"portMatchType\":\"range\"},\"destinationPorts\":{\"ports\":[\"vwzkj\",\"pwbeonr\",\"kwzdqybxcea\",\"xcptsoqfyiaseqc\"],\"portMatchType\":\"lt\"}},\"flags\":[\"zrazisgyk\",\"uem\",\"anbwzohmnrxxbso\"],\"icmpConfiguration\":{\"icmpTypes\":[\"nhmdptysprqs\",\"nzxojpslsvjgpli\",\"fiqwoy\"]}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"cohhoucqpqo\"}}") + .toObject(ControlPlaneAclMatchConfigurationPatchProperties.class); + Assertions.assertEquals("jqoyueayfbpcm", model.matchConfigurationName()); + Assertions.assertEquals(6584354234807878211L, model.sequenceNumber()); + Assertions.assertEquals("rueqthwm", model.matchCondition().protocolTypes()); + Assertions.assertEquals("b", model.matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("bbxi", model.matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("xiidloped", model.matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, + model.matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("ybxubmdna", model.matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("vwzkj", model.matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.LESSER_THAN, + model.matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("zrazisgyk", model.matchCondition().flags().get(0)); + Assertions.assertEquals("nhmdptysprqs", model.matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.action().type()); + Assertions.assertEquals("cohhoucqpqo", model.action().remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclMatchConfigurationPatchProperties model = new ControlPlaneAclMatchConfigurationPatchProperties() + .withMatchConfigurationName("jqoyueayfbpcm") + .withSequenceNumber(6584354234807878211L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("rueqthwm") + .withIpCondition( + new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("b").withDestinationIpPrefix("bbxi")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("xiidloped") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("ybxubmdna", "cbq", "remj", "laqacigele")) + .withPortMatchType(ControlPlaneAclPortMatchType.RANGE)) + .withDestinationPorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("vwzkj", "pwbeonr", "kwzdqybxcea", "xcptsoqfyiaseqc")) + .withPortMatchType(ControlPlaneAclPortMatchType.LESSER_THAN))) + .withFlags(Arrays.asList("zrazisgyk", "uem", "anbwzohmnrxxbso")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("nhmdptysprqs", "nzxojpslsvjgpli", "fiqwoy")))) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.REMARK) + .withRemarkComment("cohhoucqpqo")); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclMatchConfigurationPatchProperties.class); + Assertions.assertEquals("jqoyueayfbpcm", model.matchConfigurationName()); + Assertions.assertEquals(6584354234807878211L, model.sequenceNumber()); + Assertions.assertEquals("rueqthwm", model.matchCondition().protocolTypes()); + Assertions.assertEquals("b", model.matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("bbxi", model.matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("xiidloped", model.matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, + model.matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("ybxubmdna", model.matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("vwzkj", model.matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.LESSER_THAN, + model.matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("zrazisgyk", model.matchCondition().flags().get(0)); + Assertions.assertEquals("nhmdptysprqs", model.matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.action().type()); + Assertions.assertEquals("cohhoucqpqo", model.action().remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPropertiesTests.java new file mode 100644 index 000000000000..1a3994a00021 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclMatchConfigurationPropertiesTests.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclMatchConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclMatchConfigurationProperties model = BinaryData.fromString( + "{\"matchConfigurationName\":\"ypefojyqdhcupl\",\"sequenceNumber\":4155214005504319467,\"matchCondition\":{\"protocolTypes\":\"hihihlhzdsqtzbsr\",\"ipCondition\":{\"sourceIpPrefix\":\"wcjhfgmv\",\"destinationIpPrefix\":\"actxmwoteyowc\"},\"ttlMatchCondition\":{\"ttlValue\":\"ovekqvgqouwi\",\"ttlMatchType\":\"eq\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"ivqikfxcvhr\",\"sphuagrttikteus\",\"c\",\"kvyklxubyjaffmm\"],\"portMatchType\":\"eq\"},\"destinationPorts\":{\"ports\":[\"u\",\"bgq\"],\"portMatchType\":\"gt\"}},\"flags\":[\"lmetttwgdslqxi\"],\"icmpConfiguration\":{\"icmpTypes\":[\"ooizqseyp\"]}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"xapzhyrpet\"}}") + .toObject(ControlPlaneAclMatchConfigurationProperties.class); + Assertions.assertEquals("ypefojyqdhcupl", model.matchConfigurationName()); + Assertions.assertEquals(4155214005504319467L, model.sequenceNumber()); + Assertions.assertEquals("hihihlhzdsqtzbsr", model.matchCondition().protocolTypes()); + Assertions.assertEquals("wcjhfgmv", model.matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("actxmwoteyowc", model.matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("ovekqvgqouwi", model.matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.EQUALS, + model.matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("ivqikfxcvhr", model.matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.EQUALS, + model.matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("u", model.matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("lmetttwgdslqxi", model.matchCondition().flags().get(0)); + Assertions.assertEquals("ooizqseyp", model.matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.action().type()); + Assertions.assertEquals("xapzhyrpet", model.action().remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclMatchConfigurationProperties model + = new ControlPlaneAclMatchConfigurationProperties().withMatchConfigurationName("ypefojyqdhcupl") + .withSequenceNumber(4155214005504319467L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("hihihlhzdsqtzbsr") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("wcjhfgmv") + .withDestinationIpPrefix("actxmwoteyowc")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("ovekqvgqouwi") + .withTtlMatchType(ControlPlaneAclTtlMatchType.EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("ivqikfxcvhr", "sphuagrttikteus", "c", "kvyklxubyjaffmm")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("u", "bgq")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN))) + .withFlags(Arrays.asList("lmetttwgdslqxi")) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("ooizqseyp")))) + .withAction(new ControlPlaneAclAction().withType(ControlPlaneAclActionType.REMARK) + .withRemarkComment("xapzhyrpet")); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclMatchConfigurationProperties.class); + Assertions.assertEquals("ypefojyqdhcupl", model.matchConfigurationName()); + Assertions.assertEquals(4155214005504319467L, model.sequenceNumber()); + Assertions.assertEquals("hihihlhzdsqtzbsr", model.matchCondition().protocolTypes()); + Assertions.assertEquals("wcjhfgmv", model.matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("actxmwoteyowc", model.matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("ovekqvgqouwi", model.matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.EQUALS, + model.matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("ivqikfxcvhr", model.matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.EQUALS, + model.matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("u", model.matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("lmetttwgdslqxi", model.matchCondition().flags().get(0)); + Assertions.assertEquals("ooizqseyp", model.matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.action().type()); + Assertions.assertEquals("xapzhyrpet", model.action().remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPatchPropertiesTests.java new file mode 100644 index 000000000000..e9968f14c99d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPatchPropertiesTests.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclPatchProperties model = BinaryData.fromString( + "{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"yank\",\"sequenceNumber\":1514792929801434705,\"matchCondition\":{\"protocolTypes\":\"ankltytm\",\"ipCondition\":{\"sourceIpPrefix\":\"oznnhdrlktgj\",\"destinationIpPrefix\":\"gguxhemlwyw\"},\"ttlMatchCondition\":{\"ttlValue\":\"czg\",\"ttlMatchType\":\"neq\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"lssxblycsxzujk\",\"rlsmdesqplpvmjc\",\"oewbid\"],\"portMatchType\":\"range\"},\"destinationPorts\":{\"ports\":[\"xvgpiude\",\"gfsxzec\",\"axwk\",\"fykhvuhxepmru\"],\"portMatchType\":\"gt\"}},\"flags\":[\"aobn\",\"lujdjltymkmv\"],\"icmpConfiguration\":{\"icmpTypes\":[\"ywart\",\"pphkixkykxds\",\"j\"]}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"cfxhikkflrmy\"}},{\"matchConfigurationName\":\"incqlhriswsl\",\"sequenceNumber\":2239452406142710193,\"matchCondition\":{\"protocolTypes\":\"gqcg\",\"ipCondition\":{\"sourceIpPrefix\":\"gqkctotiowlxte\",\"destinationIpPrefix\":\"ptjgwdt\"},\"ttlMatchCondition\":{\"ttlValue\":\"ranblwphqlkccu\",\"ttlMatchType\":\"gt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"hoi\",\"lwgniiprglvawu\",\"z\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"vlsbbjpmcubkmifo\",\"xkubvphavpmhbrbq\",\"vgovpbbttefjokn\"],\"portMatchType\":\"neq\"}},\"flags\":[\"qedikdfrd\",\"iqmrjgeihfqlggw\",\"iwzcxmjpbyeph\"],\"icmpConfiguration\":{\"icmpTypes\":[\"ljvrcmyfqipgxhnp\",\"myqwcab\"]}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"eeyaswl\"}},{\"matchConfigurationName\":\"ugmrmf\",\"sequenceNumber\":4657061822693147291,\"matchCondition\":{\"protocolTypes\":\"oauk\",\"ipCondition\":{\"sourceIpPrefix\":\"vcisiz\",\"destinationIpPrefix\":\"a\"},\"ttlMatchCondition\":{\"ttlValue\":\"xjw\",\"ttlMatchType\":\"gt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"gyeewxeiq\",\"psmgo\"],\"portMatchType\":\"neq\"},\"destinationPorts\":{\"ports\":[\"jdlrgmsplzgaufc\",\"hhvnewgnxkymp\",\"anxrj\"],\"portMatchType\":\"lt\"}},\"flags\":[\"bta\",\"ypnyghshxc\"],\"icmpConfiguration\":{\"icmpTypes\":[\"gmnsghpxy\",\"phdrw\",\"jkhvyomacluzvxnq\"]}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"pd\"}},{\"matchConfigurationName\":\"mkoisqcssf\",\"sequenceNumber\":5162262866060166844,\"matchCondition\":{\"protocolTypes\":\"csypobkdqzrdzsyl\",\"ipCondition\":{\"sourceIpPrefix\":\"gtrczzydmxzjijpv\",\"destinationIpPrefix\":\"urkihci\"},\"ttlMatchCondition\":{\"ttlValue\":\"efxrdcoxnbk\",\"ttlMatchType\":\"neq\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"nqbnqb\",\"izxqltgrd\"],\"portMatchType\":\"lt\"},\"destinationPorts\":{\"ports\":[\"x\",\"bfihw\",\"hvcta\"],\"portMatchType\":\"lt\"}},\"flags\":[\"rblmli\",\"wxihs\",\"nxw\",\"agnepzwaklsb\"],\"icmpConfiguration\":{\"icmpTypes\":[\"qagwwrxaomz\",\"sgl\"]}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"zkhhltnjadhqo\"}}]}") + .toObject(ControlPlaneAclPatchProperties.class); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("yank", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(1514792929801434705L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("ankltytm", model.matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("oznnhdrlktgj", + model.matchConfigurations().get(0).matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("gguxhemlwyw", + model.matchConfigurations().get(0).matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("czg", + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.NOT_EQUALS, + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("lssxblycsxzujk", + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("xvgpiude", + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("aobn", model.matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals("ywart", + model.matchConfigurations().get(0).matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.PERMIT, model.matchConfigurations().get(0).action().type()); + Assertions.assertEquals("cfxhikkflrmy", model.matchConfigurations().get(0).action().remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclPatchProperties model = new ControlPlaneAclPatchProperties() + .withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("yank") + .withSequenceNumber(1514792929801434705L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("ankltytm") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("oznnhdrlktgj") + .withDestinationIpPrefix("gguxhemlwyw")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("czg") + .withTtlMatchType(ControlPlaneAclTtlMatchType.NOT_EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("lssxblycsxzujk", "rlsmdesqplpvmjc", "oewbid")) + .withPortMatchType(ControlPlaneAclPortMatchType.RANGE)) + .withDestinationPorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("xvgpiude", "gfsxzec", "axwk", "fykhvuhxepmru")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN))) + .withFlags(Arrays.asList("aobn", "lujdjltymkmv")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("ywart", "pphkixkykxds", "j")))) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("cfxhikkflrmy")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("incqlhriswsl") + .withSequenceNumber(2239452406142710193L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("gqcg") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("gqkctotiowlxte") + .withDestinationIpPrefix("ptjgwdt")) + .withTtlMatchCondition( + new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("ranblwphqlkccu") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("hoi", "lwgniiprglvawu", "z")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("vlsbbjpmcubkmifo", "xkubvphavpmhbrbq", "vgovpbbttefjokn")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS))) + .withFlags(Arrays.asList("qedikdfrd", "iqmrjgeihfqlggw", "iwzcxmjpbyeph")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("ljvrcmyfqipgxhnp", "myqwcab")))) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("eeyaswl")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("ugmrmf") + .withSequenceNumber(4657061822693147291L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("oauk") + .withIpCondition(new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("vcisiz") + .withDestinationIpPrefix("a")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("xjw") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("gyeewxeiq", "psmgo")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("jdlrgmsplzgaufc", "hhvnewgnxkymp", "anxrj")) + .withPortMatchType(ControlPlaneAclPortMatchType.LESSER_THAN))) + .withFlags(Arrays.asList("bta", "ypnyghshxc")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("gmnsghpxy", "phdrw", "jkhvyomacluzvxnq")))) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.DENY) + .withRemarkComment("pd")), + new ControlPlaneAclMatchConfigurationPatchProperties().withMatchConfigurationName("mkoisqcssf") + .withSequenceNumber(5162262866060166844L) + .withMatchCondition(new ControlPlaneAclMatchConditionPatch().withProtocolTypes("csypobkdqzrdzsyl") + .withIpCondition( + new ControlPlaneAclIpMatchConditionPatch().withSourceIpPrefix("gtrczzydmxzjijpv") + .withDestinationIpPrefix("urkihci")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("efxrdcoxnbk") + .withTtlMatchType(ControlPlaneAclTtlMatchType.NOT_EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("nqbnqb", "izxqltgrd")) + .withPortMatchType(ControlPlaneAclPortMatchType.LESSER_THAN)) + .withDestinationPorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("x", "bfihw", "hvcta")) + .withPortMatchType(ControlPlaneAclPortMatchType.LESSER_THAN))) + .withFlags(Arrays.asList("rblmli", "wxihs", "nxw", "agnepzwaklsb")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("qagwwrxaomz", "sgl")))) + .withAction(new ControlPlaneAclActionPatch().withType(ControlPlaneAclActionType.REMARK) + .withRemarkComment("zkhhltnjadhqo")))); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclPatchProperties.class); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("yank", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(1514792929801434705L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("ankltytm", model.matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("oznnhdrlktgj", + model.matchConfigurations().get(0).matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("gguxhemlwyw", + model.matchConfigurations().get(0).matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("czg", + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.NOT_EQUALS, + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("lssxblycsxzujk", + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("xvgpiude", + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("aobn", model.matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals("ywart", + model.matchConfigurations().get(0).matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.PERMIT, model.matchConfigurations().get(0).action().type()); + Assertions.assertEquals("cfxhikkflrmy", model.matchConfigurations().get(0).action().remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortConditionTests.java new file mode 100644 index 000000000000..be19dced319f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortConditionTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclPortConditionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclPortCondition model + = BinaryData.fromString("{\"ports\":[\"xvxcjzhq\",\"zxfpxtgqsc\"],\"portMatchType\":\"neq\"}") + .toObject(ControlPlaneAclPortCondition.class); + Assertions.assertEquals("xvxcjzhq", model.ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.NOT_EQUALS, model.portMatchType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclPortCondition model + = new ControlPlaneAclPortCondition().withPorts(Arrays.asList("xvxcjzhq", "zxfpxtgqsc")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclPortCondition.class); + Assertions.assertEquals("xvxcjzhq", model.ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.NOT_EQUALS, model.portMatchType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionPatchTests.java new file mode 100644 index 000000000000..ab404bee1197 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionPatchTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclPortMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclPortMatchConditionPatch model = BinaryData.fromString( + "{\"sourcePorts\":{\"ports\":[\"ulopmjnlexwhcb\",\"pibkephuu\",\"erctatoyin\",\"qpbrlc\"],\"portMatchType\":\"neq\"},\"destinationPorts\":{\"ports\":[\"kg\",\"fxyfsrucvcrrpcj\"],\"portMatchType\":\"eq\"}}") + .toObject(ControlPlaneAclPortMatchConditionPatch.class); + Assertions.assertEquals("ulopmjnlexwhcb", model.sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.NOT_EQUALS, model.sourcePorts().portMatchType()); + Assertions.assertEquals("kg", model.destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.EQUALS, model.destinationPorts().portMatchType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclPortMatchConditionPatch model = new ControlPlaneAclPortMatchConditionPatch() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("ulopmjnlexwhcb", "pibkephuu", "erctatoyin", "qpbrlc")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("kg", "fxyfsrucvcrrpcj")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS)); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclPortMatchConditionPatch.class); + Assertions.assertEquals("ulopmjnlexwhcb", model.sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.NOT_EQUALS, model.sourcePorts().portMatchType()); + Assertions.assertEquals("kg", model.destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.EQUALS, model.destinationPorts().portMatchType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionTests.java new file mode 100644 index 000000000000..c7a69adbc2c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPortMatchConditionTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclPortMatchConditionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclPortMatchCondition model = BinaryData.fromString( + "{\"sourcePorts\":{\"ports\":[\"epgfew\",\"twly\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"kxhdjhlimmbcx\",\"h\"],\"portMatchType\":\"range\"}}") + .toObject(ControlPlaneAclPortMatchCondition.class); + Assertions.assertEquals("epgfew", model.sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, model.sourcePorts().portMatchType()); + Assertions.assertEquals("kxhdjhlimmbcx", model.destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, model.destinationPorts().portMatchType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclPortMatchCondition model = new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("epgfew", "twly")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("kxhdjhlimmbcx", "h")) + .withPortMatchType(ControlPlaneAclPortMatchType.RANGE)); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclPortMatchCondition.class); + Assertions.assertEquals("epgfew", model.sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, model.sourcePorts().portMatchType()); + Assertions.assertEquals("kxhdjhlimmbcx", model.destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, model.destinationPorts().portMatchType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPropertiesTests.java new file mode 100644 index 000000000000..bc6fd789cfc1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclPropertiesTests.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlanAclIpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclAction; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclPortMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclProperties model = BinaryData.fromString( + "{\"ipAddressType\":\"IPv4\",\"matchConfigurations\":[{\"matchConfigurationName\":\"edcg\",\"sequenceNumber\":3966184750371526603,\"matchCondition\":{\"protocolTypes\":\"rqzz\",\"ipCondition\":{\"sourceIpPrefix\":\"vpglydz\",\"destinationIpPrefix\":\"rvqeevtoepryutn\"},\"ttlMatchCondition\":{\"ttlValue\":\"pzdm\",\"ttlMatchType\":\"neq\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"awzqadfl\",\"z\",\"riglaec\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"okpvzm\",\"qtmldgxo\"],\"portMatchType\":\"range\"}},\"flags\":[\"lnpkciay\",\"riykhyawfvjlbox\"],\"icmpConfiguration\":{\"icmpTypes\":[\"lmxhomdyn\",\"dwdigumb\",\"raauzzpt\"]}},\"action\":{\"type\":\"Remark\",\"remarkComment\":\"dz\"}},{\"matchConfigurationName\":\"zwwva\",\"sequenceNumber\":555801965899793404,\"matchCondition\":{\"protocolTypes\":\"fonkphhqyikvyla\",\"ipCondition\":{\"sourceIpPrefix\":\"vluwmncsttij\",\"destinationIpPrefix\":\"bvpoekrsgsgbdhu\"},\"ttlMatchCondition\":{\"ttlValue\":\"njdgkynscliq\",\"ttlMatchType\":\"neq\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"omtkub\",\"tppn\",\"dxzxhi\"],\"portMatchType\":\"eq\"},\"destinationPorts\":{\"ports\":[\"evqagtl\"],\"portMatchType\":\"neq\"}},\"flags\":[\"kqo\",\"py\"],\"icmpConfiguration\":{\"icmpTypes\":[\"rdcnifmzzsdy\",\"brn\",\"suxmpraf\"]}},\"action\":{\"type\":\"Permit\",\"remarkComment\":\"ocxvdfffwafqr\"}},{\"matchConfigurationName\":\"daspavehhrvk\",\"sequenceNumber\":218381478433689659,\"matchCondition\":{\"protocolTypes\":\"ud\",\"ipCondition\":{\"sourceIpPrefix\":\"gkmoyxcdyuibhmfd\",\"destinationIpPrefix\":\"zydvfvf\"},\"ttlMatchCondition\":{\"ttlValue\":\"aeoisrvh\",\"ttlMatchType\":\"gt\"},\"portCondition\":{\"sourcePorts\":{\"ports\":[\"kiscvwmzhwpl\",\"faxvxil\",\"btgn\"],\"portMatchType\":\"gt\"},\"destinationPorts\":{\"ports\":[\"xtjjfzqlqhycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"portMatchType\":\"neq\"}},\"flags\":[\"qwogfnzjvus\",\"zldmozuxy\",\"fsbtkad\",\"ysownbtgkbug\"],\"icmpConfiguration\":{\"icmpTypes\":[\"to\"]}},\"action\":{\"type\":\"Deny\",\"remarkComment\":\"of\"}}]}") + .toObject(ControlPlaneAclProperties.class); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("edcg", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3966184750371526603L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rqzz", model.matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("vpglydz", + model.matchConfigurations().get(0).matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("rvqeevtoepryutn", + model.matchConfigurations().get(0).matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("pzdm", + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.NOT_EQUALS, + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("awzqadfl", + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("okpvzm", + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("lnpkciay", model.matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals("lmxhomdyn", + model.matchConfigurations().get(0).matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.matchConfigurations().get(0).action().type()); + Assertions.assertEquals("dz", model.matchConfigurations().get(0).action().remarkComment()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclProperties model = new ControlPlaneAclProperties().withIpAddressType(IpAddressType.IPV4) + .withMatchConfigurations(Arrays.asList( + new ControlPlaneAclMatchConfigurationProperties().withMatchConfigurationName("edcg") + .withSequenceNumber(3966184750371526603L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("rqzz") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("vpglydz") + .withDestinationIpPrefix("rvqeevtoepryutn")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("pzdm") + .withTtlMatchType(ControlPlaneAclTtlMatchType.NOT_EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("awzqadfl", "z", "riglaec")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("okpvzm", "qtmldgxo")) + .withPortMatchType(ControlPlaneAclPortMatchType.RANGE))) + .withFlags(Arrays.asList("lnpkciay", "riykhyawfvjlbox")) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("lmxhomdyn", "dwdigumb", "raauzzpt")))) + .withAction( + new ControlPlaneAclAction().withType(ControlPlaneAclActionType.REMARK).withRemarkComment("dz")), + new ControlPlaneAclMatchConfigurationProperties().withMatchConfigurationName("zwwva") + .withSequenceNumber(555801965899793404L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("fonkphhqyikvyla") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("vluwmncsttij") + .withDestinationIpPrefix("bvpoekrsgsgbdhu")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("njdgkynscliq") + .withTtlMatchType(ControlPlaneAclTtlMatchType.NOT_EQUALS)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts( + new ControlPlaneAclPortCondition().withPorts(Arrays.asList("omtkub", "tppn", "dxzxhi")) + .withPortMatchType(ControlPlaneAclPortMatchType.EQUALS)) + .withDestinationPorts(new ControlPlaneAclPortCondition().withPorts(Arrays.asList("evqagtl")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS))) + .withFlags(Arrays.asList("kqo", "py")) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("rdcnifmzzsdy", "brn", "suxmpraf")))) + .withAction(new ControlPlaneAclAction().withType(ControlPlaneAclActionType.PERMIT) + .withRemarkComment("ocxvdfffwafqr")), + new ControlPlaneAclMatchConfigurationProperties().withMatchConfigurationName("daspavehhrvk") + .withSequenceNumber(218381478433689659L) + .withMatchCondition(new ControlPlaneAclMatchCondition().withProtocolTypes("ud") + .withIpCondition(new ControlPlanAclIpMatchCondition().withSourceIpPrefix("gkmoyxcdyuibhmfd") + .withDestinationIpPrefix("zydvfvf")) + .withTtlMatchCondition(new ControlPlaneAclTtlMatchCondition().withTtlValue("aeoisrvh") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN)) + .withPortCondition(new ControlPlaneAclPortMatchCondition() + .withSourcePorts(new ControlPlaneAclPortCondition() + .withPorts(Arrays.asList("kiscvwmzhwpl", "faxvxil", "btgn")) + .withPortMatchType(ControlPlaneAclPortMatchType.GREATER_THAN)) + .withDestinationPorts(new ControlPlaneAclPortCondition() + .withPorts( + Arrays.asList("xtjjfzqlqhycav", "dggxdbeesmi", "knlrariaawiuagy", "wqfbylyrfgiagt")) + .withPortMatchType(ControlPlaneAclPortMatchType.NOT_EQUALS))) + .withFlags(Arrays.asList("qwogfnzjvus", "zldmozuxy", "fsbtkad", "ysownbtgkbug")) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("to")))) + .withAction( + new ControlPlaneAclAction().withType(ControlPlaneAclActionType.DENY).withRemarkComment("of")))); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclProperties.class); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("edcg", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3966184750371526603L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("rqzz", model.matchConfigurations().get(0).matchCondition().protocolTypes()); + Assertions.assertEquals("vpglydz", + model.matchConfigurations().get(0).matchCondition().ipCondition().sourceIpPrefix()); + Assertions.assertEquals("rvqeevtoepryutn", + model.matchConfigurations().get(0).matchCondition().ipCondition().destinationIpPrefix()); + Assertions.assertEquals("pzdm", + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.NOT_EQUALS, + model.matchConfigurations().get(0).matchCondition().ttlMatchCondition().ttlMatchType()); + Assertions.assertEquals("awzqadfl", + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.GREATER_THAN, + model.matchConfigurations().get(0).matchCondition().portCondition().sourcePorts().portMatchType()); + Assertions.assertEquals("okpvzm", + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().ports().get(0)); + Assertions.assertEquals(ControlPlaneAclPortMatchType.RANGE, + model.matchConfigurations().get(0).matchCondition().portCondition().destinationPorts().portMatchType()); + Assertions.assertEquals("lnpkciay", model.matchConfigurations().get(0).matchCondition().flags().get(0)); + Assertions.assertEquals("lmxhomdyn", + model.matchConfigurations().get(0).matchCondition().icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(ControlPlaneAclActionType.REMARK, model.matchConfigurations().get(0).action().type()); + Assertions.assertEquals("dz", model.matchConfigurations().get(0).action().remarkComment()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionPatchTests.java new file mode 100644 index 000000000000..efdf6662791d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclTtlMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclTtlMatchConditionPatch model + = BinaryData.fromString("{\"ttlValue\":\"antuygdhgaqipirp\",\"ttlMatchType\":\"lt\"}") + .toObject(ControlPlaneAclTtlMatchConditionPatch.class); + Assertions.assertEquals("antuygdhgaqipirp", model.ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.LESSER_THAN, model.ttlMatchType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclTtlMatchConditionPatch model + = new ControlPlaneAclTtlMatchConditionPatch().withTtlValue("antuygdhgaqipirp") + .withTtlMatchType(ControlPlaneAclTtlMatchType.LESSER_THAN); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclTtlMatchConditionPatch.class); + Assertions.assertEquals("antuygdhgaqipirp", model.ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.LESSER_THAN, model.ttlMatchType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionTests.java new file mode 100644 index 000000000000..5b993eac632e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControlPlaneAclTtlMatchConditionTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.ControlPlaneAclTtlMatchType; +import org.junit.jupiter.api.Assertions; + +public final class ControlPlaneAclTtlMatchConditionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlPlaneAclTtlMatchCondition model + = BinaryData.fromString("{\"ttlValue\":\"wpchwahf\",\"ttlMatchType\":\"gt\"}") + .toObject(ControlPlaneAclTtlMatchCondition.class); + Assertions.assertEquals("wpchwahf", model.ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, model.ttlMatchType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlPlaneAclTtlMatchCondition model = new ControlPlaneAclTtlMatchCondition().withTtlValue("wpchwahf") + .withTtlMatchType(ControlPlaneAclTtlMatchType.GREATER_THAN); + model = BinaryData.fromObject(model).toObject(ControlPlaneAclTtlMatchCondition.class); + Assertions.assertEquals("wpchwahf", model.ttlValue()); + Assertions.assertEquals(ControlPlaneAclTtlMatchType.GREATER_THAN, model.ttlMatchType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java index 7eac63795747..703020b53dab 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ControllerServicesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ControllerServices model = BinaryData.fromString( - "{\"ipv4AddressSpaces\":[\"osqkptjqgk\",\"fmmainwhedxkpbq\",\"unt\"],\"ipv6AddressSpaces\":[\"izazz\",\"lw\",\"vydjufbnk\"]}") + "{\"ipv4AddressSpaces\":[\"ayprldid\",\"mtffbvtzldzchuba\",\"wnlzuvi\",\"vlghfrbzakpjtcqr\"],\"ipv6AddressSpaces\":[\"ojpsucm\",\"imcwqxynqjgsa\",\"kyvscbgngcrus\",\"hirc\"]}") .toObject(ControllerServices.class); - Assertions.assertEquals("osqkptjqgk", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("izazz", model.ipv6AddressSpaces().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ControllerServices model - = new ControllerServices().withIpv4AddressSpaces(Arrays.asList("osqkptjqgk", "fmmainwhedxkpbq", "unt")) - .withIpv6AddressSpaces(Arrays.asList("izazz", "lw", "vydjufbnk")); - model = BinaryData.fromObject(model).toObject(ControllerServices.class); - Assertions.assertEquals("osqkptjqgk", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("izazz", model.ipv6AddressSpaces().get(0)); + Assertions.assertEquals("ayprldid", model.ipv4AddressSpaces().get(0)); + Assertions.assertEquals("ojpsucm", model.ipv6AddressSpaces().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java new file mode 100644 index 000000000000..11fa50973644 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DestinationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DestinationPatchProperties model = BinaryData.fromString( + "{\"name\":\"fzlhibf\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"bktuajkufpvvd\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"mnobbai\",\"cfbfy\",\"zaisfofg\"]},\"destinationTapRuleId\":\"rkmgifmyzbuhdnhh\"}") + .toObject(DestinationPatchProperties.class); + Assertions.assertEquals("fzlhibf", model.name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); + Assertions.assertEquals("bktuajkufpvvd", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("mnobbai", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("rkmgifmyzbuhdnhh", model.destinationTapRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DestinationPatchProperties model = new DestinationPatchProperties().withName("fzlhibf") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("bktuajkufpvvd") + .withIsolationDomainProperties(new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("mnobbai", "cfbfy", "zaisfofg"))) + .withDestinationTapRuleId("rkmgifmyzbuhdnhh"); + model = BinaryData.fromObject(model).toObject(DestinationPatchProperties.class); + Assertions.assertEquals("fzlhibf", model.name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); + Assertions.assertEquals("bktuajkufpvvd", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("mnobbai", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("rkmgifmyzbuhdnhh", model.destinationTapRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java index 850fc8026f52..1725e417943e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,30 +16,30 @@ public final class DestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DestinationProperties model = BinaryData.fromString( - "{\"name\":\"okjbmsr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"xxhwrlqo\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"lpz\"]},\"destinationTapRuleId\":\"rwnrzo\"}") + "{\"name\":\"vxhfmuhkezuuc\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"cocdxvbeqzjd\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"dwneecmytlx\",\"gjrw\"]},\"destinationTapRuleId\":\"ffaofkvfruxz\"}") .toObject(DestinationProperties.class); - Assertions.assertEquals("okjbmsr", model.name()); + Assertions.assertEquals("vxhfmuhkezuuc", model.name()); Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("xxhwrlqo", model.destinationId()); + Assertions.assertEquals("cocdxvbeqzjd", model.destinationId()); Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("lpz", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rwnrzo", model.destinationTapRuleId()); + Assertions.assertEquals("dwneecmytlx", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("ffaofkvfruxz", model.destinationTapRuleId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DestinationProperties model = new DestinationProperties().withName("okjbmsr") + DestinationProperties model = new DestinationProperties().withName("vxhfmuhkezuuc") .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("xxhwrlqo") + .withDestinationId("cocdxvbeqzjd") .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("lpz"))) - .withDestinationTapRuleId("rwnrzo"); + .withNeighborGroupIds(Arrays.asList("dwneecmytlx", "gjrw"))) + .withDestinationTapRuleId("ffaofkvfruxz"); model = BinaryData.fromObject(model).toObject(DestinationProperties.class); - Assertions.assertEquals("okjbmsr", model.name()); + Assertions.assertEquals("vxhfmuhkezuuc", model.name()); Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("xxhwrlqo", model.destinationId()); + Assertions.assertEquals("cocdxvbeqzjd", model.destinationId()); Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("lpz", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rwnrzo", model.destinationTapRuleId()); + Assertions.assertEquals("dwneecmytlx", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("ffaofkvfruxz", model.destinationTapRuleId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java index 51a04ba30c1c..fd7057159fd7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class DeviceInterfacePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeviceInterfaceProperties model = BinaryData.fromString( - "{\"identifier\":\"tbhpjhxpcvrdnye\",\"interfaceType\":\"aneqadynzja\",\"supportedConnectorTypes\":[{\"connectorType\":\"uomzczfki\",\"maxSpeedInMbps\":1238351045},{\"connectorType\":\"saaxwspca\",\"maxSpeedInMbps\":1087934112},{\"connectorType\":\"fjqebglcxkx\",\"maxSpeedInMbps\":133600558}]}") + "{\"identifier\":\"cqeb\",\"interfaceType\":\"rdjomlnwsb\",\"supportedConnectorTypes\":[{\"connectorType\":\"sflxkqesd\",\"maxSpeedInMbps\":1696526892}]}") .toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("tbhpjhxpcvrdnye", model.identifier()); - Assertions.assertEquals("aneqadynzja", model.interfaceType()); - Assertions.assertEquals("uomzczfki", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1238351045, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceInterfaceProperties model = new DeviceInterfaceProperties().withIdentifier("tbhpjhxpcvrdnye") - .withInterfaceType("aneqadynzja") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("uomzczfki").withMaxSpeedInMbps(1238351045), - new SupportedConnectorProperties().withConnectorType("saaxwspca").withMaxSpeedInMbps(1087934112), - new SupportedConnectorProperties().withConnectorType("fjqebglcxkx").withMaxSpeedInMbps(133600558))); - model = BinaryData.fromObject(model).toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("tbhpjhxpcvrdnye", model.identifier()); - Assertions.assertEquals("aneqadynzja", model.interfaceType()); - Assertions.assertEquals("uomzczfki", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1238351045, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); + Assertions.assertEquals("cqeb", model.identifier()); + Assertions.assertEquals("rdjomlnwsb", model.interfaceType()); + Assertions.assertEquals("sflxkqesd", model.supportedConnectorTypes().get(0).connectorType()); + Assertions.assertEquals(1696526892, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java new file mode 100644 index 000000000000..e5e1f8003357 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import org.junit.jupiter.api.Assertions; + +public final class DeviceRoCommandTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeviceRoCommand model = BinaryData.fromString("{\"command\":\"poqzucfz\"}").toObject(DeviceRoCommand.class); + Assertions.assertEquals("poqzucfz", model.command()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeviceRoCommand model = new DeviceRoCommand().withCommand("poqzucfz"); + model = BinaryData.fromObject(model).toObject(DeviceRoCommand.class); + Assertions.assertEquals("poqzucfz", model.command()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java new file mode 100644 index 000000000000..f7f7712abc08 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; +import org.junit.jupiter.api.Assertions; + +public final class DeviceRwCommandTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeviceRwCommand model = BinaryData.fromString("{\"command\":\"kgtzqnwqsttewu\",\"commandUrl\":\"ysjeufjx\"}") + .toObject(DeviceRwCommand.class); + Assertions.assertEquals("kgtzqnwqsttewu", model.command()); + Assertions.assertEquals("ysjeufjx", model.commandUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeviceRwCommand model = new DeviceRwCommand().withCommand("kgtzqnwqsttewu").withCommandUrl("ysjeufjx"); + model = BinaryData.fromObject(model).toObject(DeviceRwCommand.class); + Assertions.assertEquals("kgtzqnwqsttewu", model.command()); + Assertions.assertEquals("ysjeufjx", model.commandUrl()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java new file mode 100644 index 000000000000..b5aaeef20e6c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import org.junit.jupiter.api.Assertions; + +public final class DiscardCommitBatchRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscardCommitBatchRequest model + = BinaryData.fromString("{\"commitBatchId\":\"ytzuaedrl\"}").toObject(DiscardCommitBatchRequest.class); + Assertions.assertEquals("ytzuaedrl", model.commitBatchId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiscardCommitBatchRequest model = new DiscardCommitBatchRequest().withCommitBatchId("ytzuaedrl"); + model = BinaryData.fromObject(model).toObject(DiscardCommitBatchRequest.class); + Assertions.assertEquals("ytzuaedrl", model.commitBatchId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchResponsePropertiesTests.java new file mode 100644 index 000000000000..af51898a0fa8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchResponsePropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class DiscardCommitBatchResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscardCommitBatchResponseProperties model = BinaryData.fromString("{\"commitBatchId\":\"gkts\"}") + .toObject(DiscardCommitBatchResponseProperties.class); + Assertions.assertEquals("gkts", model.commitBatchId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java index d49dd19a584c..5774666a513a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,16 +13,16 @@ public final class EnableDisableOnResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnableDisableOnResources model - = BinaryData.fromString("{\"resourceIds\":[\"bannovvoxczytp\",\"wnwvroevytlyokr\",\"rouuxvnsasbcry\"]}") + = BinaryData.fromString("{\"resourceIds\":[\"vnynkb\",\"etnjuhpsprkz\",\"aupia\",\"cxnafbwqrooh\"]}") .toObject(EnableDisableOnResources.class); - Assertions.assertEquals("bannovvoxczytp", model.resourceIds().get(0)); + Assertions.assertEquals("vnynkb", model.resourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EnableDisableOnResources model = new EnableDisableOnResources() - .withResourceIds(Arrays.asList("bannovvoxczytp", "wnwvroevytlyokr", "rouuxvnsasbcry")); + .withResourceIds(Arrays.asList("vnynkb", "etnjuhpsprkz", "aupia", "cxnafbwqrooh")); model = BinaryData.fromObject(model).toObject(EnableDisableOnResources.class); - Assertions.assertEquals("bannovvoxczytp", model.resourceIds().get(0)); + Assertions.assertEquals("vnynkb", model.resourceIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java new file mode 100644 index 000000000000..fcfc63146289 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import org.junit.jupiter.api.Assertions; + +public final class ExportRoutePolicyInformationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportRoutePolicyInformationPatch model = BinaryData + .fromString("{\"exportIpv4RoutePolicyId\":\"bgd\",\"exportIpv6RoutePolicyId\":\"imorzolxosgiht\"}") + .toObject(ExportRoutePolicyInformationPatch.class); + Assertions.assertEquals("bgd", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("imorzolxosgiht", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportRoutePolicyInformationPatch model + = new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("bgd") + .withExportIpv6RoutePolicyId("imorzolxosgiht"); + model = BinaryData.fromObject(model).toObject(ExportRoutePolicyInformationPatch.class); + Assertions.assertEquals("bgd", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("imorzolxosgiht", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java index 18b67f3900a8..8f573078f9bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,19 +11,19 @@ public final class ExportRoutePolicyInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExportRoutePolicyInformation model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"vtbdm\",\"exportIpv6RoutePolicyId\":\"byidaelqpvekmkwj\"}") - .toObject(ExportRoutePolicyInformation.class); - Assertions.assertEquals("vtbdm", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("byidaelqpvekmkwj", model.exportIpv6RoutePolicyId()); + ExportRoutePolicyInformation model + = BinaryData.fromString("{\"exportIpv4RoutePolicyId\":\"a\",\"exportIpv6RoutePolicyId\":\"eiancsqoac\"}") + .toObject(ExportRoutePolicyInformation.class); + Assertions.assertEquals("a", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("eiancsqoac", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportRoutePolicyInformation model = new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("vtbdm") - .withExportIpv6RoutePolicyId("byidaelqpvekmkwj"); + ExportRoutePolicyInformation model = new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("a") + .withExportIpv6RoutePolicyId("eiancsqoac"); model = BinaryData.fromObject(model).toObject(ExportRoutePolicyInformation.class); - Assertions.assertEquals("vtbdm", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("byidaelqpvekmkwj", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("a", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("eiancsqoac", model.exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..c7cdb4677c5e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ExportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportRoutePolicyPatch model = BinaryData + .fromString("{\"exportIpv4RoutePolicyId\":\"agdvcdqhftz\",\"exportIpv6RoutePolicyId\":\"yfaofdf\"}") + .toObject(ExportRoutePolicyPatch.class); + Assertions.assertEquals("agdvcdqhftz", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("yfaofdf", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportRoutePolicyPatch model = new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("agdvcdqhftz") + .withExportIpv6RoutePolicyId("yfaofdf"); + model = BinaryData.fromObject(model).toObject(ExportRoutePolicyPatch.class); + Assertions.assertEquals("agdvcdqhftz", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("yfaofdf", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java index e5fb33945036..9dacd55f14bc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class ExportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportRoutePolicy model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"ozjiihj\",\"exportIpv6RoutePolicyId\":\"ybmrzoepnxwd\"}") + .fromString("{\"exportIpv4RoutePolicyId\":\"tksdwgdnkefgmw\",\"exportIpv6RoutePolicyId\":\"c\"}") .toObject(ExportRoutePolicy.class); - Assertions.assertEquals("ozjiihj", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("ybmrzoepnxwd", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("tksdwgdnkefgmw", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("c", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportRoutePolicy model = new ExportRoutePolicy().withExportIpv4RoutePolicyId("ozjiihj") - .withExportIpv6RoutePolicyId("ybmrzoepnxwd"); + ExportRoutePolicy model + = new ExportRoutePolicy().withExportIpv4RoutePolicyId("tksdwgdnkefgmw").withExportIpv6RoutePolicyId("c"); model = BinaryData.fromObject(model).toObject(ExportRoutePolicy.class); - Assertions.assertEquals("ozjiihj", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("ybmrzoepnxwd", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("tksdwgdnkefgmw", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("c", model.exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java deleted file mode 100644 index 705fc4152cb2..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.Extension; -import com.azure.resourcemanager.managednetworkfabric.models.ExtensionEnumProperty; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionEnumPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionEnumProperty model - = BinaryData.fromString("{\"extension\":\"NPB\"}").toObject(ExtensionEnumProperty.class); - Assertions.assertEquals(Extension.NPB, model.extension()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionEnumProperty model = new ExtensionEnumProperty().withExtension(Extension.NPB); - model = BinaryData.fromObject(model).toObject(ExtensionEnumProperty.class); - Assertions.assertEquals(Extension.NPB, model.extension()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..7e309bf76e33 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkBmpPatchProperties model = BinaryData.fromString("{\"configurationState\":\"Enabled\"}") + .toObject(ExternalNetworkBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkBmpPatchProperties model + = new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java new file mode 100644 index 000000000000..2e4ebc252591 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkBmpProperties model = BinaryData.fromString("{\"configurationState\":\"Enabled\"}") + .toObject(ExternalNetworkBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkBmpProperties model + = new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java index c525078c25d1..2a2899f5471d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,94 +29,167 @@ public final class ExternalNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"wnsnlaimouxwks\",\"mud\",\"fco\"],\"exportRouteTargets\":[\"cziu\",\"wswjrkbqsjh\",\"tqqvy\",\"scyrfwbivqv\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"yzwvbhlimbyqec\",\"ood\",\"ikcdrdaasax\",\"obsmf\"],\"importIpv6RouteTargets\":[\"yjvzukosr\",\"awn\"],\"exportIpv4RouteTargets\":[\"lnk\",\"ywsxvjabjqqaxu\",\"vym\"],\"exportIpv6RouteTargets\":[\"dndoabhjxw\",\"qweuip\",\"pvksmit\"]}},\"optionAProperties\":{\"mtu\":996599116,\"vlanId\":47040018,\"fabricASN\":7489455954873500564,\"peerASN\":8923092334275652635,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":967945302,\"multiplier\":1996640929},\"ingressAclId\":\"rakkld\",\"egressAclId\":\"c\",\"primaryIpv4Prefix\":\"cmfcnrjajq\",\"primaryIpv6Prefix\":\"txjtielnzqgx\",\"secondaryIpv4Prefix\":\"fbbmtlp\",\"secondaryIpv6Prefix\":\"gynoiprnzcali\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"aqzi\",\"importRoutePolicyId\":\"qimiymqr\",\"exportRoutePolicyId\":\"guhfupe\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vvoqsbpkf\",\"importIpv6RoutePolicyId\":\"nfkgxsyaowuzowpu\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"kc\",\"exportIpv6RoutePolicyId\":\"gukxrztiochluti\"},\"annotation\":\"qrudjizcbfzmcr\"},\"id\":\"fhi\",\"name\":\"c\",\"type\":\"mfbcpaqktkrum\"}") + "{\"properties\":{\"annotation\":\"gikyjtkak\",\"networkToNetworkInterconnectId\":\"bishjvpzaptuo\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"oizjixwfgcdiyk\",\"importIpv6RoutePolicyId\":\"xwnujvqyn\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"i\",\"exportIpv6RoutePolicyId\":\"dmuqohhi\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"uddrwjc\",\"jbrhlhpvzadbw\",\"nnin\"],\"exportRouteTargets\":[\"xrzfrmvztiucwvi\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"khkrc\"],\"importIpv6RouteTargets\":[\"cbvzarmqcb\"],\"exportIpv4RouteTargets\":[\"stsinvag\"],\"exportIpv6RouteTargets\":[\"yhdrxb\",\"dvcehqw\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"xnmxgnmguzb\",\"primaryIpv6Prefix\":\"vorbalkjnbk\",\"secondaryIpv4Prefix\":\"h\",\"secondaryIpv6Prefix\":\"tqstqkqsygxiyne\",\"mtu\":499879853,\"vlanId\":555593471,\"fabricASN\":9068474490181674407,\"peerASN\":2909735429003827098,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":583145498,\"multiplier\":239129430},\"ingressAclId\":\"pqcckqiawzlz\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"gacizuxlrarw\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1981503896,\"threshold\":841250139,\"idleTimeExpiry\":1967090984},{\"maximumRoutes\":1889022680,\"threshold\":897768578,\"idleTimeExpiry\":1924810885}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1048624802,\"threshold\":1624416011,\"idleTimeExpiry\":802548202},{\"maximumRoutes\":1958545231,\"threshold\":1112826692,\"idleTimeExpiry\":96953266},{\"maximumRoutes\":11542985,\"threshold\":877954807,\"idleTimeExpiry\":2000994478},{\"maximumRoutes\":237675407,\"threshold\":602201525,\"idleTimeExpiry\":2142343469}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1641670527,\"multiplier\":1630671557},\"ipv4Routes\":[{\"prefix\":\"cypxbbfetw\",\"nextHop\":[\"y\"]},{\"prefix\":\"zox\",\"nextHop\":[\"xql\",\"r\",\"lqownkiua\"]}],\"ipv6Routes\":[{\"prefix\":\"nahwk\",\"nextHop\":[\"jmztnlmso\",\"dtmvecdhdyswcrp\",\"veajczxvlgsrg\",\"rfizr\"]}]},\"lastOperation\":{\"details\":\"lptyuqhr\"},\"networkFabricId\":\"cs\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"id\":\"ixcnpcf\",\"name\":\"kkpyycpaw\",\"type\":\"pjprdpwr\"}") .toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("wnsnlaimouxwks", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("cziu", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("yzwvbhlimbyqec", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("yjvzukosr", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lnk", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("dndoabhjxw", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("cmfcnrjajq", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("txjtielnzqgx", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fbbmtlp", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gynoiprnzcali", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(996599116, model.optionAProperties().mtu()); - Assertions.assertEquals(47040018, model.optionAProperties().vlanId()); - Assertions.assertEquals(8923092334275652635L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(967945302, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1996640929, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rakkld", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("c", model.optionAProperties().egressAclId()); - Assertions.assertEquals("aqzi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("qimiymqr", model.importRoutePolicyId()); - Assertions.assertEquals("guhfupe", model.exportRoutePolicyId()); - Assertions.assertEquals("vvoqsbpkf", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nfkgxsyaowuzowpu", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("kc", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("gukxrztiochluti", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qrudjizcbfzmcr", model.annotation()); + Assertions.assertEquals("gikyjtkak", model.annotation()); + Assertions.assertEquals("bishjvpzaptuo", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("oizjixwfgcdiyk", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xwnujvqyn", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("i", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dmuqohhi", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("uddrwjc", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("xrzfrmvztiucwvi", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("khkrc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("cbvzarmqcb", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("stsinvag", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("yhdrxb", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("xnmxgnmguzb", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("vorbalkjnbk", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("h", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tqstqkqsygxiyne", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(499879853, model.optionAProperties().mtu()); + Assertions.assertEquals(555593471, model.optionAProperties().vlanId()); + Assertions.assertEquals(2909735429003827098L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(583145498, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(239129430, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("pqcckqiawzlz", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("gacizuxlrarw", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1981503896, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(841250139, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1967090984, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1048624802, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1624416011, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(802548202, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1641670527, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1630671557, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("cypxbbfetw", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("y", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("nahwk", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jmztnlmso", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkInner model = new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new L3OptionBProperties().withImportRouteTargets(Arrays.asList("wnsnlaimouxwks", "mud", "fco")) - .withExportRouteTargets(Arrays.asList("cziu", "wswjrkbqsjh", "tqqvy", "scyrfwbivqv")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("yzwvbhlimbyqec", "ood", "ikcdrdaasax", "obsmf")) - .withImportIpv6RouteTargets(Arrays.asList("yjvzukosr", "awn")) - .withExportIpv4RouteTargets(Arrays.asList("lnk", "ywsxvjabjqqaxu", "vym")) - .withExportIpv6RouteTargets(Arrays.asList("dndoabhjxw", "qweuip", "pvksmit")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("cmfcnrjajq") - .withPrimaryIpv6Prefix("txjtielnzqgx") - .withSecondaryIpv4Prefix("fbbmtlp") - .withSecondaryIpv6Prefix("gynoiprnzcali") - .withMtu(996599116) - .withVlanId(47040018) - .withPeerAsn(8923092334275652635L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(967945302).withMultiplier(1996640929)) - .withIngressAclId("rakkld") - .withEgressAclId("c")) - .withNetworkToNetworkInterconnectId("aqzi") - .withImportRoutePolicyId("qimiymqr") - .withExportRoutePolicyId("guhfupe") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("vvoqsbpkf") - .withImportIpv6RoutePolicyId("nfkgxsyaowuzowpu")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("kc") - .withExportIpv6RoutePolicyId("gukxrztiochluti")) - .withAnnotation("qrudjizcbfzmcr"); + ExternalNetworkInner model + = new ExternalNetworkInner().withAnnotation("gikyjtkak") + .withNetworkToNetworkInterconnectId("bishjvpzaptuo") + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("oizjixwfgcdiyk") + .withImportIpv6RoutePolicyId("xwnujvqyn")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("i").withExportIpv6RoutePolicyId("dmuqohhi")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new L3OptionBProperties() + .withImportRouteTargets(Arrays.asList("uddrwjc", "jbrhlhpvzadbw", "nnin")) + .withExportRouteTargets(Arrays.asList("xrzfrmvztiucwvi")) + .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("khkrc")) + .withImportIpv6RouteTargets(Arrays.asList("cbvzarmqcb")) + .withExportIpv4RouteTargets(Arrays.asList("stsinvag")) + .withExportIpv6RouteTargets(Arrays.asList("yhdrxb", "dvcehqw")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() + .withPrimaryIpv4Prefix("xnmxgnmguzb") + .withPrimaryIpv6Prefix("vorbalkjnbk") + .withSecondaryIpv4Prefix("h") + .withSecondaryIpv6Prefix("tqstqkqsygxiyne") + .withMtu(499879853) + .withVlanId(555593471) + .withPeerAsn(2909735429003827098L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(583145498).withMultiplier(239129430)) + .withIngressAclId("pqcckqiawzlz") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("gacizuxlrarw") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1981503896) + .withThreshold(841250139) + .withIdleTimeExpiry(1967090984), + new PrefixLimitProperties().withMaximumRoutes(1889022680) + .withThreshold(897768578) + .withIdleTimeExpiry(1924810885)))) + .withNativeIpv6PrefixLimit( + new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1048624802) + .withThreshold(1624416011) + .withIdleTimeExpiry(802548202), + new PrefixLimitProperties().withMaximumRoutes(1958545231) + .withThreshold(1112826692) + .withIdleTimeExpiry(96953266), + new PrefixLimitProperties().withMaximumRoutes(11542985) + .withThreshold(877954807) + .withIdleTimeExpiry(2000994478), + new PrefixLimitProperties().withMaximumRoutes(237675407) + .withThreshold(602201525) + .withIdleTimeExpiry(2142343469))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1641670527).withMultiplier(1630671557)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("cypxbbfetw").withNextHop(Arrays.asList("y")), + new StaticRouteProperties().withPrefix("zox") + .withNextHop(Arrays.asList("xql", "r", "lqownkiua")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("nahwk") + .withNextHop(Arrays.asList("jmztnlmso", "dtmvecdhdyswcrp", "veajczxvlgsrg", "rfizr"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("wnsnlaimouxwks", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("cziu", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("yzwvbhlimbyqec", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("yjvzukosr", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lnk", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("dndoabhjxw", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("cmfcnrjajq", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("txjtielnzqgx", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fbbmtlp", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gynoiprnzcali", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(996599116, model.optionAProperties().mtu()); - Assertions.assertEquals(47040018, model.optionAProperties().vlanId()); - Assertions.assertEquals(8923092334275652635L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(967945302, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1996640929, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rakkld", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("c", model.optionAProperties().egressAclId()); - Assertions.assertEquals("aqzi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("qimiymqr", model.importRoutePolicyId()); - Assertions.assertEquals("guhfupe", model.exportRoutePolicyId()); - Assertions.assertEquals("vvoqsbpkf", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nfkgxsyaowuzowpu", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("kc", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("gukxrztiochluti", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qrudjizcbfzmcr", model.annotation()); + Assertions.assertEquals("gikyjtkak", model.annotation()); + Assertions.assertEquals("bishjvpzaptuo", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("oizjixwfgcdiyk", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xwnujvqyn", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("i", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dmuqohhi", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("uddrwjc", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("xrzfrmvztiucwvi", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("khkrc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("cbvzarmqcb", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("stsinvag", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("yhdrxb", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("xnmxgnmguzb", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("vorbalkjnbk", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("h", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tqstqkqsygxiyne", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(499879853, model.optionAProperties().mtu()); + Assertions.assertEquals(555593471, model.optionAProperties().vlanId()); + Assertions.assertEquals(2909735429003827098L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(583145498, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(239129430, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("pqcckqiawzlz", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("gacizuxlrarw", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1981503896, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(841250139, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1967090984, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1048624802, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1624416011, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(802548202, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1641670527, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1630671557, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("cypxbbfetw", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("y", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("nahwk", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jmztnlmso", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java index 8e8cb9b2274d..b5c08308b32a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java @@ -1,58 +1,111 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ExternalNetworkPatchPropertiesOptionAPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatchPropertiesOptionAProperties model = BinaryData.fromString( - "{\"mtu\":498645411,\"vlanId\":2120923366,\"fabricASN\":1694114614222816717,\"peerASN\":7595116336186420084,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":944404959,\"multiplier\":2014555125},\"ingressAclId\":\"qchoadhrsxqv\",\"egressAclId\":\"spabdsrgfa\",\"primaryIpv4Prefix\":\"lzrsub\",\"primaryIpv6Prefix\":\"rxhjnltcet\",\"secondaryIpv4Prefix\":\"vqy\",\"secondaryIpv6Prefix\":\"eqq\"}") + "{\"primaryIpv4Prefix\":\"twlety\",\"primaryIpv6Prefix\":\"szrtlhpdhwynct\",\"secondaryIpv4Prefix\":\"zcnjfmbbfnvjxit\",\"secondaryIpv6Prefix\":\"vnk\",\"mtu\":1838859138,\"vlanId\":1636743521,\"fabricASN\":1524812917464626225,\"peerASN\":2714614785863345826,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":286522476,\"multiplier\":1106473092},\"ingressAclId\":\"ibhyxwbg\",\"egressAclId\":\"davqdorbcc\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1482007887,\"threshold\":1255958,\"idleTimeExpiry\":536906348},{\"maximumRoutes\":1220141088,\"threshold\":2037922061,\"idleTimeExpiry\":426424994},{\"maximumRoutes\":86351878,\"threshold\":502368164,\"idleTimeExpiry\":1117131622}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":138852421,\"threshold\":1936379477,\"idleTimeExpiry\":1847434186},{\"maximumRoutes\":72792455,\"threshold\":271809891,\"idleTimeExpiry\":449092721},{\"maximumRoutes\":1296621349,\"threshold\":850797696,\"idleTimeExpiry\":1683465955},{\"maximumRoutes\":1972653121,\"threshold\":561222848,\"idleTimeExpiry\":1851901458}]}}") .toObject(ExternalNetworkPatchPropertiesOptionAProperties.class); - Assertions.assertEquals("lzrsub", model.primaryIpv4Prefix()); - Assertions.assertEquals("rxhjnltcet", model.primaryIpv6Prefix()); - Assertions.assertEquals("vqy", model.secondaryIpv4Prefix()); - Assertions.assertEquals("eqq", model.secondaryIpv6Prefix()); - Assertions.assertEquals(498645411, model.mtu()); - Assertions.assertEquals(2120923366, model.vlanId()); - Assertions.assertEquals(7595116336186420084L, model.peerAsn()); - Assertions.assertEquals(944404959, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2014555125, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qchoadhrsxqv", model.ingressAclId()); - Assertions.assertEquals("spabdsrgfa", model.egressAclId()); + Assertions.assertEquals("twlety", model.primaryIpv4Prefix()); + Assertions.assertEquals("szrtlhpdhwynct", model.primaryIpv6Prefix()); + Assertions.assertEquals("zcnjfmbbfnvjxit", model.secondaryIpv4Prefix()); + Assertions.assertEquals("vnk", model.secondaryIpv6Prefix()); + Assertions.assertEquals(1838859138, model.mtu()); + Assertions.assertEquals(1636743521, model.vlanId()); + Assertions.assertEquals(2714614785863345826L, model.peerAsn()); + Assertions.assertEquals(286522476, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1106473092, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ibhyxwbg", model.ingressAclId()); + Assertions.assertEquals("davqdorbcc", model.egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1482007887, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1255958, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(536906348, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(138852421, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1936379477, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847434186, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExternalNetworkPatchPropertiesOptionAProperties model - = new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("lzrsub") - .withPrimaryIpv6Prefix("rxhjnltcet") - .withSecondaryIpv4Prefix("vqy") - .withSecondaryIpv6Prefix("eqq") - .withMtu(498645411) - .withVlanId(2120923366) - .withPeerAsn(7595116336186420084L) + = new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("twlety") + .withPrimaryIpv6Prefix("szrtlhpdhwynct") + .withSecondaryIpv4Prefix("zcnjfmbbfnvjxit") + .withSecondaryIpv6Prefix("vnk") + .withMtu(1838859138) + .withVlanId(1636743521) + .withPeerAsn(2714614785863345826L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(944404959).withMultiplier(2014555125)) - .withIngressAclId("qchoadhrsxqv") - .withEgressAclId("spabdsrgfa"); + new BfdPatchConfiguration().withIntervalInMilliSeconds(286522476).withMultiplier(1106473092)) + .withIngressAclId("ibhyxwbg") + .withEgressAclId("davqdorbcc") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1482007887) + .withThreshold(1255958) + .withIdleTimeExpiry(536906348), + new PrefixLimitPatchProperties().withMaximumRoutes(1220141088) + .withThreshold(2037922061) + .withIdleTimeExpiry(426424994), + new PrefixLimitPatchProperties().withMaximumRoutes(86351878) + .withThreshold(502368164) + .withIdleTimeExpiry(1117131622)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(138852421) + .withThreshold(1936379477) + .withIdleTimeExpiry(1847434186), + new PrefixLimitPatchProperties().withMaximumRoutes(72792455) + .withThreshold(271809891) + .withIdleTimeExpiry(449092721), + new PrefixLimitPatchProperties().withMaximumRoutes(1296621349) + .withThreshold(850797696) + .withIdleTimeExpiry(1683465955), + new PrefixLimitPatchProperties().withMaximumRoutes(1972653121) + .withThreshold(561222848) + .withIdleTimeExpiry(1851901458)))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchPropertiesOptionAProperties.class); - Assertions.assertEquals("lzrsub", model.primaryIpv4Prefix()); - Assertions.assertEquals("rxhjnltcet", model.primaryIpv6Prefix()); - Assertions.assertEquals("vqy", model.secondaryIpv4Prefix()); - Assertions.assertEquals("eqq", model.secondaryIpv6Prefix()); - Assertions.assertEquals(498645411, model.mtu()); - Assertions.assertEquals(2120923366, model.vlanId()); - Assertions.assertEquals(7595116336186420084L, model.peerAsn()); - Assertions.assertEquals(944404959, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2014555125, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qchoadhrsxqv", model.ingressAclId()); - Assertions.assertEquals("spabdsrgfa", model.egressAclId()); + Assertions.assertEquals("twlety", model.primaryIpv4Prefix()); + Assertions.assertEquals("szrtlhpdhwynct", model.primaryIpv6Prefix()); + Assertions.assertEquals("zcnjfmbbfnvjxit", model.secondaryIpv4Prefix()); + Assertions.assertEquals("vnk", model.secondaryIpv6Prefix()); + Assertions.assertEquals(1838859138, model.mtu()); + Assertions.assertEquals(1636743521, model.vlanId()); + Assertions.assertEquals(2714614785863345826L, model.peerAsn()); + Assertions.assertEquals(286522476, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1106473092, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ibhyxwbg", model.ingressAclId()); + Assertions.assertEquals("davqdorbcc", model.egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1482007887, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1255958, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(536906348, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(138852421, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1936379477, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847434186, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java index dc2eac695a73..f1e0e81ae97b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,97 +29,169 @@ public final class ExternalNetworkPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatchProperties model = BinaryData.fromString( - "{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"a\",\"agr\"],\"exportRouteTargets\":[\"icxdwyjfo\",\"xwyovcxjsgbip\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"veksbuhoduchvl\",\"crdpibfdyjduss\",\"yszekbhwlka\",\"ggkrehbf\"],\"importIpv6RouteTargets\":[\"ybff\",\"jfiimreoa\",\"sqtaadusrexxfa\"],\"exportIpv4RouteTargets\":[\"wudohzilfm\",\"l\"],\"exportIpv6RouteTargets\":[\"simsfeypofqpmb\",\"yqgs\"]}},\"optionAProperties\":{\"mtu\":1061646976,\"vlanId\":1091258235,\"fabricASN\":1430521984476420074,\"peerASN\":683674077389317859,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2134838093,\"multiplier\":1525053910},\"ingressAclId\":\"htwzmqilr\",\"egressAclId\":\"ysfn\",\"primaryIpv4Prefix\":\"sqywwwmhkru\",\"primaryIpv6Prefix\":\"edrympmlqo\",\"secondaryIpv4Prefix\":\"hzdue\",\"secondaryIpv6Prefix\":\"hapfjiik\"},\"networkToNetworkInterconnectId\":\"diqfliejhpclbi\",\"importRoutePolicyId\":\"fsbw\",\"exportRoutePolicyId\":\"ivbvzi\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"xgoooxzprad\",\"importIpv6RoutePolicyId\":\"kxknpdg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jsugswhgs\",\"exportIpv6RoutePolicyId\":\"dkwwn\"},\"annotation\":\"foct\"}") + "{\"annotation\":\"otxjqfiafcnlrtbf\",\"networkToNetworkInterconnectId\":\"zzcaoijolbuauk\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"eopex\",\"importIpv6RoutePolicyId\":\"xq\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"swyiljpibkgxyxy\",\"exportIpv6RoutePolicyId\":\"xre\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"n\"],\"exportRouteTargets\":[\"wytkujsqy\",\"mmoxfablqgpwbmwh\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"iwrycgnwplrrb\"],\"importIpv6RouteTargets\":[\"tsbbibtic\",\"hqvumspbfs\"],\"exportIpv4RouteTargets\":[\"bbewfcu\",\"fpyyxmzrmtm\",\"wi\",\"uweyyjshcyb\"],\"exportIpv6RouteTargets\":[\"ppoxprcmv\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"jxdiikmoxrezsv\",\"primaryIpv6Prefix\":\"lrxikj\",\"secondaryIpv4Prefix\":\"ywlunpipcwybs\",\"secondaryIpv6Prefix\":\"ncnpat\",\"mtu\":1723251022,\"vlanId\":1197765673,\"fabricASN\":8377870689638642307,\"peerASN\":3049731764529681661,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":2051992962,\"multiplier\":314441452},\"ingressAclId\":\"zwuge\",\"egressAclId\":\"jfccylhtrht\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":351926206,\"threshold\":2077004962,\"idleTimeExpiry\":1784905229}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1650484560,\"threshold\":1223455688,\"idleTimeExpiry\":2006890038}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":715641821,\"multiplier\":745319010},\"ipv4Routes\":[{\"prefix\":\"lokfpmijpdvzv\",\"nextHop\":[\"hwb\",\"qufv\",\"gnrglaqrwyamb\",\"bafeb\"]},{\"prefix\":\"xfkjqutibh\",\"nextHop\":[\"nntrvrkps\",\"bduxvzmlghnys\",\"lpyeu\",\"kppdi\"]},{\"prefix\":\"qb\",\"nextHop\":[\"xvhhyqq\",\"gatxgrznmginmtsd\",\"xch\",\"kibmgjymn\"]},{\"prefix\":\"jca\",\"nextHop\":[\"irwcqzoofjnqjsv\",\"pfbhtleber\",\"yljeknfqnwjjqx\"]}],\"ipv6Routes\":[{\"prefix\":\"dnjrx\",\"nextHop\":[\"rhw\",\"ehycpn\"]},{\"prefix\":\"wawonoehrguql\",\"nextHop\":[\"wafbjzmp\",\"rguyfa\"]},{\"prefix\":\"bko\",\"nextHop\":[\"ygvthrmxkbcjw\",\"dxomrawppk\",\"boozflyacagaed\"]},{\"prefix\":\"oiqclmgdtwgab\",\"nextHop\":[\"f\",\"uz\"]}]}}") .toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("foct", model.annotation()); + Assertions.assertEquals("otxjqfiafcnlrtbf", model.annotation()); + Assertions.assertEquals("zzcaoijolbuauk", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("eopex", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xq", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("swyiljpibkgxyxy", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xre", model.exportRoutePolicy().exportIpv6RoutePolicyId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("a", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("icxdwyjfo", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("veksbuhoduchvl", + Assertions.assertEquals("n", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("wytkujsqy", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("iwrycgnwplrrb", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("ybff", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("wudohzilfm", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("simsfeypofqpmb", - model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("sqywwwmhkru", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("edrympmlqo", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("hzdue", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("hapfjiik", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1061646976, model.optionAProperties().mtu()); - Assertions.assertEquals(1091258235, model.optionAProperties().vlanId()); - Assertions.assertEquals(683674077389317859L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2134838093, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1525053910, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("htwzmqilr", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("ysfn", model.optionAProperties().egressAclId()); - Assertions.assertEquals("diqfliejhpclbi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("fsbw", model.importRoutePolicyId()); - Assertions.assertEquals("ivbvzi", model.exportRoutePolicyId()); - Assertions.assertEquals("xgoooxzprad", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("kxknpdg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jsugswhgs", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dkwwn", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tsbbibtic", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("bbewfcu", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ppoxprcmv", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("jxdiikmoxrezsv", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("lrxikj", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ywlunpipcwybs", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("ncnpat", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1723251022, model.optionAProperties().mtu()); + Assertions.assertEquals(1197765673, model.optionAProperties().vlanId()); + Assertions.assertEquals(3049731764529681661L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(2051992962, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(314441452, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("zwuge", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("jfccylhtrht", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(351926206, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2077004962, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1784905229, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1650484560, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1223455688, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2006890038, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(715641821, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(745319010, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lokfpmijpdvzv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("hwb", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dnjrx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("rhw", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkPatchProperties model = new ExternalNetworkPatchProperties().withAnnotation("foct") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("a", "agr")) - .withExportRouteTargets(Arrays.asList("icxdwyjfo", "xwyovcxjsgbip")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("veksbuhoduchvl", "crdpibfdyjduss", "yszekbhwlka", "ggkrehbf")) - .withImportIpv6RouteTargets(Arrays.asList("ybff", "jfiimreoa", "sqtaadusrexxfa")) - .withExportIpv4RouteTargets(Arrays.asList("wudohzilfm", "l")) - .withExportIpv6RouteTargets(Arrays.asList("simsfeypofqpmb", "yqgs")))) - .withOptionAProperties( - new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("sqywwwmhkru") - .withPrimaryIpv6Prefix("edrympmlqo") - .withSecondaryIpv4Prefix("hzdue") - .withSecondaryIpv6Prefix("hapfjiik") - .withMtu(1061646976) - .withVlanId(1091258235) - .withPeerAsn(683674077389317859L) + ExternalNetworkPatchProperties model + = new ExternalNetworkPatchProperties().withAnnotation("otxjqfiafcnlrtbf") + .withNetworkToNetworkInterconnectId("zzcaoijolbuauk") + .withImportRoutePolicy( + new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("eopex").withImportIpv6RoutePolicyId("xq")) + .withExportRoutePolicy(new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("swyiljpibkgxyxy") + .withExportIpv6RoutePolicyId("xre")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("n")) + .withExportRouteTargets(Arrays.asList("wytkujsqy", "mmoxfablqgpwbmwh")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("iwrycgnwplrrb")) + .withImportIpv6RouteTargets(Arrays.asList("tsbbibtic", "hqvumspbfs")) + .withExportIpv4RouteTargets(Arrays.asList("bbewfcu", "fpyyxmzrmtm", "wi", "uweyyjshcyb")) + .withExportIpv6RouteTargets(Arrays.asList("ppoxprcmv")))) + .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties() + .withPrimaryIpv4Prefix("jxdiikmoxrezsv") + .withPrimaryIpv6Prefix("lrxikj") + .withSecondaryIpv4Prefix("ywlunpipcwybs") + .withSecondaryIpv6Prefix("ncnpat") + .withMtu(1723251022) + .withVlanId(1197765673) + .withPeerAsn(3049731764529681661L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2134838093).withMultiplier(1525053910)) - .withIngressAclId("htwzmqilr") - .withEgressAclId("ysfn")) - .withNetworkToNetworkInterconnectId("diqfliejhpclbi") - .withImportRoutePolicyId("fsbw") - .withExportRoutePolicyId("ivbvzi") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("xgoooxzprad") - .withImportIpv6RoutePolicyId("kxknpdg")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("jsugswhgs").withExportIpv6RoutePolicyId("dkwwn")); + new BfdPatchConfiguration().withIntervalInMilliSeconds(2051992962).withMultiplier(314441452)) + .withIngressAclId("zwuge") + .withEgressAclId("jfccylhtrht") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(351926206) + .withThreshold(2077004962) + .withIdleTimeExpiry(1784905229)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(1650484560) + .withThreshold(1223455688) + .withIdleTimeExpiry(2006890038))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(715641821).withMultiplier(745319010)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("lokfpmijpdvzv") + .withNextHop(Arrays.asList("hwb", "qufv", "gnrglaqrwyamb", "bafeb")), + new StaticRoutePatchProperties().withPrefix("xfkjqutibh") + .withNextHop(Arrays.asList("nntrvrkps", "bduxvzmlghnys", "lpyeu", "kppdi")), + new StaticRoutePatchProperties().withPrefix("qb") + .withNextHop(Arrays.asList("xvhhyqq", "gatxgrznmginmtsd", "xch", "kibmgjymn")), + new StaticRoutePatchProperties().withPrefix("jca") + .withNextHop(Arrays.asList("irwcqzoofjnqjsv", "pfbhtleber", "yljeknfqnwjjqx")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("dnjrx") + .withNextHop(Arrays.asList("rhw", "ehycpn")), + new StaticRoutePatchProperties().withPrefix("wawonoehrguql") + .withNextHop(Arrays.asList("wafbjzmp", "rguyfa")), + new StaticRoutePatchProperties().withPrefix("bko") + .withNextHop(Arrays.asList("ygvthrmxkbcjw", "dxomrawppk", "boozflyacagaed")), + new StaticRoutePatchProperties().withPrefix("oiqclmgdtwgab") + .withNextHop(Arrays.asList("f", "uz"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("foct", model.annotation()); + Assertions.assertEquals("otxjqfiafcnlrtbf", model.annotation()); + Assertions.assertEquals("zzcaoijolbuauk", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("eopex", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xq", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("swyiljpibkgxyxy", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xre", model.exportRoutePolicy().exportIpv6RoutePolicyId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("a", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("icxdwyjfo", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("veksbuhoduchvl", + Assertions.assertEquals("n", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("wytkujsqy", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("iwrycgnwplrrb", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("ybff", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("wudohzilfm", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("simsfeypofqpmb", - model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("sqywwwmhkru", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("edrympmlqo", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("hzdue", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("hapfjiik", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1061646976, model.optionAProperties().mtu()); - Assertions.assertEquals(1091258235, model.optionAProperties().vlanId()); - Assertions.assertEquals(683674077389317859L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2134838093, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1525053910, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("htwzmqilr", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("ysfn", model.optionAProperties().egressAclId()); - Assertions.assertEquals("diqfliejhpclbi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("fsbw", model.importRoutePolicyId()); - Assertions.assertEquals("ivbvzi", model.exportRoutePolicyId()); - Assertions.assertEquals("xgoooxzprad", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("kxknpdg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jsugswhgs", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dkwwn", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tsbbibtic", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("bbewfcu", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ppoxprcmv", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("jxdiikmoxrezsv", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("lrxikj", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ywlunpipcwybs", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("ncnpat", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1723251022, model.optionAProperties().mtu()); + Assertions.assertEquals(1197765673, model.optionAProperties().vlanId()); + Assertions.assertEquals(3049731764529681661L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(2051992962, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(314441452, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("zwuge", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("jfccylhtrht", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(351926206, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2077004962, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1784905229, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1650484560, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1223455688, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2006890038, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(715641821, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(745319010, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lokfpmijpdvzv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("hwb", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dnjrx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("rhw", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java index db51f66229fe..950d5a64c91e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,100 +29,175 @@ public final class ExternalNetworkPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatch model = BinaryData.fromString( - "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"jcirvpefycdvei\",\"itjn\",\"xzajlnsjhwjuyxxb\",\"qvmvuaytuadxkxe\"],\"exportRouteTargets\":[\"pntghyks\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"rnxsluvlzlad\",\"t\",\"kpbqhvfdqqjw\"],\"importIpv6RouteTargets\":[\"wzdanojisgglmvo\",\"atuztjct\",\"bpvbkaehxsmzygd\",\"wakwseivmakxhys\"],\"exportIpv4RouteTargets\":[\"juxlkbectvtfjm\",\"kdch\"],\"exportIpv6RouteTargets\":[\"ubavlzwp\",\"gmfalkzazmgoked\",\"jqafkmkro\"]}},\"optionAProperties\":{\"mtu\":1166672114,\"vlanId\":1260158058,\"fabricASN\":8722355149312613182,\"peerASN\":3410554307267669025,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":543608913,\"multiplier\":1463017039},\"ingressAclId\":\"ixiezeag\",\"egressAclId\":\"eituugedhfpjs\",\"primaryIpv4Prefix\":\"zmblsyjdeol\",\"primaryIpv6Prefix\":\"aebfsyrled\",\"secondaryIpv4Prefix\":\"ustbvtqigdx\",\"secondaryIpv6Prefix\":\"sgeafgfosehx\"},\"networkToNetworkInterconnectId\":\"sxezppkkwaa\",\"importRoutePolicyId\":\"k\",\"exportRoutePolicyId\":\"jlpzeqtoyrp\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"lajmllp\",\"importIpv6RoutePolicyId\":\"evhamfowg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mkekxpkzwaqxo\",\"exportIpv6RoutePolicyId\":\"ovchiqbplvfid\"},\"annotation\":\"ztekxbyjgmsfep\"}}") + "{\"properties\":{\"annotation\":\"d\",\"networkToNetworkInterconnectId\":\"fhtwmmkfqb\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ulwwtrjmeqkvyhz\",\"importIpv6RoutePolicyId\":\"poyu\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ensnaa\",\"exportIpv6RoutePolicyId\":\"hmpoe\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"s\",\"daxjsum\",\"pezco\",\"oyj\"],\"exportRouteTargets\":[\"qzwqdnxke\",\"dcnwmywxfq\",\"kvemyzdpczaqpqi\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ptrwtxzuisamo\"],\"importIpv6RouteTargets\":[\"niz\"],\"exportIpv4RouteTargets\":[\"oqsqjghr\"],\"exportIpv6RouteTargets\":[\"splwsttxs\",\"gxfqpan\",\"ceov\",\"gzwhsxyrujmtik\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"ik\",\"primaryIpv6Prefix\":\"hzixyqhfnkvy\",\"secondaryIpv4Prefix\":\"qqdseipnquwzxhrp\",\"secondaryIpv6Prefix\":\"odlhkfktl\",\"mtu\":1261412863,\"vlanId\":2037435176,\"fabricASN\":4335612262612729235,\"peerASN\":1398888849700020431,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":256924676,\"multiplier\":854952123},\"ingressAclId\":\"xs\",\"egressAclId\":\"uzyigfcvcewbwqhd\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":561691289,\"threshold\":647871855,\"idleTimeExpiry\":1337130064},{\"maximumRoutes\":1279170591,\"threshold\":594666797,\"idleTimeExpiry\":104599977},{\"maximumRoutes\":1840962173,\"threshold\":151077686,\"idleTimeExpiry\":732183019}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":575713175,\"threshold\":1063121774,\"idleTimeExpiry\":1850584063},{\"maximumRoutes\":949323558,\"threshold\":470261023,\"idleTimeExpiry\":330357917},{\"maximumRoutes\":133722418,\"threshold\":819698,\"idleTimeExpiry\":1650141631},{\"maximumRoutes\":925818786,\"threshold\":487914766,\"idleTimeExpiry\":1211463960}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":121145405,\"multiplier\":1933000706},\"ipv4Routes\":[{\"prefix\":\"hp\",\"nextHop\":[\"wvyldqpzf\",\"xsoxi\",\"unjlzkdrocq\",\"xytqq\"]},{\"prefix\":\"cmiwdw\",\"nextHop\":[\"vn\",\"eylajamcajyhft\",\"zcrryklleynqa\",\"hkigglclwalhvub\"]}],\"ipv6Routes\":[{\"prefix\":\"phetxdqc\",\"nextHop\":[\"cta\",\"qzjval\"]},{\"prefix\":\"cx\",\"nextHop\":[\"biwksde\",\"yxsbfpz\",\"oikvntwcz\",\"zwushlcxpblal\"]},{\"prefix\":\"hezpfkissaidqzs\",\"nextHop\":[\"oqdsg\"]}]}}}") .toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("jcirvpefycdvei", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pntghyks", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("rnxsluvlzlad", + Assertions.assertEquals("d", model.annotation()); + Assertions.assertEquals("fhtwmmkfqb", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("ulwwtrjmeqkvyhz", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("poyu", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ensnaa", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hmpoe", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("s", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qzwqdnxke", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("ptrwtxzuisamo", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wzdanojisgglmvo", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("juxlkbectvtfjm", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ubavlzwp", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("zmblsyjdeol", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("aebfsyrled", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ustbvtqigdx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sgeafgfosehx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1166672114, model.optionAProperties().mtu()); - Assertions.assertEquals(1260158058, model.optionAProperties().vlanId()); - Assertions.assertEquals(3410554307267669025L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(543608913, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1463017039, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("ixiezeag", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("eituugedhfpjs", model.optionAProperties().egressAclId()); - Assertions.assertEquals("sxezppkkwaa", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("k", model.importRoutePolicyId()); - Assertions.assertEquals("jlpzeqtoyrp", model.exportRoutePolicyId()); - Assertions.assertEquals("lajmllp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("evhamfowg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ovchiqbplvfid", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ztekxbyjgmsfep", model.annotation()); + Assertions.assertEquals("niz", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("oqsqjghr", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("splwsttxs", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("ik", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("hzixyqhfnkvy", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("qqdseipnquwzxhrp", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("odlhkfktl", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1261412863, model.optionAProperties().mtu()); + Assertions.assertEquals(2037435176, model.optionAProperties().vlanId()); + Assertions.assertEquals(1398888849700020431L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(256924676, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(854952123, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("xs", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("uzyigfcvcewbwqhd", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(561691289, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(647871855, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1337130064, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(575713175, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1063121774, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1850584063, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(121145405, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1933000706, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("hp", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wvyldqpzf", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("phetxdqc", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("cta", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkPatch model = new ExternalNetworkPatch().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("jcirvpefycdvei", "itjn", "xzajlnsjhwjuyxxb", "qvmvuaytuadxkxe")) - .withExportRouteTargets(Arrays.asList("pntghyks")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("rnxsluvlzlad", "t", "kpbqhvfdqqjw")) - .withImportIpv6RouteTargets( - Arrays.asList("wzdanojisgglmvo", "atuztjct", "bpvbkaehxsmzygd", "wakwseivmakxhys")) - .withExportIpv4RouteTargets(Arrays.asList("juxlkbectvtfjm", "kdch")) - .withExportIpv6RouteTargets(Arrays.asList("ubavlzwp", "gmfalkzazmgoked", "jqafkmkro")))) - .withOptionAProperties( - new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("zmblsyjdeol") - .withPrimaryIpv6Prefix("aebfsyrled") - .withSecondaryIpv4Prefix("ustbvtqigdx") - .withSecondaryIpv6Prefix("sgeafgfosehx") - .withMtu(1166672114) - .withVlanId(1260158058) - .withPeerAsn(3410554307267669025L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(543608913).withMultiplier(1463017039)) - .withIngressAclId("ixiezeag") - .withEgressAclId("eituugedhfpjs")) - .withNetworkToNetworkInterconnectId("sxezppkkwaa") - .withImportRoutePolicyId("k") - .withExportRoutePolicyId("jlpzeqtoyrp") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("lajmllp").withImportIpv6RoutePolicyId("evhamfowg")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("mkekxpkzwaqxo") - .withExportIpv6RoutePolicyId("ovchiqbplvfid")) - .withAnnotation("ztekxbyjgmsfep"); + ExternalNetworkPatch model = new ExternalNetworkPatch().withAnnotation("d") + .withNetworkToNetworkInterconnectId("fhtwmmkfqb") + .withImportRoutePolicy(new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("ulwwtrjmeqkvyhz") + .withImportIpv6RoutePolicyId("poyu")) + .withExportRoutePolicy( + new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("ensnaa").withExportIpv6RoutePolicyId("hmpoe")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("s", "daxjsum", "pezco", "oyj")) + .withExportRouteTargets(Arrays.asList("qzwqdnxke", "dcnwmywxfq", "kvemyzdpczaqpqi")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("ptrwtxzuisamo")) + .withImportIpv6RouteTargets(Arrays.asList("niz")) + .withExportIpv4RouteTargets(Arrays.asList("oqsqjghr")) + .withExportIpv6RouteTargets(Arrays.asList("splwsttxs", "gxfqpan", "ceov", "gzwhsxyrujmtik")))) + .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("ik") + .withPrimaryIpv6Prefix("hzixyqhfnkvy") + .withSecondaryIpv4Prefix("qqdseipnquwzxhrp") + .withSecondaryIpv6Prefix("odlhkfktl") + .withMtu(1261412863) + .withVlanId(2037435176) + .withPeerAsn(1398888849700020431L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(256924676).withMultiplier(854952123)) + .withIngressAclId("xs") + .withEgressAclId("uzyigfcvcewbwqhd") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(561691289) + .withThreshold(647871855) + .withIdleTimeExpiry(1337130064), + new PrefixLimitPatchProperties().withMaximumRoutes(1279170591) + .withThreshold(594666797) + .withIdleTimeExpiry(104599977), + new PrefixLimitPatchProperties().withMaximumRoutes(1840962173) + .withThreshold(151077686) + .withIdleTimeExpiry(732183019)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(575713175) + .withThreshold(1063121774) + .withIdleTimeExpiry(1850584063), + new PrefixLimitPatchProperties().withMaximumRoutes(949323558) + .withThreshold(470261023) + .withIdleTimeExpiry(330357917), + new PrefixLimitPatchProperties().withMaximumRoutes(133722418) + .withThreshold(819698) + .withIdleTimeExpiry(1650141631), + new PrefixLimitPatchProperties().withMaximumRoutes(925818786) + .withThreshold(487914766) + .withIdleTimeExpiry(1211463960))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(121145405).withMultiplier(1933000706)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("hp") + .withNextHop(Arrays.asList("wvyldqpzf", "xsoxi", "unjlzkdrocq", "xytqq")), + new StaticRoutePatchProperties().withPrefix("cmiwdw") + .withNextHop(Arrays.asList("vn", "eylajamcajyhft", "zcrryklleynqa", "hkigglclwalhvub")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("phetxdqc").withNextHop(Arrays.asList("cta", "qzjval")), + new StaticRoutePatchProperties().withPrefix("cx") + .withNextHop(Arrays.asList("biwksde", "yxsbfpz", "oikvntwcz", "zwushlcxpblal")), + new StaticRoutePatchProperties().withPrefix("hezpfkissaidqzs") + .withNextHop(Arrays.asList("oqdsg"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("jcirvpefycdvei", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pntghyks", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("rnxsluvlzlad", + Assertions.assertEquals("d", model.annotation()); + Assertions.assertEquals("fhtwmmkfqb", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("ulwwtrjmeqkvyhz", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("poyu", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ensnaa", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hmpoe", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("s", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qzwqdnxke", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("ptrwtxzuisamo", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wzdanojisgglmvo", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("juxlkbectvtfjm", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ubavlzwp", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("zmblsyjdeol", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("aebfsyrled", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ustbvtqigdx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sgeafgfosehx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1166672114, model.optionAProperties().mtu()); - Assertions.assertEquals(1260158058, model.optionAProperties().vlanId()); - Assertions.assertEquals(3410554307267669025L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(543608913, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1463017039, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("ixiezeag", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("eituugedhfpjs", model.optionAProperties().egressAclId()); - Assertions.assertEquals("sxezppkkwaa", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("k", model.importRoutePolicyId()); - Assertions.assertEquals("jlpzeqtoyrp", model.exportRoutePolicyId()); - Assertions.assertEquals("lajmllp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("evhamfowg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ovchiqbplvfid", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ztekxbyjgmsfep", model.annotation()); + Assertions.assertEquals("niz", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("oqsqjghr", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("splwsttxs", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("ik", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("hzixyqhfnkvy", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("qqdseipnquwzxhrp", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("odlhkfktl", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1261412863, model.optionAProperties().mtu()); + Assertions.assertEquals(2037435176, model.optionAProperties().vlanId()); + Assertions.assertEquals(1398888849700020431L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(256924676, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(854952123, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("xs", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("uzyigfcvcewbwqhd", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(561691289, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(647871855, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1337130064, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(575713175, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1063121774, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1850584063, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(121145405, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1933000706, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("hp", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wvyldqpzf", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("phetxdqc", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("cta", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java deleted file mode 100644 index a79f2218ecdf..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPatchableProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"vnyttzgi\",\"importRoutePolicyId\":\"yri\",\"exportRoutePolicyId\":\"gm\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hlqtxnrflkn\",\"importIpv6RoutePolicyId\":\"ndpgfjodhda\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"wfhipxwgsab\",\"exportIpv6RoutePolicyId\":\"ipowza\"}}") - .toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals("vnyttzgi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("yri", model.importRoutePolicyId()); - Assertions.assertEquals("gm", model.exportRoutePolicyId()); - Assertions.assertEquals("hlqtxnrflkn", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ndpgfjodhda", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wfhipxwgsab", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ipowza", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPatchableProperties model - = new ExternalNetworkPatchableProperties().withNetworkToNetworkInterconnectId("vnyttzgi") - .withImportRoutePolicyId("yri") - .withExportRoutePolicyId("gm") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("hlqtxnrflkn") - .withImportIpv6RoutePolicyId("ndpgfjodhda")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("wfhipxwgsab") - .withExportIpv6RoutePolicyId("ipowza")); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals("vnyttzgi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("yri", model.importRoutePolicyId()); - Assertions.assertEquals("gm", model.exportRoutePolicyId()); - Assertions.assertEquals("hlqtxnrflkn", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ndpgfjodhda", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wfhipxwgsab", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ipowza", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java index 1202bef4fa2a..421d459866f1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java @@ -1,58 +1,105 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ExternalNetworkPropertiesOptionAPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPropertiesOptionAProperties model = BinaryData.fromString( - "{\"mtu\":1690809197,\"vlanId\":1533047162,\"fabricASN\":4871207412853091463,\"peerASN\":1534475859485377043,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1116641423,\"multiplier\":1558701655},\"ingressAclId\":\"mzqmzjqrb\",\"egressAclId\":\"vnmdyfoeboj\",\"primaryIpv4Prefix\":\"pp\",\"primaryIpv6Prefix\":\"aohoqkpjtnq\",\"secondaryIpv4Prefix\":\"l\",\"secondaryIpv6Prefix\":\"wkdcwmqs\"}") + "{\"primaryIpv4Prefix\":\"ydzjemexm\",\"primaryIpv6Prefix\":\"kvmuwrxlniwmcp\",\"secondaryIpv4Prefix\":\"rdlhvdvmiphbe\",\"secondaryIpv6Prefix\":\"qjzmhkdcl\",\"mtu\":507684976,\"vlanId\":20410294,\"fabricASN\":3847055497241371094,\"peerASN\":2720856075553187388,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":704383521,\"multiplier\":1874398522},\"ingressAclId\":\"zshxzezbzuz\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"zskejcgwfsgqksty\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":600126050,\"threshold\":924390231,\"idleTimeExpiry\":429677405},{\"maximumRoutes\":573150513,\"threshold\":296798924,\"idleTimeExpiry\":125497840}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":715794491,\"threshold\":1940454197,\"idleTimeExpiry\":897664975},{\"maximumRoutes\":476298609,\"threshold\":1723389232,\"idleTimeExpiry\":1864953529},{\"maximumRoutes\":1024295028,\"threshold\":1998262457,\"idleTimeExpiry\":1418765388}]}}") .toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("pp", model.primaryIpv4Prefix()); - Assertions.assertEquals("aohoqkpjtnq", model.primaryIpv6Prefix()); - Assertions.assertEquals("l", model.secondaryIpv4Prefix()); - Assertions.assertEquals("wkdcwmqs", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1690809197, model.mtu()); - Assertions.assertEquals(1533047162, model.vlanId()); - Assertions.assertEquals(1534475859485377043L, model.peerAsn()); - Assertions.assertEquals(1116641423, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1558701655, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("mzqmzjqrb", model.ingressAclId()); - Assertions.assertEquals("vnmdyfoeboj", model.egressAclId()); + Assertions.assertEquals("ydzjemexm", model.primaryIpv4Prefix()); + Assertions.assertEquals("kvmuwrxlniwmcp", model.primaryIpv6Prefix()); + Assertions.assertEquals("rdlhvdvmiphbe", model.secondaryIpv4Prefix()); + Assertions.assertEquals("qjzmhkdcl", model.secondaryIpv6Prefix()); + Assertions.assertEquals(507684976, model.mtu()); + Assertions.assertEquals(20410294, model.vlanId()); + Assertions.assertEquals(2720856075553187388L, model.peerAsn()); + Assertions.assertEquals(704383521, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1874398522, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("zshxzezbzuz", model.ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals("zskejcgwfsgqksty", model.egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(600126050, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(924390231, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(429677405, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(715794491, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1940454197, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(897664975, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExternalNetworkPropertiesOptionAProperties model - = new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("pp") - .withPrimaryIpv6Prefix("aohoqkpjtnq") - .withSecondaryIpv4Prefix("l") - .withSecondaryIpv6Prefix("wkdcwmqs") - .withMtu(1690809197) - .withVlanId(1533047162) - .withPeerAsn(1534475859485377043L) + = new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("ydzjemexm") + .withPrimaryIpv6Prefix("kvmuwrxlniwmcp") + .withSecondaryIpv4Prefix("rdlhvdvmiphbe") + .withSecondaryIpv6Prefix("qjzmhkdcl") + .withMtu(507684976) + .withVlanId(20410294) + .withPeerAsn(2720856075553187388L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1116641423).withMultiplier(1558701655)) - .withIngressAclId("mzqmzjqrb") - .withEgressAclId("vnmdyfoeboj"); + new BfdConfiguration().withIntervalInMilliSeconds(704383521).withMultiplier(1874398522)) + .withIngressAclId("zshxzezbzuz") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("zskejcgwfsgqksty") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(600126050) + .withThreshold(924390231) + .withIdleTimeExpiry(429677405), + new PrefixLimitProperties().withMaximumRoutes(573150513) + .withThreshold(296798924) + .withIdleTimeExpiry(125497840)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(715794491) + .withThreshold(1940454197) + .withIdleTimeExpiry(897664975), + new PrefixLimitProperties().withMaximumRoutes(476298609) + .withThreshold(1723389232) + .withIdleTimeExpiry(1864953529), + new PrefixLimitProperties().withMaximumRoutes(1024295028) + .withThreshold(1998262457) + .withIdleTimeExpiry(1418765388)))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("pp", model.primaryIpv4Prefix()); - Assertions.assertEquals("aohoqkpjtnq", model.primaryIpv6Prefix()); - Assertions.assertEquals("l", model.secondaryIpv4Prefix()); - Assertions.assertEquals("wkdcwmqs", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1690809197, model.mtu()); - Assertions.assertEquals(1533047162, model.vlanId()); - Assertions.assertEquals(1534475859485377043L, model.peerAsn()); - Assertions.assertEquals(1116641423, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1558701655, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("mzqmzjqrb", model.ingressAclId()); - Assertions.assertEquals("vnmdyfoeboj", model.egressAclId()); + Assertions.assertEquals("ydzjemexm", model.primaryIpv4Prefix()); + Assertions.assertEquals("kvmuwrxlniwmcp", model.primaryIpv6Prefix()); + Assertions.assertEquals("rdlhvdvmiphbe", model.secondaryIpv4Prefix()); + Assertions.assertEquals("qjzmhkdcl", model.secondaryIpv6Prefix()); + Assertions.assertEquals(507684976, model.mtu()); + Assertions.assertEquals(20410294, model.vlanId()); + Assertions.assertEquals(2720856075553187388L, model.peerAsn()); + Assertions.assertEquals(704383521, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1874398522, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("zshxzezbzuz", model.ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals("zskejcgwfsgqksty", model.egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(600126050, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(924390231, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(429677405, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(715794491, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1940454197, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(897664975, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java index 11512f7c6322..fe4a14016e2a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,98 +29,170 @@ public final class ExternalNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkProperties model = BinaryData.fromString( - "{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"yzbfvxovqkx\",\"uxqggvqrnhyhl\",\"cjsqggjhffbxr\",\"rkijpeuqlsdxeqz\"],\"exportRouteTargets\":[\"wmwwmjswen\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"me\",\"leqioulndh\"],\"importIpv6RouteTargets\":[\"eojhtollhsvi\",\"mytzln\"],\"exportIpv4RouteTargets\":[\"pnovyoanfbcs\"],\"exportIpv6RouteTargets\":[\"gywvtxig\"]}},\"optionAProperties\":{\"mtu\":1582673883,\"vlanId\":1788188155,\"fabricASN\":3343774067436674244,\"peerASN\":2937989151061187405,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2082895999,\"multiplier\":49091821},\"ingressAclId\":\"qnucs\",\"egressAclId\":\"hsidsjtdlpbnin\",\"primaryIpv4Prefix\":\"azlsvbzfcpuo\",\"primaryIpv6Prefix\":\"dwjcciklhs\",\"secondaryIpv4Prefix\":\"krdre\",\"secondaryIpv6Prefix\":\"olr\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"vdlhydwbdbfgr\",\"importRoutePolicyId\":\"unytjlkesm\",\"exportRoutePolicyId\":\"athu\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"h\",\"importIpv6RoutePolicyId\":\"an\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"llbvgwzsfftedous\",\"exportIpv6RoutePolicyId\":\"tjtgravaqogfkb\"},\"annotation\":\"auzlqbtxxw\"}") + "{\"annotation\":\"fpcfjf\",\"networkToNetworkInterconnectId\":\"lgzawkgyepeyamnn\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"diawpzxkzr\",\"importIpv6RoutePolicyId\":\"mkctdhuo\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qp\",\"exportIpv6RoutePolicyId\":\"azihq\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"cnbhcb\",\"jkz\",\"ibniynts\"],\"exportRouteTargets\":[\"fmeftvhk\",\"o\",\"gjrhs\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"mjgrulcfog\",\"hcxnwjtpfdzxco\"],\"importIpv6RouteTargets\":[\"wofw\",\"k\",\"kzkdtzxsoednlwg\",\"ihezomucmq\"],\"exportIpv4RouteTargets\":[\"nione\"],\"exportIpv6RouteTargets\":[\"dr\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"enx\",\"primaryIpv6Prefix\":\"tlzlmtrlxcznnhz\",\"secondaryIpv4Prefix\":\"nbmxlx\",\"secondaryIpv6Prefix\":\"tygeqzus\",\"mtu\":1102100934,\"vlanId\":1377733869,\"fabricASN\":6819072177087454892,\"peerASN\":4845256469714039443,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1957504225,\"multiplier\":127365455},\"ingressAclId\":\"srfwsszvlcwl\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"egressAclId\":\"tfx\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":690611810,\"threshold\":1996694399,\"idleTimeExpiry\":1847045848},{\"maximumRoutes\":778853988,\"threshold\":138535148,\"idleTimeExpiry\":762861570},{\"maximumRoutes\":2040101098,\"threshold\":525661033,\"idleTimeExpiry\":1165412558},{\"maximumRoutes\":2015574706,\"threshold\":762009663,\"idleTimeExpiry\":625721867}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":105088450,\"threshold\":1879229555,\"idleTimeExpiry\":1592630526},{\"maximumRoutes\":1813490866,\"threshold\":190480311,\"idleTimeExpiry\":1964281386},{\"maximumRoutes\":989738375,\"threshold\":1413350908,\"idleTimeExpiry\":2048780189}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1648037202,\"multiplier\":1932822411},\"ipv4Routes\":[{\"prefix\":\"c\",\"nextHop\":[\"tfshksnyzm\",\"pamwbw\",\"bnl\",\"lcefiqdktw\"]}],\"ipv6Routes\":[{\"prefix\":\"ih\",\"nextHop\":[\"fliwoynguuzhwvl\",\"dpcmhjh\"]},{\"prefix\":\"usybke\",\"nextHop\":[\"m\"]}]},\"lastOperation\":{\"details\":\"tsilscvqsyei\"},\"networkFabricId\":\"fymkouih\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("auzlqbtxxw", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("yzbfvxovqkx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("wmwwmjswen", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("me", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("eojhtollhsvi", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("pnovyoanfbcs", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("gywvtxig", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("azlsvbzfcpuo", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwjcciklhs", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("krdre", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("olr", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1582673883, model.optionAProperties().mtu()); - Assertions.assertEquals(1788188155, model.optionAProperties().vlanId()); - Assertions.assertEquals(2937989151061187405L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2082895999, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(49091821, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("qnucs", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("hsidsjtdlpbnin", model.optionAProperties().egressAclId()); - Assertions.assertEquals("vdlhydwbdbfgr", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("unytjlkesm", model.importRoutePolicyId()); - Assertions.assertEquals("athu", model.exportRoutePolicyId()); - Assertions.assertEquals("h", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("an", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("llbvgwzsfftedous", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tjtgravaqogfkb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("fpcfjf", model.annotation()); + Assertions.assertEquals("lgzawkgyepeyamnn", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("diawpzxkzr", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mkctdhuo", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("qp", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("azihq", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("cnbhcb", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("fmeftvhk", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("mjgrulcfog", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("wofw", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("nione", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dr", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("enx", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("tlzlmtrlxcznnhz", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("nbmxlx", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tygeqzus", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1102100934, model.optionAProperties().mtu()); + Assertions.assertEquals(1377733869, model.optionAProperties().vlanId()); + Assertions.assertEquals(4845256469714039443L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(1957504225, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(127365455, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("srfwsszvlcwl", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("tfx", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(690611810, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1996694399, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847045848, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(105088450, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1879229555, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1592630526, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1648037202, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1932822411, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("c", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("tfshksnyzm", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ih", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("fliwoynguuzhwvl", + model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkProperties model = new ExternalNetworkProperties().withAnnotation("auzlqbtxxw") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets( - Arrays.asList("yzbfvxovqkx", "uxqggvqrnhyhl", "cjsqggjhffbxr", "rkijpeuqlsdxeqz")) - .withExportRouteTargets(Arrays.asList("wmwwmjswen")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("me", "leqioulndh")) - .withImportIpv6RouteTargets(Arrays.asList("eojhtollhsvi", "mytzln")) - .withExportIpv4RouteTargets(Arrays.asList("pnovyoanfbcs")) - .withExportIpv6RouteTargets(Arrays.asList("gywvtxig")))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("azlsvbzfcpuo") - .withPrimaryIpv6Prefix("dwjcciklhs") - .withSecondaryIpv4Prefix("krdre") - .withSecondaryIpv6Prefix("olr") - .withMtu(1582673883) - .withVlanId(1788188155) - .withPeerAsn(2937989151061187405L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2082895999).withMultiplier(49091821)) - .withIngressAclId("qnucs") - .withEgressAclId("hsidsjtdlpbnin")) - .withNetworkToNetworkInterconnectId("vdlhydwbdbfgr") - .withImportRoutePolicyId("unytjlkesm") - .withExportRoutePolicyId("athu") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("h").withImportIpv6RoutePolicyId("an")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("llbvgwzsfftedous") - .withExportIpv6RoutePolicyId("tjtgravaqogfkb")); + ExternalNetworkProperties model = new ExternalNetworkProperties().withAnnotation("fpcfjf") + .withNetworkToNetworkInterconnectId("lgzawkgyepeyamnn") + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("diawpzxkzr") + .withImportIpv6RoutePolicyId("mkctdhuo")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("qp").withExportIpv6RoutePolicyId("azihq")) + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties( + new L3OptionBProperties().withImportRouteTargets(Arrays.asList("cnbhcb", "jkz", "ibniynts")) + .withExportRouteTargets(Arrays.asList("fmeftvhk", "o", "gjrhs")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("mjgrulcfog", "hcxnwjtpfdzxco")) + .withImportIpv6RouteTargets(Arrays.asList("wofw", "k", "kzkdtzxsoednlwg", "ihezomucmq")) + .withExportIpv4RouteTargets(Arrays.asList("nione")) + .withExportIpv6RouteTargets(Arrays.asList("dr")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("enx") + .withPrimaryIpv6Prefix("tlzlmtrlxcznnhz") + .withSecondaryIpv4Prefix("nbmxlx") + .withSecondaryIpv6Prefix("tygeqzus") + .withMtu(1102100934) + .withVlanId(1377733869) + .withPeerAsn(4845256469714039443L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1957504225).withMultiplier(127365455)) + .withIngressAclId("srfwsszvlcwl") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withEgressAclId("tfx") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(690611810) + .withThreshold(1996694399) + .withIdleTimeExpiry(1847045848), + new PrefixLimitProperties().withMaximumRoutes(778853988) + .withThreshold(138535148) + .withIdleTimeExpiry(762861570), + new PrefixLimitProperties().withMaximumRoutes(2040101098) + .withThreshold(525661033) + .withIdleTimeExpiry(1165412558), + new PrefixLimitProperties().withMaximumRoutes(2015574706) + .withThreshold(762009663) + .withIdleTimeExpiry(625721867)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(105088450) + .withThreshold(1879229555) + .withIdleTimeExpiry(1592630526), + new PrefixLimitProperties().withMaximumRoutes(1813490866) + .withThreshold(190480311) + .withIdleTimeExpiry(1964281386), + new PrefixLimitProperties().withMaximumRoutes(989738375) + .withThreshold(1413350908) + .withIdleTimeExpiry(2048780189))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1648037202).withMultiplier(1932822411)) + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("c") + .withNextHop(Arrays.asList("tfshksnyzm", "pamwbw", "bnl", "lcefiqdktw")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("ih") + .withNextHop(Arrays.asList("fliwoynguuzhwvl", "dpcmhjh")), + new StaticRouteProperties().withPrefix("usybke").withNextHop(Arrays.asList("m"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("auzlqbtxxw", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("yzbfvxovqkx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("wmwwmjswen", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("me", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("eojhtollhsvi", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("pnovyoanfbcs", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("gywvtxig", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("azlsvbzfcpuo", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwjcciklhs", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("krdre", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("olr", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1582673883, model.optionAProperties().mtu()); - Assertions.assertEquals(1788188155, model.optionAProperties().vlanId()); - Assertions.assertEquals(2937989151061187405L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2082895999, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(49091821, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("qnucs", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("hsidsjtdlpbnin", model.optionAProperties().egressAclId()); - Assertions.assertEquals("vdlhydwbdbfgr", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("unytjlkesm", model.importRoutePolicyId()); - Assertions.assertEquals("athu", model.exportRoutePolicyId()); - Assertions.assertEquals("h", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("an", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("llbvgwzsfftedous", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tjtgravaqogfkb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("fpcfjf", model.annotation()); + Assertions.assertEquals("lgzawkgyepeyamnn", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("diawpzxkzr", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mkctdhuo", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("qp", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("azihq", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("cnbhcb", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("fmeftvhk", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("mjgrulcfog", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("wofw", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("nione", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dr", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("enx", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("tlzlmtrlxcznnhz", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("nbmxlx", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tygeqzus", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1102100934, model.optionAProperties().mtu()); + Assertions.assertEquals(1377733869, model.optionAProperties().vlanId()); + Assertions.assertEquals(4845256469714039443L, model.optionAProperties().peerAsn()); + Assertions.assertEquals(1957504225, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(127365455, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("srfwsszvlcwl", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("tfx", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(690611810, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1996694399, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847045848, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(105088450, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1879229555, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1592630526, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1648037202, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1932822411, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("c", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("tfshksnyzm", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ih", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("fliwoynguuzhwvl", + model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java new file mode 100644 index 000000000000..c4352764754b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkStaticRouteConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkStaticRouteConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1774178177,\"multiplier\":1546981752},\"ipv4Routes\":[{\"prefix\":\"ajbvbn\",\"nextHop\":[\"demdidackzi\",\"gzwdydamis\",\"pztdivyk\"]},{\"prefix\":\"xkqejtpjfojiunr\",\"nextHop\":[\"hxuk\",\"sykdtoi\",\"oancdrco\",\"nvxuldxonckb\"]},{\"prefix\":\"lblfxlupibaqzizx\",\"nextHop\":[\"zweghlwwbogvg\",\"klqiyndveqel\",\"b\"]},{\"prefix\":\"vd\",\"nextHop\":[\"rk\",\"xsg\",\"znsvlrd\",\"movpimyndnoxax\"]}],\"ipv6Routes\":[{\"prefix\":\"aqotnndxolousdv\",\"nextHop\":[\"ptqmawzjdrpiz\"]},{\"prefix\":\"ulgyctsdbtqgku\",\"nextHop\":[\"sooxrqw\",\"eurbtigapdyarik\"]}]}") + .toObject(ExternalNetworkStaticRouteConfiguration.class); + Assertions.assertEquals(1774178177, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1546981752, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ajbvbn", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("demdidackzi", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("aqotnndxolousdv", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ptqmawzjdrpiz", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkStaticRouteConfiguration model = new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1774178177).withMultiplier(1546981752)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("ajbvbn") + .withNextHop(Arrays.asList("demdidackzi", "gzwdydamis", "pztdivyk")), + new StaticRouteProperties().withPrefix("xkqejtpjfojiunr") + .withNextHop(Arrays.asList("hxuk", "sykdtoi", "oancdrco", "nvxuldxonckb")), + new StaticRouteProperties().withPrefix("lblfxlupibaqzizx") + .withNextHop(Arrays.asList("zweghlwwbogvg", "klqiyndveqel", "b")), + new StaticRouteProperties().withPrefix("vd") + .withNextHop(Arrays.asList("rk", "xsg", "znsvlrd", "movpimyndnoxax")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("aqotnndxolousdv").withNextHop(Arrays.asList("ptqmawzjdrpiz")), + new StaticRouteProperties().withPrefix("ulgyctsdbtqgku") + .withNextHop(Arrays.asList("sooxrqw", "eurbtigapdyarik")))); + model = BinaryData.fromObject(model).toObject(ExternalNetworkStaticRouteConfiguration.class); + Assertions.assertEquals(1774178177, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1546981752, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ajbvbn", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("demdidackzi", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("aqotnndxolousdv", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ptqmawzjdrpiz", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..ef9593a500f0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkStaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkStaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":529152157,\"multiplier\":494808087},\"ipv4Routes\":[{\"prefix\":\"shlojermh\",\"nextHop\":[\"csbfdjhyaaknyu\",\"ibxiglhph\",\"wxqtejpiilh\",\"tozyagjjnxkb\"]},{\"prefix\":\"lh\",\"nextHop\":[\"xgffklvq\"]}],\"ipv6Routes\":[{\"prefix\":\"trdgscnvqeons\",\"nextHop\":[\"wxlwme\",\"yohxpth\"]},{\"prefix\":\"eopvkvtwf\",\"nextHop\":[\"sobpbo\",\"hmmlc\",\"yarnggcjfwblqhxk\"]}]}") + .toObject(ExternalNetworkStaticRoutePatchConfiguration.class); + Assertions.assertEquals(529152157, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(494808087, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("shlojermh", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("csbfdjhyaaknyu", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("trdgscnvqeons", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wxlwme", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkStaticRoutePatchConfiguration model = new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(529152157).withMultiplier(494808087)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("shlojermh") + .withNextHop(Arrays.asList("csbfdjhyaaknyu", "ibxiglhph", "wxqtejpiilh", "tozyagjjnxkb")), + new StaticRoutePatchProperties().withPrefix("lh").withNextHop(Arrays.asList("xgffklvq")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("trdgscnvqeons") + .withNextHop(Arrays.asList("wxlwme", "yohxpth")), + new StaticRoutePatchProperties().withPrefix("eopvkvtwf") + .withNextHop(Arrays.asList("sobpbo", "hmmlc", "yarnggcjfwblqhxk")))); + model = BinaryData.fromObject(model).toObject(ExternalNetworkStaticRoutePatchConfiguration.class); + Assertions.assertEquals(529152157, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(494808087, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("shlojermh", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("csbfdjhyaaknyu", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("trdgscnvqeons", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wxlwme", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..b94a58d0c482 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateRequestTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkUpdateBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkUpdateBfdAdministrativeStateRequest model + = BinaryData.fromString("{\"routeType\":\"Static\",\"administrativeState\":\"Enabled\"}") + .toObject(ExternalNetworkUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(ExternalNetworkRouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkUpdateBfdAdministrativeStateRequest model + = new ExternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.ENABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(ExternalNetworkRouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java new file mode 100644 index 000000000000..4be34475a22f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkUpdateBfdAdministrativeStateResponseProperties model + = BinaryData.fromString("{\"routeType\":\"Static\",\"administrativeState\":\"Disabled\"}") + .toObject(ExternalNetworkUpdateBfdAdministrativeStateResponseProperties.class); + Assertions.assertEquals(ExternalNetworkRouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.DISABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java index 10e42a8b2696..08cc8b04d791 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java @@ -1,23 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -29,74 +38,99 @@ public final class ExternalNetworksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"b\"],\"exportRouteTargets\":[\"kdium\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"xwkscw\",\"shfihvlmsc\",\"ylaulpuex\",\"igxztyecxdslsp\"],\"importIpv6RouteTargets\":[\"d\",\"fyhsb\"],\"exportIpv4RouteTargets\":[\"lvsvsylt\",\"prqtfk\"],\"exportIpv6RouteTargets\":[\"rk\",\"monxdwfcuhbgftf\",\"qukkmvzeneg\",\"dqrjylwqqsemjhh\"]}},\"optionAProperties\":{\"mtu\":1599997113,\"vlanId\":896629323,\"fabricASN\":5038093681676520074,\"peerASN\":9185497905507567277,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":977899252,\"multiplier\":1091646992},\"ingressAclId\":\"pfzwufifnj\",\"egressAclId\":\"hmjkykqf\",\"primaryIpv4Prefix\":\"mcyk\",\"primaryIpv6Prefix\":\"ysmkbndnrihpja\",\"secondaryIpv4Prefix\":\"cbeejnoignydlkr\",\"secondaryIpv6Prefix\":\"sbnmrmhkipjardvd\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"a\",\"importRoutePolicyId\":\"npbie\",\"exportRoutePolicyId\":\"unddvjlpbjszqj\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"jvaycxrwknsb\",\"importIpv6RoutePolicyId\":\"ypbrzwi\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"cyhkecebtpgvut\",\"exportIpv6RoutePolicyId\":\"usfdywqrq\"},\"annotation\":\"wkendgr\"},\"id\":\"ff\",\"name\":\"xqqnugt\",\"type\":\"uyuwgnyj\"}"; + = "{\"properties\":{\"annotation\":\"wifbdwyvvcywb\",\"networkToNetworkInterconnectId\":\"kthrexzvej\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"uiklokeqeowbpi\",\"importIpv6RoutePolicyId\":\"hvg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gotgwerbpobvjhu\",\"exportIpv6RoutePolicyId\":\"c\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"iv\",\"mdtkllqhzn\",\"trxomztrnni\"],\"exportRouteTargets\":[\"ezjhyxiqfoq\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ykqfserls\",\"ipshhetagwm\",\"gvnojgmobkaligoi\",\"kehpdssvlubdp\"],\"importIpv6RouteTargets\":[\"xsxbxd\",\"mixu\",\"cekcqmjqqauft\",\"hmtbu\"],\"exportIpv4RouteTargets\":[\"nkgh\",\"r\",\"irshl\",\"eayodrvwnqb\"],\"exportIpv6RouteTargets\":[\"off\",\"xzovbhqelssl\",\"xejpo\",\"sgigs\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"xndyjwmglgstrzf\",\"primaryIpv6Prefix\":\"hdzovkbcb\",\"secondaryIpv4Prefix\":\"ohnymfhmlji\",\"secondaryIpv6Prefix\":\"gfvzvmtjcxig\",\"mtu\":940055464,\"vlanId\":218661742,\"fabricASN\":1705421450293985295,\"peerASN\":8880950716619598730,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1234355189,\"multiplier\":1267352570},\"ingressAclId\":\"ugizwy\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"tbdxtvl\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1758501325,\"multiplier\":1077740964},\"ipv4Routes\":[{\"prefix\":\"tutet\",\"nextHop\":[\"gcidbrjwi\",\"ouepaqnfy\",\"grcmcqppledx\"]},{\"prefix\":\"ecttub\",\"nextHop\":[\"el\",\"trvdzhwpxpscwy\"]},{\"prefix\":\"tslfc\",\"nextHop\":[\"avysfmndr\",\"qqjkegbmldkcih\",\"rz\",\"h\"]}],\"ipv6Routes\":[{\"prefix\":\"hjkwfolpjrepah\",\"nextHop\":[\"iranxqnzssvn\",\"dtqykz\"]},{\"prefix\":\"wdoq\",\"nextHop\":[\"jltrnqxicyoz\",\"yo\",\"mfrxfx\"]},{\"prefix\":\"cjialvchfumlfgm\",\"nextHop\":[\"xxkokipklfwnhfk\",\"qlrt\",\"fswqdkv\",\"jitbnhglrvlarozs\"]}]},\"lastOperation\":{\"details\":\"crza\"},\"networkFabricId\":\"sdxtwqquk\",\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"kbksltunrwxsq\",\"name\":\"xlupccfwqisou\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExternalNetwork response = manager.externalNetworks() - .define("fnatntmcaxbqpm") - .withExistingL3IsolationDomain("y", "yhutwedigivktecc") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("qcnb")) - .withExportRouteTargets(Arrays.asList("tghnmelzvrchm")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("rmwy", "h", "iyplgqqqgrbrhh")) - .withImportIpv6RouteTargets(Arrays.asList("gtip", "aoylwhfm", "bweasgypjixd")) - .withExportIpv4RouteTargets(Arrays.asList("ad", "d", "qeuwdvclsxdqdch", "zibixrgsrwxxqkwa")) - .withExportIpv6RouteTargets(Arrays.asList("b", "dgosijiqexqw")))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("cocdxvbeqzjd") - .withPrimaryIpv6Prefix("tutpdwnee") - .withSecondaryIpv4Prefix("ytlxugjr") - .withSecondaryIpv6Prefix("nffaofkvfruxzkfb") - .withMtu(376721612) - .withVlanId(1278621206) - .withPeerAsn(3208270147193306727L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(850094035).withMultiplier(1851940928)) - .withIngressAclId("kvthwtamvmb") - .withEgressAclId("vxhfmuhkezuuc")) - .withNetworkToNetworkInterconnectId("stvymdqaymqmyrnz") - .withImportRoutePolicyId("bqkfnoxhvo") - .withExportRoutePolicyId("dgfkrqsjrvpakxr") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("xwejuguvnx") - .withImportIpv6RoutePolicyId("hpzurnzoytkbead")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("nrozo") - .withExportIpv6RoutePolicyId("oxcbpkiwseac")) - .withAnnotation("axdrpanhsxw") + .define("nitrmzvnrfkzn") + .withExistingL3IsolationDomain("jkahdofshgmqx", "op") + .withPeeringOption(PeeringOption.OPTIONB) + .withAnnotation("ittbmo") + .withNetworkToNetworkInterconnectId("xhwpgkrnxrj") + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("ogcnzfgqibb").withImportIpv6RoutePolicyId("l")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("hztufw").withExportIpv6RoutePolicyId("sfjj")) + .withOptionBProperties( + new L3OptionBProperties().withImportRouteTargets(Arrays.asList("rbuyd", "yhknttk", "rbl")) + .withExportRouteTargets(Arrays.asList("njstiwdeo")) + .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("ikjfjibu")) + .withImportIpv6RouteTargets(Arrays.asList("pojujpifxtg", "xav", "jx")) + .withExportIpv4RouteTargets(Arrays.asList("xolau")) + .withExportIpv6RouteTargets(Arrays.asList("chphovu", "r", "czwcxlnc")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("wf") + .withPrimaryIpv6Prefix("ria") + .withSecondaryIpv4Prefix("wwsgdkbdozsspfw") + .withSecondaryIpv6Prefix("cortox") + .withMtu(397735090) + .withVlanId(278440878) + .withPeerAsn(570702581351478326L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(970452392).withMultiplier(863158060)) + .withIngressAclId("oknvyilhoso") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withEgressAclId("gs") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties(), new PrefixLimitProperties(), new PrefixLimitProperties()))) + .withNativeIpv6PrefixLimit( + new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList(new PrefixLimitProperties())))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(940409873).withMultiplier(1752650070)) + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("hbraruk") + .withNextHop(Arrays.asList("psxufyqcqfou", "ye", "xgxbgochpxps", "pwwsiooz")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("bdkxlwcku").withNextHop(Arrays.asList("zkzjjtapvqjebtd")), + new StaticRouteProperties().withPrefix("sgkeexsozpkvy") + .withNextHop(Arrays.asList("tytwtfqpmpyww", "buk", "mjc", "doecdq")), + new StaticRouteProperties().withPrefix("nc").withNextHop(Arrays.asList("cocchdxjrrb", "rbn"))))) .create(); - Assertions.assertEquals(PeeringOption.OPTIONB, response.peeringOption()); - Assertions.assertEquals("b", response.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("kdium", response.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("xwkscw", response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("d", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lvsvsylt", - response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("rk", response.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("mcyk", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("ysmkbndnrihpja", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("cbeejnoignydlkr", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sbnmrmhkipjardvd", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1599997113, response.optionAProperties().mtu()); - Assertions.assertEquals(896629323, response.optionAProperties().vlanId()); - Assertions.assertEquals(9185497905507567277L, response.optionAProperties().peerAsn()); - Assertions.assertEquals(977899252, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1091646992, response.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("pfzwufifnj", response.optionAProperties().ingressAclId()); - Assertions.assertEquals("hmjkykqf", response.optionAProperties().egressAclId()); - Assertions.assertEquals("a", response.networkToNetworkInterconnectId()); - Assertions.assertEquals("npbie", response.importRoutePolicyId()); - Assertions.assertEquals("unddvjlpbjszqj", response.exportRoutePolicyId()); - Assertions.assertEquals("jvaycxrwknsb", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ypbrzwi", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("cyhkecebtpgvut", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("usfdywqrq", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wkendgr", response.annotation()); + Assertions.assertEquals("wifbdwyvvcywb", response.annotation()); + Assertions.assertEquals("kthrexzvej", response.networkToNetworkInterconnectId()); + Assertions.assertEquals("uiklokeqeowbpi", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("hvg", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("gotgwerbpobvjhu", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("c", response.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, response.peeringOption()); + Assertions.assertEquals("iv", response.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("ezjhyxiqfoq", response.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("ykqfserls", + response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xsxbxd", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("nkgh", response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("off", response.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("xndyjwmglgstrzf", response.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("hdzovkbcb", response.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ohnymfhmlji", response.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("gfvzvmtjcxig", response.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(940055464, response.optionAProperties().mtu()); + Assertions.assertEquals(218661742, response.optionAProperties().vlanId()); + Assertions.assertEquals(8880950716619598730L, response.optionAProperties().peerAsn()); + Assertions.assertEquals(1234355189, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1267352570, response.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("ugizwy", response.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("tbdxtvl", response.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, response.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, response.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1758501325, + response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1077740964, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("tutet", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gcidbrjwi", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("hjkwfolpjrepah", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("iranxqnzssvn", + response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java index b372f1affa16..242b7ab2d53a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,46 +25,56 @@ public final class ExternalNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"gdungaypx\",\"a\",\"bxsnx\",\"ksznf\"],\"exportRouteTargets\":[\"prvgrandzkt\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"pczlqbo\",\"mzgmrolh\"],\"importIpv6RouteTargets\":[\"dkhx\",\"ev\"],\"exportIpv4RouteTargets\":[\"nbwaxadxgnp\",\"htuhalpq\",\"ld\"],\"exportIpv6RouteTargets\":[\"kexznpnytkqjarl\"]}},\"optionAProperties\":{\"mtu\":1673458542,\"vlanId\":1381920113,\"fabricASN\":1720411984017904155,\"peerASN\":2629702164412375511,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":773691533,\"multiplier\":1218418747},\"ingressAclId\":\"gxuupc\",\"egressAclId\":\"gqnaidvss\",\"primaryIpv4Prefix\":\"yoggkztzttjnkn\",\"primaryIpv6Prefix\":\"qgzkuobc\",\"secondaryIpv4Prefix\":\"bna\",\"secondaryIpv6Prefix\":\"iz\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"pnnh\",\"importRoutePolicyId\":\"mkffeonmnvm\",\"exportRoutePolicyId\":\"yiqywlpxmli\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"egcr\",\"importIpv6RoutePolicyId\":\"bkilxstekbirhyv\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vriemors\",\"exportIpv6RoutePolicyId\":\"fiukltr\"},\"annotation\":\"ioguoxcsdqo\"},\"id\":\"denmjogx\",\"name\":\"rggyci\",\"type\":\"bnqinrsxvvm\"}"; + = "{\"properties\":{\"annotation\":\"gkouenpgkxyrs\",\"networkToNetworkInterconnectId\":\"b\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ek\",\"importIpv6RoutePolicyId\":\"o\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qvuwsq\",\"exportIpv6RoutePolicyId\":\"qsgyrznostngx\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"zjnkgdsursumb\",\"irkb\",\"qpsvoxs\",\"xumuuyblolruf\"],\"exportRouteTargets\":[\"blbqxlsam\",\"yjqhwsojnbb\",\"gvmowyzxqhuhmldh\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"kfuz\"],\"importIpv6RouteTargets\":[\"o\",\"dztqhqhwpuaermaw\",\"lnsdazqcem\"],\"exportIpv4RouteTargets\":[\"wfuo\",\"hisxz\",\"ikvdfszxbupsx\"],\"exportIpv6RouteTargets\":[\"pgxcgqkhy\",\"tajwkrxmz\",\"mwfncwlw\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"zbomjbyssprkbz\",\"primaryIpv6Prefix\":\"ljwfncsaa\",\"secondaryIpv4Prefix\":\"cpgz\",\"secondaryIpv6Prefix\":\"rgppqajdmju\",\"mtu\":1245506135,\"vlanId\":1288708214,\"fabricASN\":1123188104726339948,\"peerASN\":6146836555586788114,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1687879727,\"multiplier\":1680643768},\"ingressAclId\":\"etbzfwfuxdtp\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"egressAclId\":\"edlclxx\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":764871693,\"multiplier\":721638961},\"ipv4Routes\":[{\"prefix\":\"b\",\"nextHop\":[\"hdjbyfdfuaj\",\"hpyylekubiwv\"]},{\"prefix\":\"vzznyjqbwxpwjvf\",\"nextHop\":[\"loquttkb\",\"wgjupjbdq\"]},{\"prefix\":\"nkiaj\",\"nextHop\":[\"shupxjttnurk\",\"erqzapuwom\",\"vqvvtjwdlduvimg\",\"ceormxoxtapaf\"]},{\"prefix\":\"jvbkjtg\",\"nextHop\":[\"cptavcipydnuj\",\"blskizpr\"]}],\"ipv6Routes\":[{\"prefix\":\"a\",\"nextHop\":[\"jxdrgxpuxpzslmf\",\"ypzrycchqzkfges\"]},{\"prefix\":\"zgszjhekbmd\",\"nextHop\":[\"hioj\"]},{\"prefix\":\"rhgpityeuv\",\"nextHop\":[\"sbmebfgbzn\",\"ihbkupae\"]}]},\"lastOperation\":{\"details\":\"ftvyzuyqzjfvb\"},\"networkFabricId\":\"yjvzlscyzvvsxmy\",\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"id\":\"heixazebmmjaigax\",\"name\":\"qiparctshe\",\"type\":\"gtdvhokx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExternalNetwork response = manager.externalNetworks() - .getWithResponse("vrsksdzmhwt", "yppwfbwoet", "izrf", com.azure.core.util.Context.NONE) + .getWithResponse("rvzhfjqpxydpamc", "zm", "rhccdgunsjssreo", com.azure.core.util.Context.NONE) .getValue(); + Assertions.assertEquals("gkouenpgkxyrs", response.annotation()); + Assertions.assertEquals("b", response.networkToNetworkInterconnectId()); + Assertions.assertEquals("ek", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("o", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("qvuwsq", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qsgyrznostngx", response.exportRoutePolicy().exportIpv6RoutePolicyId()); Assertions.assertEquals(PeeringOption.OPTIONA, response.peeringOption()); - Assertions.assertEquals("gdungaypx", response.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("prvgrandzkt", response.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("pczlqbo", response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("dkhx", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("nbwaxadxgnp", - response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("kexznpnytkqjarl", + Assertions.assertEquals("zjnkgdsursumb", response.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("blbqxlsam", response.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("kfuz", response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("o", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("wfuo", response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("pgxcgqkhy", response.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("yoggkztzttjnkn", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("qgzkuobc", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("bna", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("iz", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1673458542, response.optionAProperties().mtu()); - Assertions.assertEquals(1381920113, response.optionAProperties().vlanId()); - Assertions.assertEquals(2629702164412375511L, response.optionAProperties().peerAsn()); - Assertions.assertEquals(773691533, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1218418747, response.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxuupc", response.optionAProperties().ingressAclId()); - Assertions.assertEquals("gqnaidvss", response.optionAProperties().egressAclId()); - Assertions.assertEquals("pnnh", response.networkToNetworkInterconnectId()); - Assertions.assertEquals("mkffeonmnvm", response.importRoutePolicyId()); - Assertions.assertEquals("yiqywlpxmli", response.exportRoutePolicyId()); - Assertions.assertEquals("egcr", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("bkilxstekbirhyv", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("vriemors", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fiukltr", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ioguoxcsdqo", response.annotation()); + Assertions.assertEquals("zbomjbyssprkbz", response.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ljwfncsaa", response.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("cpgz", response.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("rgppqajdmju", response.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1245506135, response.optionAProperties().mtu()); + Assertions.assertEquals(1288708214, response.optionAProperties().vlanId()); + Assertions.assertEquals(6146836555586788114L, response.optionAProperties().peerAsn()); + Assertions.assertEquals(1687879727, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1680643768, response.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("etbzfwfuxdtp", response.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("edlclxx", response.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, response.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, response.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(764871693, + response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(721638961, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("b", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("hdjbyfdfuaj", + response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("a", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jxdrgxpuxpzslmf", + response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java index a61bffe49133..51ffb77898fc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java @@ -1,18 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,52 +26,69 @@ public final class ExternalNetworksListByL3IsolationDomainMockTests { @Test public void testListByL3IsolationDomain() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"pncjqbgbnoqnowv\"],\"exportRouteTargets\":[\"ytzgwjekyqirv\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"nvgpppdil\",\"dvxlfhlzzga\",\"sp\",\"wwblscrmzqu\"],\"importIpv6RouteTargets\":[\"wkgouxnro\",\"ht\",\"esywywnvgy\"],\"exportIpv4RouteTargets\":[\"ifrzcwuejmxlfzl\"],\"exportIpv6RouteTargets\":[\"rgrlhchra\"]}},\"optionAProperties\":{\"mtu\":919359758,\"vlanId\":1922580391,\"fabricASN\":6531716369463258640,\"peerASN\":7016612731921186008,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1047331940,\"multiplier\":809850020},\"ingressAclId\":\"rgmnkgtlhzkrazk\",\"egressAclId\":\"iy\",\"primaryIpv4Prefix\":\"znvzmsv\",\"primaryIpv6Prefix\":\"gheqzhehgvmmnoyz\",\"secondaryIpv4Prefix\":\"bn\",\"secondaryIpv6Prefix\":\"luzypkfcdf\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"tnoilqcdvhyefqh\",\"importRoutePolicyId\":\"tsqmbwc\",\"exportRoutePolicyId\":\"waaqakv\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"axxra\",\"importIpv6RoutePolicyId\":\"lreq\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mmd\",\"exportIpv6RoutePolicyId\":\"hzumxucznbabowrc\"},\"annotation\":\"nmjwkowxqzk\"},\"id\":\"gvejhmnaph\",\"name\":\"skmpeajzzypa\",\"type\":\"amzmzfnt\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"udifierxxorsdvu\",\"networkToNetworkInterconnectId\":\"qfksjll\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"doaihlv\",\"importIpv6RoutePolicyId\":\"qcivmirybwgac\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"kynemazgtbyn\",\"exportIpv6RoutePolicyId\":\"hcawexgeqojzvu\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"j\"],\"exportRouteTargets\":[\"bobuovsvwnpc\",\"dkmtvparyubnyh\",\"lpz\",\"evotucnzbpo\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"z\"],\"importIpv6RouteTargets\":[\"oemzdnvnookl\"],\"exportIpv4RouteTargets\":[\"nuqsgertxicemgs\",\"cbbdokph\",\"edbsl\",\"nunpxswmcc\"],\"exportIpv6RouteTargets\":[\"viaaep\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"bofdchboacf\",\"primaryIpv6Prefix\":\"zwesetutqjsojwoi\",\"secondaryIpv4Prefix\":\"rnakytzcmag\",\"secondaryIpv6Prefix\":\"l\",\"mtu\":2066426072,\"vlanId\":1802709740,\"fabricASN\":1322168239650216817,\"peerASN\":3192680807740505810,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1027912523,\"multiplier\":568085330},\"ingressAclId\":\"gvygmtywivbuit\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"klv\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":44069704,\"multiplier\":1703611698},\"ipv4Routes\":[{\"prefix\":\"sn\",\"nextHop\":[\"xhgdns\",\"xyl\",\"dbg\"]},{\"prefix\":\"icjkq\",\"nextHop\":[\"fzkhdnp\",\"mrxjdfkqlkaipf\"]},{\"prefix\":\"vquasvywkbiek\",\"nextHop\":[\"akqahopgnapkp\",\"iedoxvoaoa\"]},{\"prefix\":\"e\",\"nextHop\":[\"clmzm\",\"rvlgh\"]}],\"ipv6Routes\":[{\"prefix\":\"diq\",\"nextHop\":[\"hcb\",\"kawif\"]},{\"prefix\":\"fjtockgqaawyysz\",\"nextHop\":[\"e\"]},{\"prefix\":\"ljlwfqrfyw\",\"nextHop\":[\"sipkhqh\",\"ktcztmqdkhohspkg\",\"emvlyaprj\"]},{\"prefix\":\"bxxxqfrn\",\"nextHop\":[\"bhmxlpxf\",\"uvgtoinozsmyvv\"]}]},\"lastOperation\":{\"details\":\"fbmrwhk\"},\"networkFabricId\":\"fcooptmdspdd\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"id\":\"bgol\",\"name\":\"xuybxjwnyr\",\"type\":\"kyrttnriks\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.externalNetworks() - .listByL3IsolationDomain("nj", "dijoxqswsychdc", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("fawhoosrsol", "hvmfoejbgiqhjpe", com.azure.core.util.Context.NONE); + Assertions.assertEquals("udifierxxorsdvu", response.iterator().next().annotation()); + Assertions.assertEquals("qfksjll", response.iterator().next().networkToNetworkInterconnectId()); + Assertions.assertEquals("doaihlv", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qcivmirybwgac", + response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("kynemazgtbyn", + response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hcawexgeqojzvu", + response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); Assertions.assertEquals(PeeringOption.OPTIONA, response.iterator().next().peeringOption()); - Assertions.assertEquals("pncjqbgbnoqnowv", - response.iterator().next().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ytzgwjekyqirv", + Assertions.assertEquals("j", response.iterator().next().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("bobuovsvwnpc", response.iterator().next().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("nvgpppdil", + Assertions.assertEquals("z", response.iterator().next().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wkgouxnro", + Assertions.assertEquals("oemzdnvnookl", response.iterator().next().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ifrzcwuejmxlfzl", + Assertions.assertEquals("nuqsgertxicemgs", response.iterator().next().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("rgrlhchra", + Assertions.assertEquals("viaaep", response.iterator().next().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("znvzmsv", response.iterator().next().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("gheqzhehgvmmnoyz", response.iterator().next().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("bn", response.iterator().next().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("luzypkfcdf", response.iterator().next().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(919359758, response.iterator().next().optionAProperties().mtu()); - Assertions.assertEquals(1922580391, response.iterator().next().optionAProperties().vlanId()); - Assertions.assertEquals(7016612731921186008L, response.iterator().next().optionAProperties().peerAsn()); - Assertions.assertEquals(1047331940, + Assertions.assertEquals("bofdchboacf", response.iterator().next().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("zwesetutqjsojwoi", response.iterator().next().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("rnakytzcmag", response.iterator().next().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("l", response.iterator().next().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(2066426072, response.iterator().next().optionAProperties().mtu()); + Assertions.assertEquals(1802709740, response.iterator().next().optionAProperties().vlanId()); + Assertions.assertEquals(3192680807740505810L, response.iterator().next().optionAProperties().peerAsn()); + Assertions.assertEquals(1027912523, response.iterator().next().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(809850020, + Assertions.assertEquals(568085330, response.iterator().next().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rgmnkgtlhzkrazk", response.iterator().next().optionAProperties().ingressAclId()); - Assertions.assertEquals("iy", response.iterator().next().optionAProperties().egressAclId()); - Assertions.assertEquals("tnoilqcdvhyefqh", response.iterator().next().networkToNetworkInterconnectId()); - Assertions.assertEquals("tsqmbwc", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("waaqakv", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("axxra", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("lreq", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mmd", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("hzumxucznbabowrc", - response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("nmjwkowxqzk", response.iterator().next().annotation()); + Assertions.assertEquals("gvygmtywivbuit", response.iterator().next().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.iterator().next().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("klv", response.iterator().next().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + response.iterator().next().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.iterator().next().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(44069704, + response.iterator().next().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1703611698, + response.iterator().next().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("sn", + response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xhgdns", + response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("diq", + response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hcb", + response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java index e75a5b9094f7..26448863320f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java @@ -1,230 +1,66 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworksList; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import org.junit.jupiter.api.Assertions; public final class ExternalNetworksListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworksList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"xv\",\"zxoebwgjxb\"],\"exportRouteTargets\":[\"nbau\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"vpaklozkxbz\",\"pejplssa\",\"bttt\",\"gs\"],\"importIpv6RouteTargets\":[\"nrswgkpjhboyik\",\"bhuhk\",\"lgw\",\"okhu\"],\"exportIpv4RouteTargets\":[\"jy\",\"cqypz\",\"zufgs\",\"fejyvdwtfxptpqa\"],\"exportIpv6RouteTargets\":[\"k\",\"cf\",\"ybmx\",\"nxocuul\"]}},\"optionAProperties\":{\"mtu\":857149091,\"vlanId\":483540958,\"fabricASN\":2170588510659937607,\"peerASN\":5920984051330844517,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":788065206,\"multiplier\":1376252754},\"ingressAclId\":\"zgdyrcvuqbs\",\"egressAclId\":\"lr\",\"primaryIpv4Prefix\":\"bjnqogdxwbsf\",\"primaryIpv6Prefix\":\"xxtjlflecomi\",\"secondaryIpv4Prefix\":\"ojjlu\",\"secondaryIpv6Prefix\":\"dhilzzdzz\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\",\"networkToNetworkInterconnectId\":\"ovribq\",\"importRoutePolicyId\":\"tokhtvwtaznkcqw\",\"exportRoutePolicyId\":\"wjyofgwhnkbtl\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ssmctsnl\",\"importIpv6RoutePolicyId\":\"pwolgisubxb\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gfgf\",\"exportIpv6RoutePolicyId\":\"jrykwlefksxqce\"},\"annotation\":\"fpxgnmqvz\"},\"id\":\"uyqqaiosssc\",\"name\":\"vaifppuacvfy\",\"type\":\"owpsfxt\"},{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"ymh\"],\"exportRouteTargets\":[\"yqfttehdpboujst\",\"fvvdshxcdedsue\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"xcgjtf\",\"nquktrfnslnlrxs\",\"ylt\"],\"importIpv6RouteTargets\":[\"tfmtbgwjdxwnazku\"],\"exportIpv4RouteTargets\":[\"reyzjwhs\"],\"exportIpv6RouteTargets\":[\"wjwzzqseuzuukykc\"]}},\"optionAProperties\":{\"mtu\":986882951,\"vlanId\":1034433252,\"fabricASN\":2932185200205854574,\"peerASN\":5579449027126276309,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":793667123,\"multiplier\":591375504},\"ingressAclId\":\"pazdazgbsqgp\",\"egressAclId\":\"q\",\"primaryIpv4Prefix\":\"utmdpvozg\",\"primaryIpv6Prefix\":\"jbkn\",\"secondaryIpv4Prefix\":\"clctzey\",\"secondaryIpv6Prefix\":\"mndcov\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"a\",\"importRoutePolicyId\":\"mk\",\"exportRoutePolicyId\":\"ruw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rbcp\",\"importIpv6RoutePolicyId\":\"xudqyemebunaucmc\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"nee\",\"exportIpv6RoutePolicyId\":\"jauwcgxefnohaitr\"},\"annotation\":\"izerw\"},\"id\":\"dasmxu\",\"name\":\"vfbngfco\",\"type\":\"ef\"},{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"lfmpztr\"],\"exportRouteTargets\":[\"svhl\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"lregpq\"],\"importIpv6RouteTargets\":[\"jhvrztnvgyshqrdg\",\"twmewjzlpykcfazz\"],\"exportIpv4RouteTargets\":[\"ayerzrran\",\"ybylpol\"],\"exportIpv6RouteTargets\":[\"ghsrleinkfscjfn\",\"jwvuag\",\"qwtltngvmreupt\",\"klzmijajw\"]}},\"optionAProperties\":{\"mtu\":1419456371,\"vlanId\":1674481781,\"fabricASN\":3584876522043941136,\"peerASN\":9108172256129325995,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":356088444,\"multiplier\":288708143},\"ingressAclId\":\"gtzjcv\",\"egressAclId\":\"qlapsnsso\",\"primaryIpv4Prefix\":\"xpavid\",\"primaryIpv6Prefix\":\"ev\",\"secondaryIpv4Prefix\":\"fcvvy\",\"secondaryIpv6Prefix\":\"slpuxgcbdsva\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"kx\",\"importRoutePolicyId\":\"azwu\",\"exportRoutePolicyId\":\"yqvnjobfe\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"diuhzzgql\",\"importIpv6RoutePolicyId\":\"aewzgiudjp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"httqh\",\"exportIpv6RoutePolicyId\":\"hkrezsdsuxheqdgc\"},\"annotation\":\"xsp\"},\"id\":\"ymmqgwokmikp\",\"name\":\"zfbmjxuv\",\"type\":\"ipfdvhaxdvwzaehp\"},{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"kl\",\"vetat\",\"akfqoixwgiksb\",\"vtooxrpo\"],\"exportRouteTargets\":[\"hchgjtnhtukf\",\"cihmbfntumeezbxv\",\"xbnuvwcga\",\"gomtm\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"uqgovsxpwwztjfm\",\"khtgfredmlscgrll\",\"cnaovjo\",\"azhpabacoml\"],\"importIpv6RouteTargets\":[\"gkw\"],\"exportIpv4RouteTargets\":[\"srqorcgenmvceb\",\"eetqujxcxxq\"],\"exportIpv6RouteTargets\":[\"qjkedwqurc\",\"ojmrvvxwjongzse\",\"qqrsil\"]}},\"optionAProperties\":{\"mtu\":770026155,\"vlanId\":1324476577,\"fabricASN\":5630506474733333632,\"peerASN\":3809367581844316012,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":734874169,\"multiplier\":1346312229},\"ingressAclId\":\"ojrulfuctejrt\",\"egressAclId\":\"fjzhxl\",\"primaryIpv4Prefix\":\"bqjr\",\"primaryIpv6Prefix\":\"tvrjeqmtz\",\"secondaryIpv4Prefix\":\"eqrztrxalxrdh\",\"secondaryIpv6Prefix\":\"srwrsnrhpqati\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"kvvcsemsvuvdjkq\",\"importRoutePolicyId\":\"tqmm\",\"exportRoutePolicyId\":\"vrjjxnw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hpojxl\",\"importIpv6RoutePolicyId\":\"z\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gfquwz\",\"exportIpv6RoutePolicyId\":\"iibelwcerw\"},\"annotation\":\"bpjxljtxbusqtb\"},\"id\":\"niuisdz\",\"name\":\"gbdgzp\",\"type\":\"gsecnadbuwqrgx\"}],\"nextLink\":\"lmqiynezoel\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"colmugp\",\"networkToNetworkInterconnectId\":\"aosd\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"wzxeygzvtyevjhu\",\"importIpv6RoutePolicyId\":\"obguqisqsqk\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ioyj\",\"exportIpv6RoutePolicyId\":\"mlviqcpszpmcvqdv\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"yrx\"],\"exportRouteTargets\":[\"vqojbxaotcgbz\",\"mbtple\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"yidoxznvg\",\"dtmuuvd\",\"wsxmrszb\",\"nimx\"],\"importIpv6RouteTargets\":[\"erxrzutylcurza\",\"mnb\"],\"exportIpv4RouteTargets\":[\"ehtd\",\"jmbnvynf\"],\"exportIpv6RouteTargets\":[\"eactedcglskakdd\",\"dahzllrqm\",\"lpbyxroiduyq\",\"pffmnoii\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"dyhbrjj\",\"primaryIpv6Prefix\":\"lxrdsjrholuqwgus\",\"secondaryIpv4Prefix\":\"hdodpjwy\",\"secondaryIpv6Prefix\":\"vtbdm\",\"mtu\":1935503817,\"vlanId\":45364466,\"fabricASN\":8035135420388544935,\"peerASN\":312612104215403301,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1991928180,\"multiplier\":1901075904},\"ingressAclId\":\"jfb\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"egressAclId\":\"gdusxurs\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1339225652,\"multiplier\":861314437},\"ipv4Routes\":[{\"prefix\":\"fwihvaan\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"nhjrfdmfd\",\"nextHop\":[]},{\"prefix\":\"bbaex\",\"nextHop\":[]},{\"prefix\":\"jfwtgdfkkaui\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"u\"},\"networkFabricId\":\"mczfedyuepsvplt\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"},\"id\":\"eocfkumcfjxok\",\"name\":\"elsy\",\"type\":\"svfnkwm\"},{\"properties\":{\"annotation\":\"jjekrknfdrugj\",\"networkToNetworkInterconnectId\":\"ckgtxkrdtulc\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"dklotcsubmzo\",\"importIpv6RoutePolicyId\":\"svobchkxfp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yslb\",\"exportIpv6RoutePolicyId\":\"glmnnk\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"shwy\",\"xrid\",\"tb\"],\"exportRouteTargets\":[\"jmkgxqwqueuuylzt\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"zevjykofve\",\"efkhkqtwq\"],\"importIpv6RouteTargets\":[\"jjzkcasfwzc\",\"togffjwajnrtwz\",\"aqkifmxawostfz\"],\"exportIpv4RouteTargets\":[\"rkmjqncfvdscnhe\",\"vwfnqqwypvn\",\"r\"],\"exportIpv6RouteTargets\":[\"od\",\"ggrssgwjfkain\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"ymvecvztscbg\",\"primaryIpv6Prefix\":\"saictds\",\"secondaryIpv4Prefix\":\"kzzohnrddc\",\"secondaryIpv6Prefix\":\"eqozrehlbz\",\"mtu\":1360403193,\"vlanId\":1620454050,\"fabricASN\":5468047873562439322,\"peerASN\":4903814293426806724,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1477600081,\"multiplier\":29783496},\"ingressAclId\":\"nynpameudpabcre\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"gyjxvc\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":842951636,\"multiplier\":1433860479},\"ipv4Routes\":[{\"prefix\":\"ad\",\"nextHop\":[]},{\"prefix\":\"vecovsdqhzr\",\"nextHop\":[]},{\"prefix\":\"dbakr\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"zfvppkeq\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"jmcl\"},\"networkFabricId\":\"ygnhrkombc\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"gorwjoqtrotpvclp\",\"name\":\"fyrlmwkptskwxj\",\"type\":\"vhxccbmkakmkoo\"},{\"properties\":{\"annotation\":\"putmgvmuyakm\",\"networkToNetworkInterconnectId\":\"ktfowzkroyrdur\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"zqjim\",\"importIpv6RoutePolicyId\":\"tgz\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lfejlzuqloiw\",\"exportIpv6RoutePolicyId\":\"yyzivrmitcd\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"whrktjleifibfipl\",\"xfns\"],\"exportRouteTargets\":[\"jow\",\"yeyzm\",\"dsqcmhnxl\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"o\",\"machbkv\",\"rpbj\"],\"importIpv6RouteTargets\":[\"goqple\",\"mumk\"],\"exportIpv4RouteTargets\":[\"lczdprwnh\"],\"exportIpv6RouteTargets\":[\"ggoxsstcivrakfrr\",\"njcwmhly\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"ukxrke\",\"primaryIpv6Prefix\":\"pequlrlzaudgjtf\",\"secondaryIpv4Prefix\":\"lakkucddwnhcz\",\"secondaryIpv6Prefix\":\"toucgj\",\"mtu\":330231609,\"vlanId\":1372705343,\"fabricASN\":4790054846611118580,\"peerASN\":6882674875276093582,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":295914705,\"multiplier\":393634530},\"ingressAclId\":\"kslvlizedvb\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"srgekzyqxadyfhb\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1849035748,\"multiplier\":2086760208},\"ipv4Routes\":[{\"prefix\":\"g\",\"nextHop\":[]},{\"prefix\":\"zstuj\",\"nextHop\":[]},{\"prefix\":\"zx\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"sf\",\"nextHop\":[]},{\"prefix\":\"rlduyehiiittugy\",\"nextHop\":[]},{\"prefix\":\"qwrldaxur\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"zcsozjvxdz\"},\"networkFabricId\":\"ggbnvtxo\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\"},\"id\":\"hoeamoeobdo\",\"name\":\"ysfpnimtwu\",\"type\":\"hau\"}],\"nextLink\":\"nkwmnfeub\"}") .toObject(ExternalNetworksList.class); + Assertions.assertEquals("colmugp", model.value().get(0).annotation()); + Assertions.assertEquals("aosd", model.value().get(0).networkToNetworkInterconnectId()); + Assertions.assertEquals("wzxeygzvtyevjhu", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("obguqisqsqk", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ioyj", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("mlviqcpszpmcvqdv", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("xv", model.value().get(0).optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nbau", model.value().get(0).optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("vpaklozkxbz", + Assertions.assertEquals("yrx", model.value().get(0).optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("vqojbxaotcgbz", model.value().get(0).optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("yidoxznvg", model.value().get(0).optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nrswgkpjhboyik", + Assertions.assertEquals("erxrzutylcurza", model.value().get(0).optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("jy", + Assertions.assertEquals("ehtd", model.value().get(0).optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("k", + Assertions.assertEquals("eactedcglskakdd", model.value().get(0).optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("bjnqogdxwbsf", model.value().get(0).optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("xxtjlflecomi", model.value().get(0).optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ojjlu", model.value().get(0).optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("dhilzzdzz", model.value().get(0).optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(857149091, model.value().get(0).optionAProperties().mtu()); - Assertions.assertEquals(483540958, model.value().get(0).optionAProperties().vlanId()); - Assertions.assertEquals(5920984051330844517L, model.value().get(0).optionAProperties().peerAsn()); - Assertions.assertEquals(788065206, + Assertions.assertEquals("dyhbrjj", model.value().get(0).optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("lxrdsjrholuqwgus", model.value().get(0).optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("hdodpjwy", model.value().get(0).optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("vtbdm", model.value().get(0).optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1935503817, model.value().get(0).optionAProperties().mtu()); + Assertions.assertEquals(45364466, model.value().get(0).optionAProperties().vlanId()); + Assertions.assertEquals(312612104215403301L, model.value().get(0).optionAProperties().peerAsn()); + Assertions.assertEquals(1991928180, model.value().get(0).optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1376252754, model.value().get(0).optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("zgdyrcvuqbs", model.value().get(0).optionAProperties().ingressAclId()); - Assertions.assertEquals("lr", model.value().get(0).optionAProperties().egressAclId()); - Assertions.assertEquals("ovribq", model.value().get(0).networkToNetworkInterconnectId()); - Assertions.assertEquals("tokhtvwtaznkcqw", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("wjyofgwhnkbtl", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("ssmctsnl", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pwolgisubxb", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gfgf", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jrykwlefksxqce", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fpxgnmqvz", model.value().get(0).annotation()); - Assertions.assertEquals("lmqiynezoel", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworksList model - = new ExternalNetworksList() - .withValue( - Arrays - .asList( - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("xv", "zxoebwgjxb")) - .withExportRouteTargets(Arrays.asList("nbau")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("vpaklozkxbz", "pejplssa", "bttt", "gs")) - .withImportIpv6RouteTargets( - Arrays.asList("nrswgkpjhboyik", "bhuhk", "lgw", "okhu")) - .withExportIpv4RouteTargets( - Arrays.asList("jy", "cqypz", "zufgs", "fejyvdwtfxptpqa")) - .withExportIpv6RouteTargets(Arrays.asList("k", "cf", "ybmx", "nxocuul")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("bjnqogdxwbsf") - .withPrimaryIpv6Prefix("xxtjlflecomi") - .withSecondaryIpv4Prefix("ojjlu") - .withSecondaryIpv6Prefix("dhilzzdzz") - .withMtu(857149091) - .withVlanId(483540958) - .withPeerAsn(5920984051330844517L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(788065206) - .withMultiplier(1376252754)) - .withIngressAclId("zgdyrcvuqbs") - .withEgressAclId("lr")) - .withNetworkToNetworkInterconnectId("ovribq") - .withImportRoutePolicyId("tokhtvwtaznkcqw") - .withExportRoutePolicyId("wjyofgwhnkbtl") - .withImportRoutePolicy(new ImportRoutePolicy() - .withImportIpv4RoutePolicyId("ssmctsnl") - .withImportIpv6RoutePolicyId("pwolgisubxb")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("gfgf") - .withExportIpv6RoutePolicyId("jrykwlefksxqce")) - .withAnnotation("fpxgnmqvz"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("ymh")) - .withExportRouteTargets(Arrays.asList("yqfttehdpboujst", "fvvdshxcdedsue")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("xcgjtf", "nquktrfnslnlrxs", "ylt")) - .withImportIpv6RouteTargets(Arrays.asList("tfmtbgwjdxwnazku")) - .withExportIpv4RouteTargets(Arrays.asList("reyzjwhs")) - .withExportIpv6RouteTargets(Arrays.asList("wjwzzqseuzuukykc")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("utmdpvozg") - .withPrimaryIpv6Prefix("jbkn") - .withSecondaryIpv4Prefix("clctzey") - .withSecondaryIpv6Prefix("mndcov") - .withMtu(986882951) - .withVlanId(1034433252) - .withPeerAsn(5579449027126276309L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(793667123) - .withMultiplier(591375504)) - .withIngressAclId("pazdazgbsqgp") - .withEgressAclId("q")) - .withNetworkToNetworkInterconnectId("a") - .withImportRoutePolicyId("mk") - .withExportRoutePolicyId("ruw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("rbcp") - .withImportIpv6RoutePolicyId("xudqyemebunaucmc")) - .withExportRoutePolicy(new ExportRoutePolicy() - .withExportIpv4RoutePolicyId("nee") - .withExportIpv6RoutePolicyId("jauwcgxefnohaitr")) - .withAnnotation("izerw"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new L3OptionBProperties().withImportRouteTargets(Arrays.asList("lfmpztr")) - .withExportRouteTargets(Arrays.asList("svhl")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("lregpq")) - .withImportIpv6RouteTargets( - Arrays.asList("jhvrztnvgyshqrdg", "twmewjzlpykcfazz")) - .withExportIpv4RouteTargets(Arrays.asList("ayerzrran", "ybylpol")) - .withExportIpv6RouteTargets(Arrays.asList("ghsrleinkfscjfn", "jwvuag", - "qwtltngvmreupt", "klzmijajw")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("xpavid") - .withPrimaryIpv6Prefix("ev") - .withSecondaryIpv4Prefix("fcvvy") - .withSecondaryIpv6Prefix("slpuxgcbdsva") - .withMtu(1419456371) - .withVlanId(1674481781) - .withPeerAsn(9108172256129325995L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(356088444) - .withMultiplier(288708143)) - .withIngressAclId("gtzjcv") - .withEgressAclId("qlapsnsso")) - .withNetworkToNetworkInterconnectId("kx") - .withImportRoutePolicyId("azwu") - .withExportRoutePolicyId("yqvnjobfe") - .withImportRoutePolicy(new ImportRoutePolicy() - .withImportIpv4RoutePolicyId("diuhzzgql") - .withImportIpv6RoutePolicyId("aewzgiudjp")) - .withExportRoutePolicy(new ExportRoutePolicy() - .withExportIpv4RoutePolicyId("httqh") - .withExportIpv6RoutePolicyId("hkrezsdsuxheqdgc")) - .withAnnotation("xsp"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("kl", "vetat", "akfqoixwgiksb", "vtooxrpo")) - .withExportRouteTargets( - Arrays.asList("hchgjtnhtukf", "cihmbfntumeezbxv", "xbnuvwcga", "gomtm")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("uqgovsxpwwztjfm", "khtgfredmlscgrll", - "cnaovjo", "azhpabacoml")) - .withImportIpv6RouteTargets(Arrays.asList("gkw")) - .withExportIpv4RouteTargets(Arrays.asList("srqorcgenmvceb", "eetqujxcxxq")) - .withExportIpv6RouteTargets( - Arrays.asList("qjkedwqurc", "ojmrvvxwjongzse", "qqrsil")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("bqjr") - .withPrimaryIpv6Prefix("tvrjeqmtz") - .withSecondaryIpv4Prefix("eqrztrxalxrdh") - .withSecondaryIpv6Prefix("srwrsnrhpqati") - .withMtu(770026155) - .withVlanId(1324476577) - .withPeerAsn(3809367581844316012L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(734874169) - .withMultiplier(1346312229)) - .withIngressAclId("ojrulfuctejrt") - .withEgressAclId("fjzhxl")) - .withNetworkToNetworkInterconnectId("kvvcsemsvuvdjkq") - .withImportRoutePolicyId("tqmm") - .withExportRoutePolicyId("vrjjxnw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("hpojxl") - .withImportIpv6RoutePolicyId("z")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("gfquwz") - .withExportIpv6RoutePolicyId("iibelwcerw")) - .withAnnotation("bpjxljtxbusqtb"))) - .withNextLink("lmqiynezoel"); - model = BinaryData.fromObject(model).toObject(ExternalNetworksList.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("xv", model.value().get(0).optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nbau", model.value().get(0).optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("vpaklozkxbz", - model.value().get(0).optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nrswgkpjhboyik", - model.value().get(0).optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("jy", - model.value().get(0).optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("k", - model.value().get(0).optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("bjnqogdxwbsf", model.value().get(0).optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("xxtjlflecomi", model.value().get(0).optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ojjlu", model.value().get(0).optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("dhilzzdzz", model.value().get(0).optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(857149091, model.value().get(0).optionAProperties().mtu()); - Assertions.assertEquals(483540958, model.value().get(0).optionAProperties().vlanId()); - Assertions.assertEquals(5920984051330844517L, model.value().get(0).optionAProperties().peerAsn()); - Assertions.assertEquals(788065206, - model.value().get(0).optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1376252754, model.value().get(0).optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("zgdyrcvuqbs", model.value().get(0).optionAProperties().ingressAclId()); - Assertions.assertEquals("lr", model.value().get(0).optionAProperties().egressAclId()); - Assertions.assertEquals("ovribq", model.value().get(0).networkToNetworkInterconnectId()); - Assertions.assertEquals("tokhtvwtaznkcqw", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("wjyofgwhnkbtl", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("ssmctsnl", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pwolgisubxb", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gfgf", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jrykwlefksxqce", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fpxgnmqvz", model.value().get(0).annotation()); - Assertions.assertEquals("lmqiynezoel", model.nextLink()); + Assertions.assertEquals(1901075904, model.value().get(0).optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("jfb", model.value().get(0).optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.value().get(0).optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("gdusxurs", model.value().get(0).optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.value().get(0).optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.value().get(0).optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1339225652, + model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(861314437, + model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("fwihvaan", + model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nhjrfdmfd", + model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("nkwmnfeub", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java new file mode 100644 index 000000000000..ce47b9a03c35 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LockConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; +import org.junit.jupiter.api.Assertions; + +public final class FabricLockPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FabricLockProperties model + = BinaryData.fromString("{\"lockState\":\"Disabled\",\"lockType\":\"Configuration\"}") + .toObject(FabricLockProperties.class); + Assertions.assertEquals(LockConfigurationState.DISABLED, model.lockState()); + Assertions.assertEquals(NetworkFabricLockType.CONFIGURATION, model.lockType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java new file mode 100644 index 000000000000..cf34d3df947e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import org.junit.jupiter.api.Assertions; + +public final class FeatureFlagPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FeatureFlagProperties model + = BinaryData.fromString("{\"featureFlagName\":\"cyoseqcazisvbrqg\",\"featureFlagValue\":\"jp\"}") + .toObject(FeatureFlagProperties.class); + Assertions.assertEquals("cyoseqcazisvbrqg", model.featureFlagName()); + Assertions.assertEquals("jp", model.featureFlagValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FeatureFlagProperties model + = new FeatureFlagProperties().withFeatureFlagName("cyoseqcazisvbrqg").withFeatureFlagValue("jp"); + model = BinaryData.fromObject(model).toObject(FeatureFlagProperties.class); + Assertions.assertEquals("cyoseqcazisvbrqg", model.featureFlagName()); + Assertions.assertEquals("jp", model.featureFlagValue()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetTopologyResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetTopologyResponsePropertiesTests.java new file mode 100644 index 000000000000..e23a5f83b4da --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetTopologyResponsePropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.GetTopologyResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class GetTopologyResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetTopologyResponseProperties model + = BinaryData.fromString("{\"url\":\"ibxovu\"}").toObject(GetTopologyResponseProperties.class); + Assertions.assertEquals("ibxovu", model.url()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java new file mode 100644 index 000000000000..c51af7f34a43 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalAccessControlListActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalAccessControlListActionPatchProperties model = BinaryData.fromString("{\"enableCount\":\"True\"}") + .toObject(GlobalAccessControlListActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalAccessControlListActionPatchProperties model + = new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE); + model = BinaryData.fromObject(model).toObject(GlobalAccessControlListActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java new file mode 100644 index 000000000000..8e40aa383388 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalAccessControlListActionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalAccessControlListActionProperties model = BinaryData.fromString("{\"enableCount\":\"False\"}") + .toObject(GlobalAccessControlListActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.enableCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalAccessControlListActionProperties model + = new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.FALSE); + model = BinaryData.fromObject(model).toObject(GlobalAccessControlListActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.enableCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java new file mode 100644 index 000000000000..109a413436f1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalNetworkTapRuleActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalNetworkTapRuleActionPatchProperties model + = BinaryData.fromString("{\"enableCount\":\"False\",\"truncate\":\"a\"}") + .toObject(GlobalNetworkTapRuleActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.enableCount()); + Assertions.assertEquals("a", model.truncate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalNetworkTapRuleActionPatchProperties model + = new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("a"); + model = BinaryData.fromObject(model).toObject(GlobalNetworkTapRuleActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.enableCount()); + Assertions.assertEquals("a", model.truncate()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java new file mode 100644 index 000000000000..845e2e0d712a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalNetworkTapRuleActionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalNetworkTapRuleActionProperties model + = BinaryData.fromString("{\"enableCount\":\"True\",\"truncate\":\"dpvhwirilam\"}") + .toObject(GlobalNetworkTapRuleActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("dpvhwirilam", model.truncate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalNetworkTapRuleActionProperties model + = new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("dpvhwirilam"); + model = BinaryData.fromObject(model).toObject(GlobalNetworkTapRuleActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("dpvhwirilam", model.truncate()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java new file mode 100644 index 000000000000..0e45577b7e4d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class HeaderAddressPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HeaderAddressProperties model = BinaryData.fromString("{\"headerName\":\"ysh\",\"addressList\":[\"kvb\"]}") + .toObject(HeaderAddressProperties.class); + Assertions.assertEquals("ysh", model.headerName()); + Assertions.assertEquals("kvb", model.addressList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HeaderAddressProperties model + = new HeaderAddressProperties().withHeaderName("ysh").withAddressList(Arrays.asList("kvb")); + model = BinaryData.fromObject(model).toObject(HeaderAddressProperties.class); + Assertions.assertEquals("ysh", model.headerName()); + Assertions.assertEquals("kvb", model.addressList().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..0d2b79578f10 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IcmpConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IcmpConfigurationPatchProperties model = BinaryData.fromString("{\"icmpTypes\":[\"ejchcsrlz\",\"nmzlanru\"]}") + .toObject(IcmpConfigurationPatchProperties.class); + Assertions.assertEquals("ejchcsrlz", model.icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IcmpConfigurationPatchProperties model + = new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("ejchcsrlz", "nmzlanru")); + model = BinaryData.fromObject(model).toObject(IcmpConfigurationPatchProperties.class); + Assertions.assertEquals("ejchcsrlz", model.icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java new file mode 100644 index 000000000000..7345fe600001 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IcmpConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IcmpConfigurationProperties model + = BinaryData.fromString("{\"icmpTypes\":[\"zukxitmmqtgqq\",\"x\",\"rnxrxcpj\"]}") + .toObject(IcmpConfigurationProperties.class); + Assertions.assertEquals("zukxitmmqtgqq", model.icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IcmpConfigurationProperties model + = new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("zukxitmmqtgqq", "x", "rnxrxcpj")); + model = BinaryData.fromObject(model).toObject(IcmpConfigurationProperties.class); + Assertions.assertEquals("zukxitmmqtgqq", model.icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java new file mode 100644 index 000000000000..4d71bb5a10af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import org.junit.jupiter.api.Assertions; + +public final class IdentitySelectorPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentitySelectorPatch model = BinaryData + .fromString( + "{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ivjmxmlitqdsjipd\"}") + .toObject(IdentitySelectorPatch.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("ivjmxmlitqdsjipd", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentitySelectorPatch model + = new IdentitySelectorPatch().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("ivjmxmlitqdsjipd"); + model = BinaryData.fromObject(model).toObject(IdentitySelectorPatch.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("ivjmxmlitqdsjipd", model.userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java new file mode 100644 index 000000000000..a39f101e1a7e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import org.junit.jupiter.api.Assertions; + +public final class IdentitySelectorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentitySelector model = BinaryData + .fromString("{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"h\"}") + .toObject(IdentitySelector.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("h", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentitySelector model + = new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("h"); + model = BinaryData.fromObject(model).toObject(IdentitySelector.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("h", model.userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java new file mode 100644 index 000000000000..7027dad097dd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import org.junit.jupiter.api.Assertions; + +public final class ImportRoutePolicyInformationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImportRoutePolicyInformationPatch model = BinaryData + .fromString("{\"importIpv4RoutePolicyId\":\"zckjbcbkgnrfrj\",\"importIpv6RoutePolicyId\":\"hjxncqzahg\"}") + .toObject(ImportRoutePolicyInformationPatch.class); + Assertions.assertEquals("zckjbcbkgnrfrj", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("hjxncqzahg", model.importIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImportRoutePolicyInformationPatch model + = new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("zckjbcbkgnrfrj") + .withImportIpv6RoutePolicyId("hjxncqzahg"); + model = BinaryData.fromObject(model).toObject(ImportRoutePolicyInformationPatch.class); + Assertions.assertEquals("zckjbcbkgnrfrj", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("hjxncqzahg", model.importIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java index 9a88c371b762..61697ae5614e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,19 @@ public final class ImportRoutePolicyInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImportRoutePolicyInformation model = BinaryData - .fromString("{\"importIpv4RoutePolicyId\":\"lxrdsjrholuqwgus\",\"importIpv6RoutePolicyId\":\"hdodpjwy\"}") + .fromString("{\"importIpv4RoutePolicyId\":\"dlhuduklbjo\",\"importIpv6RoutePolicyId\":\"mjfexulvoep\"}") .toObject(ImportRoutePolicyInformation.class); - Assertions.assertEquals("lxrdsjrholuqwgus", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("hdodpjwy", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("dlhuduklbjo", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("mjfexulvoep", model.importIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImportRoutePolicyInformation model - = new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("lxrdsjrholuqwgus") - .withImportIpv6RoutePolicyId("hdodpjwy"); + = new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("dlhuduklbjo") + .withImportIpv6RoutePolicyId("mjfexulvoep"); model = BinaryData.fromObject(model).toObject(ImportRoutePolicyInformation.class); - Assertions.assertEquals("lxrdsjrholuqwgus", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("hdodpjwy", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("dlhuduklbjo", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("mjfexulvoep", model.importIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..d73de438c6fd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ImportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImportRoutePolicyPatch model = BinaryData + .fromString("{\"importIpv4RoutePolicyId\":\"jecooyvhtu\",\"importIpv6RoutePolicyId\":\"pelniibn\"}") + .toObject(ImportRoutePolicyPatch.class); + Assertions.assertEquals("jecooyvhtu", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("pelniibn", model.importIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImportRoutePolicyPatch model = new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("jecooyvhtu") + .withImportIpv6RoutePolicyId("pelniibn"); + model = BinaryData.fromObject(model).toObject(ImportRoutePolicyPatch.class); + Assertions.assertEquals("jecooyvhtu", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("pelniibn", model.importIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java index b63516ebed60..f5bf3e1f68dc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class ImportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImportRoutePolicy model = BinaryData - .fromString("{\"importIpv4RoutePolicyId\":\"qi\",\"importIpv6RoutePolicyId\":\"zxlhdjzqdcadwv\"}") + .fromString("{\"importIpv4RoutePolicyId\":\"k\",\"importIpv6RoutePolicyId\":\"dvrgliegftcvbi\"}") .toObject(ImportRoutePolicy.class); - Assertions.assertEquals("qi", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("zxlhdjzqdcadwv", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("k", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("dvrgliegftcvbi", model.importIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImportRoutePolicy model - = new ImportRoutePolicy().withImportIpv4RoutePolicyId("qi").withImportIpv6RoutePolicyId("zxlhdjzqdcadwv"); + = new ImportRoutePolicy().withImportIpv4RoutePolicyId("k").withImportIpv6RoutePolicyId("dvrgliegftcvbi"); model = BinaryData.fromObject(model).toObject(ImportRoutePolicy.class); - Assertions.assertEquals("qi", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("zxlhdjzqdcadwv", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("k", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("dvrgliegftcvbi", model.importIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..b90acf623886 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBmpPatchProperties model = BinaryData.fromString( + "{\"neighborIpExclusions\":[\"mpdxxzetwwzjwotn\",\"lkfhglhrfoxqwec\",\"snhpcselqx\"],\"bmpConfigurationState\":\"Enabled\"}") + .toObject(InternalNetworkBmpPatchProperties.class); + Assertions.assertEquals("mpdxxzetwwzjwotn", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBmpPatchProperties model = new InternalNetworkBmpPatchProperties() + .withNeighborIpExclusions(Arrays.asList("mpdxxzetwwzjwotn", "lkfhglhrfoxqwec", "snhpcselqx")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(InternalNetworkBmpPatchProperties.class); + Assertions.assertEquals("mpdxxzetwwzjwotn", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java new file mode 100644 index 000000000000..116cc0b9cb86 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBmpProperties model = BinaryData.fromString( + "{\"neighborIpExclusions\":[\"bgnixxoww\",\"kyfwnwpiwxeiicr\",\"p\",\"pk\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"All\",\"Pre-Policy\",\"Post-Policy\"]}}") + .toObject(InternalNetworkBmpProperties.class); + Assertions.assertEquals("bgnixxoww", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBmpProperties model = new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("bgnixxoww", "kyfwnwpiwxeiicr", "p", "pk")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY, + BmpExportPolicy.ALL, BmpExportPolicy.PRE_POLICY, BmpExportPolicy.POST_POLICY))); + model = BinaryData.fromObject(model).toObject(InternalNetworkBmpProperties.class); + Assertions.assertEquals("bgnixxoww", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java index cd16a6ab5d9c..184dbe622032 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,16 +8,25 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -25,127 +34,175 @@ public final class InternalNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"vlanId\":525504138,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":85439569,\"multiplier\":1597212903},\"defaultRouteOriginate\":\"True\",\"allowAS\":1088975953,\"allowASOverride\":\"Disable\",\"fabricASN\":2387743890431883353,\"peerASN\":3699317304286967094,\"ipv4ListenRangePrefixes\":[\"unlpirykycndz\",\"qi\",\"jreuykbbmn\",\"aglt\"],\"ipv6ListenRangePrefixes\":[\"eeonqlnfwm\",\"ymvqdbpbhfckdvez\",\"rcssbzhddubbnq\"],\"ipv4NeighborAddress\":[{\"address\":\"kalehp\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"ugiqjtiogqg\",\"configurationState\":\"Provisioning\"},{\"address\":\"i\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"aj\",\"configurationState\":\"DeferredControl\"}],\"ipv6NeighborAddress\":[{\"address\":\"pnbonhpcz\",\"configurationState\":\"Succeeded\"},{\"address\":\"tp\",\"configurationState\":\"Provisioning\"},{\"address\":\"csehchkhufm\",\"configurationState\":\"Succeeded\"},{\"address\":\"q\",\"configurationState\":\"PendingCommit\"}],\"annotation\":\"dzulo\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1301701466,\"multiplier\":353038412},\"ipv4Routes\":[{\"prefix\":\"senwphpzf\",\"nextHop\":[\"qjcli\",\"ftujwjjufw\",\"eqrkuorhtss\",\"uqnmdvhazcvj\"]}],\"ipv6Routes\":[{\"prefix\":\"qswbqerzwx\",\"nextHop\":[\"txtd\",\"ukvlb\"]},{\"prefix\":\"ktg\",\"nextHop\":[\"tyouambewreswmow\",\"gmmuteyxey\"]}]},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"mtu\":529739852,\"connectedIPv4Subnets\":[{\"prefix\":\"spxlzde\",\"annotation\":\"grijwaiufanrayb\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"qfrojsydgrhyd\",\"annotation\":\"gywezskiec\"},{\"prefix\":\"f\",\"annotation\":\"zmxieqvdsmaklix\"}],\"importRoutePolicyId\":\"ah\",\"exportRoutePolicyId\":\"xalybxawoijpo\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"lxp\",\"importIpv6RoutePolicyId\":\"wjdjodqhykin\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"emehllizh\",\"exportIpv6RoutePolicyId\":\"umoqodkad\"},\"ingressAclId\":\"yibngqladywrxwh\",\"egressAclId\":\"tlu\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"zsn\"},\"id\":\"emlowuowhl\",\"name\":\"lnwy\",\"type\":\"mouvbl\"}") + "{\"properties\":{\"annotation\":\"lflec\",\"extension\":\"NPB\",\"mtu\":1151093762,\"connectedIPv4Subnets\":[{\"prefix\":\"jluxxdhi\",\"annotation\":\"zd\"},{\"prefix\":\"zqjmueza\",\"annotation\":\"vribqlotokht\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"azn\",\"annotation\":\"qww\"},{\"prefix\":\"wjyofgwhnkbtl\",\"annotation\":\"jssmctsnldkpwo\"},{\"prefix\":\"gisubxbt\",\"annotation\":\"gfgf\"},{\"prefix\":\"ij\",\"annotation\":\"kw\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"k\",\"importIpv6RoutePolicyId\":\"qceazfpxgnmq\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"luyqqaiossscyvai\",\"exportIpv6RoutePolicyId\":\"p\"},\"ingressAclId\":\"cvfyeowpsfxtjdhs\",\"egressAclId\":\"mhpv\",\"isMonitoringEnabled\":\"False\",\"vlanId\":1256940600,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1419448739,\"multiplier\":456494066},\"defaultRouteOriginate\":\"False\",\"allowAS\":40088997,\"allowASOverride\":\"Disable\",\"fabricASN\":5433663899923832163,\"peerASN\":8465563790487729489,\"ipv4ListenRangePrefixes\":[\"dedsuenygnxcgjtf\"],\"ipv6ListenRangePrefixes\":[\"uktrfnslnlrx\",\"myltrwntfmtbg\",\"jdxwnazkurrdre\"],\"ipv4NeighborAddress\":[{\"address\":\"hsetwwj\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"kykcyqhyqqzz\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"PendingCommit\"},{\"address\":\"ewfopazdazg\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"c\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"lq\"],\"bmpConfigurationState\":\"Enabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\"]}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"yowmndcovdw\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":177742602,\"multiplier\":1293844399},\"ipv4Routes\":[{\"prefix\":\"vfruwkudrbcpft\",\"nextHop\":[\"dqyemebunaucm\",\"irtneemmjau\"]},{\"prefix\":\"cgxefnohaitraniz\",\"nextHop\":[\"wgudasmxu\",\"vfbngfco\",\"ef\"]},{\"prefix\":\"priylfmp\",\"nextHop\":[\"raudsvhlcdcul\",\"egpqtmo\"]}],\"ipv6Routes\":[{\"prefix\":\"rztnv\",\"nextHop\":[\"shqrdgrt\",\"mewjzlpyk\",\"fa\"]}],\"extension\":\"NPB\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1458002388,\"threshold\":2138882754,\"idleTimeExpiry\":1724482587},{\"maximumRoutes\":1121969005,\"threshold\":1795034421,\"idleTimeExpiry\":362600474},{\"maximumRoutes\":1074401951,\"threshold\":1132932297,\"idleTimeExpiry\":606699153}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1138228089,\"threshold\":1712906594,\"idleTimeExpiry\":2011304532},{\"maximumRoutes\":1421281545,\"threshold\":1224722577,\"idleTimeExpiry\":2111387998},{\"maximumRoutes\":2003402338,\"threshold\":325474754,\"idleTimeExpiry\":941574835}]},\"lastOperation\":{\"details\":\"fqwtltngvm\"},\"networkFabricId\":\"uptrklz\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"id\":\"xfsv\",\"name\":\"ghmp\",\"type\":\"nwlslrcigtzjcvbx\"}") .toObject(InternalNetworkInner.class); - Assertions.assertEquals(525504138, model.vlanId()); - Assertions.assertEquals("dzulo", model.bgpConfiguration().annotation()); - Assertions.assertEquals(85439569, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1597212903, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1088975953, model.bgpConfiguration().allowAS()); + Assertions.assertEquals("lflec", model.annotation()); + Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1151093762, model.mtu()); + Assertions.assertEquals("zd", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("jluxxdhi", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("qww", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("azn", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("k", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qceazfpxgnmq", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("luyqqaiossscyvai", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("p", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("cvfyeowpsfxtjdhs", model.ingressAclId()); + Assertions.assertEquals("mhpv", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); + Assertions.assertEquals(1256940600, model.vlanId()); + Assertions.assertEquals("yowmndcovdw", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1419448739, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(456494066, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(40088997, model.bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(3699317304286967094L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("unlpirykycndz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("eeonqlnfwm", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("kalehp", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("pnbonhpcz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1301701466, + Assertions.assertEquals(8465563790487729489L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("dedsuenygnxcgjtf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("uktrfnslnlrx", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("hsetwwj", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("kykcyqhyqqzz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lq", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + model.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(177742602, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(353038412, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("senwphpzf", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("qjcli", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("qswbqerzwx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("txtd", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(529739852, model.mtu()); - Assertions.assertEquals("grijwaiufanrayb", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("spxlzde", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("gywezskiec", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("qfrojsydgrhyd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ah", model.importRoutePolicyId()); - Assertions.assertEquals("xalybxawoijpo", model.exportRoutePolicyId()); - Assertions.assertEquals("lxp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("wjdjodqhykin", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("emehllizh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("umoqodkad", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("yibngqladywrxwh", model.ingressAclId()); - Assertions.assertEquals("tlu", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); - Assertions.assertEquals("zsn", model.annotation()); + Assertions.assertEquals(1293844399, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("vfruwkudrbcpft", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("dqyemebunaucm", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("rztnv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("shqrdgrt", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.staticRouteConfiguration().extension()); + Assertions.assertEquals(1458002388, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2138882754, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1724482587, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1138228089, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1712906594, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2011304532, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkInner model = new InternalNetworkInner().withVlanId(525504138) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("dzulo") + InternalNetworkInner model = new InternalNetworkInner().withAnnotation("lflec") + .withExtension(Extension.NPB) + .withMtu(1151093762) + .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withAnnotation("zd").withPrefix("jluxxdhi"), + new ConnectedSubnet().withAnnotation("vribqlotokht").withPrefix("zqjmueza"))) + .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withAnnotation("qww").withPrefix("azn"), + new ConnectedSubnet().withAnnotation("jssmctsnldkpwo").withPrefix("wjyofgwhnkbtl"), + new ConnectedSubnet().withAnnotation("gfgf").withPrefix("gisubxbt"), + new ConnectedSubnet().withAnnotation("kw").withPrefix("ij"))) + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("k").withImportIpv6RoutePolicyId("qceazfpxgnmq")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("luyqqaiossscyvai") + .withExportIpv6RoutePolicyId("p")) + .withIngressAclId("cvfyeowpsfxtjdhs") + .withEgressAclId("mhpv") + .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) + .withVlanId(1256940600) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("yowmndcovdw") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(85439569).withMultiplier(1597212903)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1088975953) + new BfdConfiguration().withIntervalInMilliSeconds(1419448739).withMultiplier(456494066)) + .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) + .withAllowAS(40088997) .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(3699317304286967094L) - .withIpv4ListenRangePrefixes(Arrays.asList("unlpirykycndz", "qi", "jreuykbbmn", "aglt")) - .withIpv6ListenRangePrefixes(Arrays.asList("eeonqlnfwm", "ymvqdbpbhfckdvez", "rcssbzhddubbnq")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("kalehp"), - new NeighborAddress().withAddress("ugiqjtiogqg"), new NeighborAddress().withAddress("i"), - new NeighborAddress().withAddress("aj"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("pnbonhpcz"), - new NeighborAddress().withAddress("tp"), new NeighborAddress().withAddress("csehchkhufm"), - new NeighborAddress().withAddress("q")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() + .withPeerAsn(8465563790487729489L) + .withIpv4ListenRangePrefixes(Arrays.asList("dedsuenygnxcgjtf")) + .withIpv6ListenRangePrefixes(Arrays.asList("uktrfnslnlrx", "myltrwntfmtbg", "jdxwnazkurrdre")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("hsetwwj"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("kykcyqhyqqzz"), + new NeighborAddress().withAddress("ewfopazdazg"), new NeighborAddress().withAddress("c"))) + .withBmpConfiguration( + new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("lq")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.POST_POLICY)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1301701466).withMultiplier(353038412)) - .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("senwphpzf") - .withNextHop(Arrays.asList("qjcli", "ftujwjjufw", "eqrkuorhtss", "uqnmdvhazcvj")))) - .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qswbqerzwx").withNextHop(Arrays.asList("txtd", "ukvlb")), - new StaticRouteProperties().withPrefix("ktg") - .withNextHop(Arrays.asList("tyouambewreswmow", "gmmuteyxey")))) - .withExtension(Extension.NO_EXTENSION)) - .withMtu(529739852) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("grijwaiufanrayb").withPrefix("spxlzde"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("gywezskiec").withPrefix("qfrojsydgrhyd"), - new ConnectedSubnet().withAnnotation("zmxieqvdsmaklix").withPrefix("f"))) - .withImportRoutePolicyId("ah") - .withExportRoutePolicyId("xalybxawoijpo") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("lxp").withImportIpv6RoutePolicyId("wjdjodqhykin")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("emehllizh") - .withExportIpv6RoutePolicyId("umoqodkad")) - .withIngressAclId("yibngqladywrxwh") - .withEgressAclId("tlu") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NPB) - .withAnnotation("zsn"); + new BfdConfiguration().withIntervalInMilliSeconds(177742602).withMultiplier(1293844399)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("vfruwkudrbcpft") + .withNextHop(Arrays.asList("dqyemebunaucm", "irtneemmjau")), + new StaticRouteProperties().withPrefix("cgxefnohaitraniz") + .withNextHop(Arrays.asList("wgudasmxu", "vfbngfco", "ef")), + new StaticRouteProperties().withPrefix("priylfmp") + .withNextHop(Arrays.asList("raudsvhlcdcul", "egpqtmo")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("rztnv") + .withNextHop(Arrays.asList("shqrdgrt", "mewjzlpyk", "fa")))) + .withExtension(Extension.NPB)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1458002388) + .withThreshold(2138882754) + .withIdleTimeExpiry(1724482587), + new PrefixLimitProperties().withMaximumRoutes(1121969005) + .withThreshold(1795034421) + .withIdleTimeExpiry(362600474), + new PrefixLimitProperties().withMaximumRoutes(1074401951) + .withThreshold(1132932297) + .withIdleTimeExpiry(606699153)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1138228089) + .withThreshold(1712906594) + .withIdleTimeExpiry(2011304532), + new PrefixLimitProperties().withMaximumRoutes(1421281545) + .withThreshold(1224722577) + .withIdleTimeExpiry(2111387998), + new PrefixLimitProperties().withMaximumRoutes(2003402338) + .withThreshold(325474754) + .withIdleTimeExpiry(941574835)))); model = BinaryData.fromObject(model).toObject(InternalNetworkInner.class); - Assertions.assertEquals(525504138, model.vlanId()); - Assertions.assertEquals("dzulo", model.bgpConfiguration().annotation()); - Assertions.assertEquals(85439569, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1597212903, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1088975953, model.bgpConfiguration().allowAS()); + Assertions.assertEquals("lflec", model.annotation()); + Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1151093762, model.mtu()); + Assertions.assertEquals("zd", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("jluxxdhi", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("qww", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("azn", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("k", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qceazfpxgnmq", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("luyqqaiossscyvai", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("p", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("cvfyeowpsfxtjdhs", model.ingressAclId()); + Assertions.assertEquals("mhpv", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); + Assertions.assertEquals(1256940600, model.vlanId()); + Assertions.assertEquals("yowmndcovdw", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1419448739, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(456494066, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(40088997, model.bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(3699317304286967094L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("unlpirykycndz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("eeonqlnfwm", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("kalehp", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("pnbonhpcz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1301701466, + Assertions.assertEquals(8465563790487729489L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("dedsuenygnxcgjtf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("uktrfnslnlrx", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("hsetwwj", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("kykcyqhyqqzz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lq", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + model.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(177742602, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(353038412, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("senwphpzf", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("qjcli", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("qswbqerzwx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("txtd", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(529739852, model.mtu()); - Assertions.assertEquals("grijwaiufanrayb", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("spxlzde", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("gywezskiec", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("qfrojsydgrhyd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ah", model.importRoutePolicyId()); - Assertions.assertEquals("xalybxawoijpo", model.exportRoutePolicyId()); - Assertions.assertEquals("lxp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("wjdjodqhykin", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("emehllizh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("umoqodkad", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("yibngqladywrxwh", model.ingressAclId()); - Assertions.assertEquals("tlu", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); - Assertions.assertEquals("zsn", model.annotation()); + Assertions.assertEquals(1293844399, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("vfruwkudrbcpft", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("dqyemebunaucm", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("rztnv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("shqrdgrt", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.staticRouteConfiguration().extension()); + Assertions.assertEquals(1458002388, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2138882754, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1724482587, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1138228089, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1712906594, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2011304532, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java index d91b59e9b9fb..1d9d6eca1497 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java @@ -1,22 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -24,123 +31,160 @@ public final class InternalNetworkPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkPatchProperties model = BinaryData.fromString( - "{\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1340286391,\"multiplier\":2065842575},\"defaultRouteOriginate\":\"False\",\"allowAS\":1132415165,\"allowASOverride\":\"Enable\",\"fabricASN\":7575593636037986210,\"peerASN\":771473352350641992,\"ipv4ListenRangePrefixes\":[\"dphmtybkcgsuth\",\"llnmwyn\",\"fxexlfciatxtjrr\"],\"ipv6ListenRangePrefixes\":[\"dskjhhxdlaj\",\"oxcxscvslx\",\"hu\",\"vkrmukmyjmkx\"],\"ipv4NeighborAddress\":[{\"address\":\"slojfkqidnqt\",\"configurationState\":\"Rejected\"},{\"address\":\"hqxc\",\"configurationState\":\"ErrorDeprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"tnq\",\"configurationState\":\"Deprovisioned\"}],\"annotation\":\"ld\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1527865804,\"multiplier\":26223808},\"ipv4Routes\":[{\"prefix\":\"qkzn\",\"nextHop\":[\"hllxricctkw\"]},{\"prefix\":\"uqqoaj\",\"nextHop\":[\"iygle\",\"rwvaexhdc\",\"rceqnkbrupob\",\"hdmljz\"]},{\"prefix\":\"cvumepjpbi\",\"nextHop\":[\"zpphepif\",\"xleqircc\",\"cly\"]},{\"prefix\":\"cgxvrpj\",\"nextHop\":[\"czuod\",\"cpunettepdjx\",\"eskoy\"]}],\"ipv6Routes\":[{\"prefix\":\"ylpckaewsedv\",\"nextHop\":[\"kwxe\",\"qphr\"]},{\"prefix\":\"fn\",\"nextHop\":[\"ctmjtsghpbcbc\",\"zarpzeqacdldt\",\"mpypefcpczshnuq\"]}]},\"mtu\":830792514,\"connectedIPv4Subnets\":[{\"prefix\":\"upfkhuytuszxhmtv\",\"annotation\":\"egw\"},{\"prefix\":\"iukvzwydwt\",\"annotation\":\"aokgkskjivbsshaj\"},{\"prefix\":\"fukpeexpgeu\",\"annotation\":\"lh\"},{\"prefix\":\"uitrdexyiono\",\"annotation\":\"inbd\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"xcwqqrsmpc\",\"annotation\":\"prtug\"}],\"importRoutePolicyId\":\"bzbcyksiv\",\"exportRoutePolicyId\":\"ogd\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"fcmkr\",\"importIpv6RoutePolicyId\":\"sjcwjjxsgmbawvif\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"eci\",\"exportIpv6RoutePolicyId\":\"ocjxw\"},\"ingressAclId\":\"ooz\",\"egressAclId\":\"txvcm\",\"isMonitoringEnabled\":\"True\",\"annotation\":\"lcpx\"}") + "{\"annotation\":\"imseobf\",\"mtu\":1688620410,\"connectedIPv4Subnets\":[{\"prefix\":\"yilbvz\",\"annotation\":\"xcjzlquze\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"jxebj\",\"annotation\":\"zinzabwmvogljsvl\"},{\"prefix\":\"gi\",\"annotation\":\"wcehaqidoyzlt\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"mqoqpepiaeapfse\",\"importIpv6RoutePolicyId\":\"dt\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"nacyheqwb\",\"exportIpv6RoutePolicyId\":\"qncjubkhjozfymcw\"},\"ingressAclId\":\"upyvqyvliq\",\"egressAclId\":\"psejbsvsiaies\",\"isMonitoringEnabled\":\"False\",\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":537543493,\"multiplier\":980486182},\"defaultRouteOriginate\":\"False\",\"allowAS\":659410436,\"allowASOverride\":\"Disable\",\"fabricASN\":916767531355915182,\"peerASN\":6196527848923880055,\"ipv4ListenRangePrefixes\":[\"td\",\"i\"],\"ipv6ListenRangePrefixes\":[\"qibzji\",\"weebiphryv\"],\"ipv4NeighborAddress\":[{\"address\":\"w\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"dhzybsp\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingAdministrativeUpdate\"},{\"address\":\"kkagvwukhsusmmor\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"zhnijmr\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Accepted\"}],\"ipv6NeighborAddress\":[{\"address\":\"tlrcxivcbkutpu\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"xynbpvzlqywa\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"},{\"address\":\"mocgjshg\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"DeferredControl\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"qggljkybs\",\"rcl\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"ctbhpjhxpcvrd\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":192844445,\"multiplier\":927888841},\"ipv4Routes\":[{\"prefix\":\"y\",\"nextHop\":[\"jahwriuomzczf\",\"iceevsaaxwspca\",\"ikhfjqebglcxk\"]},{\"prefix\":\"gzzromv\",\"nextHop\":[\"ysemtmesrfsvpin\"]},{\"prefix\":\"zpatqtd\",\"nextHop\":[\"wxspvckojaz\",\"bgspf\",\"esubzpvpv\"]}],\"ipv6Routes\":[{\"prefix\":\"ytcovqs\",\"nextHop\":[\"srfjbdxzfxnx\"]}]},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":2144106709,\"threshold\":1990129736,\"idleTimeExpiry\":1190686584},{\"maximumRoutes\":1337968944,\"threshold\":1825615369,\"idleTimeExpiry\":361246762},{\"maximumRoutes\":1005110157,\"threshold\":1999216933,\"idleTimeExpiry\":987897246}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1746493890,\"threshold\":2076016074,\"idleTimeExpiry\":1560339183},{\"maximumRoutes\":709800323,\"threshold\":211159585,\"idleTimeExpiry\":1577883742}]}}") .toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("lcpx", model.annotation()); - Assertions.assertEquals("ld", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1340286391, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2065842575, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("imseobf", model.annotation()); + Assertions.assertEquals(1688620410, model.mtu()); + Assertions.assertEquals("xcjzlquze", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yilbvz", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("zinzabwmvogljsvl", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("jxebj", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("mqoqpepiaeapfse", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("dt", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("nacyheqwb", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qncjubkhjozfymcw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("upyvqyvliq", model.ingressAclId()); + Assertions.assertEquals("psejbsvsiaies", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); + Assertions.assertEquals("ctbhpjhxpcvrd", model.bgpConfiguration().annotation()); + Assertions.assertEquals(537543493, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(980486182, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1132415165, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(771473352350641992L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("dphmtybkcgsuth", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("dskjhhxdlaj", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("slojfkqidnqt", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("tnq", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1527865804, + Assertions.assertEquals(659410436, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(6196527848923880055L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("td", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("qibzji", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("w", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("tlrcxivcbkutpu", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("qggljkybs", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(192844445, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(26223808, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qkzn", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hllxricctkw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ylpckaewsedv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kwxe", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(830792514, model.mtu()); - Assertions.assertEquals("egw", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("prtug", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xcwqqrsmpc", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("bzbcyksiv", model.importRoutePolicyId()); - Assertions.assertEquals("ogd", model.exportRoutePolicyId()); - Assertions.assertEquals("fcmkr", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("sjcwjjxsgmbawvif", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("eci", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ocjxw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ooz", model.ingressAclId()); - Assertions.assertEquals("txvcm", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(927888841, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("y", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jahwriuomzczf", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ytcovqs", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("srfjbdxzfxnx", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(2144106709, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1990129736, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1190686584, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1746493890, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2076016074, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1560339183, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkPatchProperties model = new InternalNetworkPatchProperties().withAnnotation("lcpx") - .withBgpConfiguration(new BgpConfiguration().withAnnotation("ld") + InternalNetworkPatchProperties model = new InternalNetworkPatchProperties().withAnnotation("imseobf") + .withMtu(1688620410) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("xcjzlquze").withPrefix("yilbvz"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("zinzabwmvogljsvl").withPrefix("jxebj"), + new ConnectedSubnetPatch().withAnnotation("wcehaqidoyzlt").withPrefix("gi"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("mqoqpepiaeapfse") + .withImportIpv6RoutePolicyId("dt")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("nacyheqwb") + .withExportIpv6RoutePolicyId("qncjubkhjozfymcw")) + .withIngressAclId("upyvqyvliq") + .withEgressAclId("psejbsvsiaies") + .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("ctbhpjhxpcvrd") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1340286391).withMultiplier(2065842575)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(537543493).withMultiplier(980486182)) .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1132415165) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(771473352350641992L) - .withIpv4ListenRangePrefixes(Arrays.asList("dphmtybkcgsuth", "llnmwyn", "fxexlfciatxtjrr")) - .withIpv6ListenRangePrefixes(Arrays.asList("dskjhhxdlaj", "oxcxscvslx", "hu", "vkrmukmyjmkx")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("slojfkqidnqt"), - new NeighborAddress().withAddress("hqxc"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("tnq")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withAllowAS(659410436) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerAsn(6196527848923880055L) + .withIpv4ListenRangePrefixes(Arrays.asList("td", "i")) + .withIpv6ListenRangePrefixes(Arrays.asList("qibzji", "weebiphryv")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("w"), + new NeighborAddressPatch().withAddress("dhzybsp"), + new NeighborAddressPatch().withAddress("kkagvwukhsusmmor"), + new NeighborAddressPatch().withAddress("zhnijmr"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("tlrcxivcbkutpu"), + new NeighborAddressPatch().withAddress("xynbpvzlqywa"), + new NeighborAddressPatch().withAddress("mocgjshg"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("qggljkybs", "rcl")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1527865804).withMultiplier(26223808)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(192844445).withMultiplier(927888841)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qkzn").withNextHop(Arrays.asList("hllxricctkw")), - new StaticRouteProperties().withPrefix("uqqoaj") - .withNextHop(Arrays.asList("iygle", "rwvaexhdc", "rceqnkbrupob", "hdmljz")), - new StaticRouteProperties().withPrefix("cvumepjpbi") - .withNextHop(Arrays.asList("zpphepif", "xleqircc", "cly")), - new StaticRouteProperties().withPrefix("cgxvrpj") - .withNextHop(Arrays.asList("czuod", "cpunettepdjx", "eskoy")))) + new StaticRoutePatchProperties().withPrefix("y") + .withNextHop(Arrays.asList("jahwriuomzczf", "iceevsaaxwspca", "ikhfjqebglcxk")), + new StaticRoutePatchProperties().withPrefix("gzzromv") + .withNextHop(Arrays.asList("ysemtmesrfsvpin")), + new StaticRoutePatchProperties().withPrefix("zpatqtd") + .withNextHop(Arrays.asList("wxspvckojaz", "bgspf", "esubzpvpv")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ylpckaewsedv").withNextHop(Arrays.asList("kwxe", "qphr")), - new StaticRouteProperties().withPrefix("fn") - .withNextHop(Arrays.asList("ctmjtsghpbcbc", "zarpzeqacdldt", "mpypefcpczshnuq"))))) - .withMtu(830792514) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("egw").withPrefix("upfkhuytuszxhmtv"), - new ConnectedSubnet().withAnnotation("aokgkskjivbsshaj").withPrefix("iukvzwydwt"), - new ConnectedSubnet().withAnnotation("lh").withPrefix("fukpeexpgeu"), - new ConnectedSubnet().withAnnotation("inbd").withPrefix("uitrdexyiono"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("prtug").withPrefix("xcwqqrsmpc"))) - .withImportRoutePolicyId("bzbcyksiv") - .withExportRoutePolicyId("ogd") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("fcmkr") - .withImportIpv6RoutePolicyId("sjcwjjxsgmbawvif")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("eci").withExportIpv6RoutePolicyId("ocjxw")) - .withIngressAclId("ooz") - .withEgressAclId("txvcm") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE); + new StaticRoutePatchProperties().withPrefix("ytcovqs").withNextHop(Arrays.asList("srfjbdxzfxnx"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(2144106709) + .withThreshold(1990129736) + .withIdleTimeExpiry(1190686584), + new PrefixLimitPatchProperties().withMaximumRoutes(1337968944) + .withThreshold(1825615369) + .withIdleTimeExpiry(361246762), + new PrefixLimitPatchProperties().withMaximumRoutes(1005110157) + .withThreshold(1999216933) + .withIdleTimeExpiry(987897246)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1746493890) + .withThreshold(2076016074) + .withIdleTimeExpiry(1560339183), + new PrefixLimitPatchProperties().withMaximumRoutes(709800323) + .withThreshold(211159585) + .withIdleTimeExpiry(1577883742)))); model = BinaryData.fromObject(model).toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("lcpx", model.annotation()); - Assertions.assertEquals("ld", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1340286391, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2065842575, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("imseobf", model.annotation()); + Assertions.assertEquals(1688620410, model.mtu()); + Assertions.assertEquals("xcjzlquze", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yilbvz", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("zinzabwmvogljsvl", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("jxebj", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("mqoqpepiaeapfse", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("dt", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("nacyheqwb", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qncjubkhjozfymcw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("upyvqyvliq", model.ingressAclId()); + Assertions.assertEquals("psejbsvsiaies", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); + Assertions.assertEquals("ctbhpjhxpcvrd", model.bgpConfiguration().annotation()); + Assertions.assertEquals(537543493, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(980486182, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1132415165, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(771473352350641992L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("dphmtybkcgsuth", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("dskjhhxdlaj", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("slojfkqidnqt", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("tnq", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1527865804, + Assertions.assertEquals(659410436, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(6196527848923880055L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("td", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("qibzji", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("w", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("tlrcxivcbkutpu", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("qggljkybs", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(192844445, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(26223808, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qkzn", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hllxricctkw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ylpckaewsedv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kwxe", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(830792514, model.mtu()); - Assertions.assertEquals("egw", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("prtug", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xcwqqrsmpc", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("bzbcyksiv", model.importRoutePolicyId()); - Assertions.assertEquals("ogd", model.exportRoutePolicyId()); - Assertions.assertEquals("fcmkr", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("sjcwjjxsgmbawvif", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("eci", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ocjxw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ooz", model.ingressAclId()); - Assertions.assertEquals("txvcm", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(927888841, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("y", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jahwriuomzczf", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ytcovqs", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("srfjbdxzfxnx", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(2144106709, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1990129736, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1190686584, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1746493890, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2076016074, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1560339183, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java index f5af914d66cc..3dd1faff128c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java @@ -1,22 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -24,124 +31,167 @@ public final class InternalNetworkPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkPatch model = BinaryData.fromString( - "{\"properties\":{\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1115141290,\"multiplier\":1604281070},\"defaultRouteOriginate\":\"False\",\"allowAS\":1640336764,\"allowASOverride\":\"Enable\",\"fabricASN\":5940630190503622951,\"peerASN\":8920710926846800663,\"ipv4ListenRangePrefixes\":[\"uyvpirf\",\"jpnqnoowsbeden\"],\"ipv6ListenRangePrefixes\":[\"k\",\"bhxv\"],\"ipv4NeighborAddress\":[{\"address\":\"lgmnhjevdyzn\",\"configurationState\":\"Provisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"skmqozzkivyhj\",\"configurationState\":\"Failed\"},{\"address\":\"zji\",\"configurationState\":\"Accepted\"},{\"address\":\"hefkwabsolronqq\",\"configurationState\":\"Provisioning\"}],\"annotation\":\"lqxsjxtelex\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":267543853,\"multiplier\":95279837},\"ipv4Routes\":[{\"prefix\":\"qocarkuzlbc\",\"nextHop\":[\"dtsnxawqytllhdyz\",\"yckzex\",\"xak\",\"kywymxgaabj\"]},{\"prefix\":\"dtfohfaog\",\"nextHop\":[\"kiwrsiw\",\"y\",\"quryk\",\"rra\"]}],\"ipv6Routes\":[{\"prefix\":\"kcsueho\",\"nextHop\":[\"dac\",\"cbgydlqi\",\"ywmhmptyrilkfbnr\",\"qxvztpbnfnqtxjt\"]},{\"prefix\":\"m\",\"nextHop\":[\"swbnfddepldwqjns\",\"zygleexahvm\"]}]},\"mtu\":1943613509,\"connectedIPv4Subnets\":[{\"prefix\":\"rcarycsjj\",\"annotation\":\"voaqajuvehzptdmk\"},{\"prefix\":\"rbhmpfulubef\",\"annotation\":\"bpmfbfununmpzkrv\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"fkd\",\"annotation\":\"hlzvfictnkjj\"},{\"prefix\":\"gcwn\",\"annotation\":\"bkgfyrtogmhmjpjs\"},{\"prefix\":\"dfpdqwtygevg\",\"annotation\":\"sehar\"}],\"importRoutePolicyId\":\"fv\",\"exportRoutePolicyId\":\"rxtmbpjptnvw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"sidqpxlbtpakft\",\"importIpv6RoutePolicyId\":\"atw\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yutrymd\",\"exportIpv6RoutePolicyId\":\"fj\"},\"ingressAclId\":\"y\",\"egressAclId\":\"jqdvdwkqpldrlefg\",\"isMonitoringEnabled\":\"False\",\"annotation\":\"uagntetaou\"}}") + "{\"properties\":{\"annotation\":\"obrqlp\",\"mtu\":43231949,\"connectedIPv4Subnets\":[{\"prefix\":\"pzuyudivbxnh\",\"annotation\":\"eaeonqelwgdh\"},{\"prefix\":\"ruzytzaro\",\"annotation\":\"tmol\"},{\"prefix\":\"iywmpinmzvfkn\",\"annotation\":\"rzztrk\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"ulugdybnhrxlelfj\",\"annotation\":\"eizcpih\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"iwje\",\"importIpv6RoutePolicyId\":\"tycaydbjzcqyml\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zhmhsur\",\"exportIpv6RoutePolicyId\":\"wqkpmmzpsta\"},\"ingressAclId\":\"lawiubmomsgvvjhv\",\"egressAclId\":\"rlohe\",\"isMonitoringEnabled\":\"True\",\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":741960981,\"multiplier\":688757979},\"defaultRouteOriginate\":\"True\",\"allowAS\":447595021,\"allowASOverride\":\"Disable\",\"fabricASN\":1815318042633891025,\"peerASN\":2390244070144387358,\"ipv4ListenRangePrefixes\":[\"xjoshohtotryegpk\",\"xrmexznlw\",\"bfokxkhu\",\"ze\"],\"ipv6ListenRangePrefixes\":[\"g\",\"blcdrmyf\"],\"ipv4NeighborAddress\":[{\"address\":\"t\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"PendingCommit\"},{\"address\":\"ugekdfqn\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Failed\"}],\"ipv6NeighborAddress\":[{\"address\":\"fjjnnuxxr\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Succeeded\"},{\"address\":\"wempdcifrhju\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"usnaw\",\"hhgzotf\",\"iyrgkoek\",\"zwx\"],\"bmpConfigurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"t\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":631913462,\"multiplier\":1299436949},\"ipv4Routes\":[{\"prefix\":\"eykvskiczd\",\"nextHop\":[\"jei\",\"ikgqaboohxbms\"]},{\"prefix\":\"ycqsxr\",\"nextHop\":[\"vewuyqaeoh\"]},{\"prefix\":\"jh\",\"nextHop\":[\"jkbvhhdaurgho\",\"xaex\",\"k\",\"xjxjoe\"]},{\"prefix\":\"lqxr\",\"nextHop\":[\"knkob\",\"ktmbozomtzami\"]}],\"ipv6Routes\":[{\"prefix\":\"gwcd\",\"nextHop\":[\"sez\",\"uxk\",\"uairaabmdlqjb\",\"dp\"]},{\"prefix\":\"ixlhupm\",\"nextHop\":[\"ihzbdnpxpk\",\"dpr\",\"yxelyicghflr\"]},{\"prefix\":\"fss\",\"nextHop\":[\"ghsfxrkbhammgmqf\",\"efgvqcp\"]}]},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":869379481,\"threshold\":1451281387,\"idleTimeExpiry\":892547352},{\"maximumRoutes\":1724956960,\"threshold\":623314328,\"idleTimeExpiry\":632132991},{\"maximumRoutes\":1975474027,\"threshold\":27796894,\"idleTimeExpiry\":654444535}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":615370227,\"threshold\":1611420396,\"idleTimeExpiry\":929955437},{\"maximumRoutes\":1900085182,\"threshold\":1042074463,\"idleTimeExpiry\":1266009304},{\"maximumRoutes\":1729908538,\"threshold\":2047568201,\"idleTimeExpiry\":1932285332}]}}}") .toObject(InternalNetworkPatch.class); - Assertions.assertEquals("lqxsjxtelex", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1115141290, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1604281070, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1640336764, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8920710926846800663L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("uyvpirf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("k", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("lgmnhjevdyzn", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("skmqozzkivyhj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(267543853, + Assertions.assertEquals("obrqlp", model.annotation()); + Assertions.assertEquals(43231949, model.mtu()); + Assertions.assertEquals("eaeonqelwgdh", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("pzuyudivbxnh", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("eizcpih", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("ulugdybnhrxlelfj", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("iwje", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("tycaydbjzcqyml", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("zhmhsur", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("wqkpmmzpsta", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("lawiubmomsgvvjhv", model.ingressAclId()); + Assertions.assertEquals("rlohe", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals("t", model.bgpConfiguration().annotation()); + Assertions.assertEquals(741960981, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(688757979, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(447595021, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(2390244070144387358L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("xjoshohtotryegpk", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("g", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("t", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("fjjnnuxxr", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("usnaw", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(631913462, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(95279837, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qocarkuzlbc", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("dtsnxawqytllhdyz", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcsueho", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("dac", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(1943613509, model.mtu()); - Assertions.assertEquals("voaqajuvehzptdmk", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("rcarycsjj", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("hlzvfictnkjj", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fkd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("fv", model.importRoutePolicyId()); - Assertions.assertEquals("rxtmbpjptnvw", model.exportRoutePolicyId()); - Assertions.assertEquals("sidqpxlbtpakft", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("atw", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("yutrymd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("y", model.ingressAclId()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - Assertions.assertEquals("uagntetaou", model.annotation()); + Assertions.assertEquals(1299436949, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("eykvskiczd", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jei", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gwcd", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("sez", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(869379481, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1451281387, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(892547352, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(615370227, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1611420396, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(929955437, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkPatch model = new InternalNetworkPatch() - .withBgpConfiguration(new BgpConfiguration().withAnnotation("lqxsjxtelex") + InternalNetworkPatch model = new InternalNetworkPatch().withAnnotation("obrqlp") + .withMtu(43231949) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("eaeonqelwgdh").withPrefix("pzuyudivbxnh"), + new ConnectedSubnetPatch().withAnnotation("tmol").withPrefix("ruzytzaro"), + new ConnectedSubnetPatch().withAnnotation("rzztrk").withPrefix("iywmpinmzvfkn"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("eizcpih").withPrefix("ulugdybnhrxlelfj"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("iwje") + .withImportIpv6RoutePolicyId("tycaydbjzcqyml")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("zhmhsur") + .withExportIpv6RoutePolicyId("wqkpmmzpsta")) + .withIngressAclId("lawiubmomsgvvjhv") + .withEgressAclId("rlohe") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("t") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1115141290).withMultiplier(1604281070)) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1640336764) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(8920710926846800663L) - .withIpv4ListenRangePrefixes(Arrays.asList("uyvpirf", "jpnqnoowsbeden")) - .withIpv6ListenRangePrefixes(Arrays.asList("k", "bhxv")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("lgmnhjevdyzn"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("skmqozzkivyhj"), - new NeighborAddress().withAddress("zji"), new NeighborAddress().withAddress("hefkwabsolronqq")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() + new BfdPatchConfiguration().withIntervalInMilliSeconds(741960981).withMultiplier(688757979)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(447595021) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerAsn(2390244070144387358L) + .withIpv4ListenRangePrefixes(Arrays.asList("xjoshohtotryegpk", "xrmexznlw", "bfokxkhu", "ze")) + .withIpv6ListenRangePrefixes(Arrays.asList("g", "blcdrmyf")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("t"), + new NeighborAddressPatch().withAddress("ugekdfqn"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("fjjnnuxxr"), + new NeighborAddressPatch().withAddress("wempdcifrhju"))) + .withBmpConfiguration(new InternalNetworkBmpPatchProperties() + .withNeighborIpExclusions(Arrays.asList("usnaw", "hhgzotf", "iyrgkoek", "zwx")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(267543853).withMultiplier(95279837)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(631913462).withMultiplier(1299436949)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qocarkuzlbc") - .withNextHop(Arrays.asList("dtsnxawqytllhdyz", "yckzex", "xak", "kywymxgaabj")), - new StaticRouteProperties().withPrefix("dtfohfaog") - .withNextHop(Arrays.asList("kiwrsiw", "y", "quryk", "rra")))) + new StaticRoutePatchProperties().withPrefix("eykvskiczd") + .withNextHop(Arrays.asList("jei", "ikgqaboohxbms")), + new StaticRoutePatchProperties().withPrefix("ycqsxr").withNextHop(Arrays.asList("vewuyqaeoh")), + new StaticRoutePatchProperties().withPrefix("jh") + .withNextHop(Arrays.asList("jkbvhhdaurgho", "xaex", "k", "xjxjoe")), + new StaticRoutePatchProperties().withPrefix("lqxr") + .withNextHop(Arrays.asList("knkob", "ktmbozomtzami")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("kcsueho") - .withNextHop(Arrays.asList("dac", "cbgydlqi", "ywmhmptyrilkfbnr", "qxvztpbnfnqtxjt")), - new StaticRouteProperties().withPrefix("m") - .withNextHop(Arrays.asList("swbnfddepldwqjns", "zygleexahvm"))))) - .withMtu(1943613509) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("voaqajuvehzptdmk").withPrefix("rcarycsjj"), - new ConnectedSubnet().withAnnotation("bpmfbfununmpzkrv").withPrefix("rbhmpfulubef"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("hlzvfictnkjj").withPrefix("fkd"), - new ConnectedSubnet().withAnnotation("bkgfyrtogmhmjpjs").withPrefix("gcwn"), - new ConnectedSubnet().withAnnotation("sehar").withPrefix("dfpdqwtygevg"))) - .withImportRoutePolicyId("fv") - .withExportRoutePolicyId("rxtmbpjptnvw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("sidqpxlbtpakft") - .withImportIpv6RoutePolicyId("atw")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("yutrymd").withExportIpv6RoutePolicyId("fj")) - .withIngressAclId("y") - .withEgressAclId("jqdvdwkqpldrlefg") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withAnnotation("uagntetaou"); + new StaticRoutePatchProperties().withPrefix("gwcd") + .withNextHop(Arrays.asList("sez", "uxk", "uairaabmdlqjb", "dp")), + new StaticRoutePatchProperties().withPrefix("ixlhupm") + .withNextHop(Arrays.asList("ihzbdnpxpk", "dpr", "yxelyicghflr")), + new StaticRoutePatchProperties().withPrefix("fss") + .withNextHop(Arrays.asList("ghsfxrkbhammgmqf", "efgvqcp"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(869379481) + .withThreshold(1451281387) + .withIdleTimeExpiry(892547352), + new PrefixLimitPatchProperties().withMaximumRoutes(1724956960) + .withThreshold(623314328) + .withIdleTimeExpiry(632132991), + new PrefixLimitPatchProperties().withMaximumRoutes(1975474027) + .withThreshold(27796894) + .withIdleTimeExpiry(654444535)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(615370227) + .withThreshold(1611420396) + .withIdleTimeExpiry(929955437), + new PrefixLimitPatchProperties().withMaximumRoutes(1900085182) + .withThreshold(1042074463) + .withIdleTimeExpiry(1266009304), + new PrefixLimitPatchProperties().withMaximumRoutes(1729908538) + .withThreshold(2047568201) + .withIdleTimeExpiry(1932285332)))); model = BinaryData.fromObject(model).toObject(InternalNetworkPatch.class); - Assertions.assertEquals("lqxsjxtelex", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1115141290, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1604281070, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1640336764, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8920710926846800663L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("uyvpirf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("k", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("lgmnhjevdyzn", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("skmqozzkivyhj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(267543853, + Assertions.assertEquals("obrqlp", model.annotation()); + Assertions.assertEquals(43231949, model.mtu()); + Assertions.assertEquals("eaeonqelwgdh", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("pzuyudivbxnh", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("eizcpih", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("ulugdybnhrxlelfj", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("iwje", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("tycaydbjzcqyml", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("zhmhsur", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("wqkpmmzpsta", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("lawiubmomsgvvjhv", model.ingressAclId()); + Assertions.assertEquals("rlohe", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals("t", model.bgpConfiguration().annotation()); + Assertions.assertEquals(741960981, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(688757979, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(447595021, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(2390244070144387358L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("xjoshohtotryegpk", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("g", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("t", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("fjjnnuxxr", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("usnaw", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(631913462, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(95279837, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qocarkuzlbc", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("dtsnxawqytllhdyz", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcsueho", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("dac", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(1943613509, model.mtu()); - Assertions.assertEquals("voaqajuvehzptdmk", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("rcarycsjj", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("hlzvfictnkjj", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fkd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("fv", model.importRoutePolicyId()); - Assertions.assertEquals("rxtmbpjptnvw", model.exportRoutePolicyId()); - Assertions.assertEquals("sidqpxlbtpakft", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("atw", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("yutrymd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("y", model.ingressAclId()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - Assertions.assertEquals("uagntetaou", model.annotation()); + Assertions.assertEquals(1299436949, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("eykvskiczd", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jei", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gwcd", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("sez", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(869379481, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1451281387, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(892547352, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(615370227, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1611420396, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(929955437, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java deleted file mode 100644 index ecdc7e4afb9a..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPatchableProperties model = BinaryData.fromString( - "{\"mtu\":1321268747,\"connectedIPv4Subnets\":[{\"prefix\":\"ailfemjjzak\",\"annotation\":\"jiqul\"},{\"prefix\":\"qx\",\"annotation\":\"mvrscmqerndbrny\"},{\"prefix\":\"ofltfnnxrkadjfy\",\"annotation\":\"fmu\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"ri\",\"annotation\":\"ohykfkxbbcbrw\"},{\"prefix\":\"iutgnjizbeewoiy\",\"annotation\":\"vzbjuyrsrzi\"},{\"prefix\":\"c\",\"annotation\":\"xgbdsuifrevka\"}],\"importRoutePolicyId\":\"ezkiswqjmdghsypa\",\"exportRoutePolicyId\":\"bjufptbjczjnciu\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vldaswv\",\"importIpv6RoutePolicyId\":\"i\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zlgcndhzxrrf\",\"exportIpv6RoutePolicyId\":\"srhkhgsnxuwwkpph\"},\"ingressAclId\":\"sbzxl\",\"egressAclId\":\"xomeikjclwzacn\",\"isMonitoringEnabled\":\"False\"}") - .toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1321268747, model.mtu()); - Assertions.assertEquals("jiqul", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ailfemjjzak", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ohykfkxbbcbrw", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("ri", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ezkiswqjmdghsypa", model.importRoutePolicyId()); - Assertions.assertEquals("bjufptbjczjnciu", model.exportRoutePolicyId()); - Assertions.assertEquals("vldaswv", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("i", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zlgcndhzxrrf", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("sbzxl", model.ingressAclId()); - Assertions.assertEquals("xomeikjclwzacn", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPatchableProperties model = new InternalNetworkPatchableProperties().withMtu(1321268747) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("jiqul").withPrefix("ailfemjjzak"), - new ConnectedSubnet().withAnnotation("mvrscmqerndbrny").withPrefix("qx"), - new ConnectedSubnet().withAnnotation("fmu").withPrefix("ofltfnnxrkadjfy"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("ohykfkxbbcbrw").withPrefix("ri"), - new ConnectedSubnet().withAnnotation("vzbjuyrsrzi").withPrefix("iutgnjizbeewoiy"), - new ConnectedSubnet().withAnnotation("xgbdsuifrevka").withPrefix("c"))) - .withImportRoutePolicyId("ezkiswqjmdghsypa") - .withExportRoutePolicyId("bjufptbjczjnciu") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("vldaswv").withImportIpv6RoutePolicyId("i")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("zlgcndhzxrrf") - .withExportIpv6RoutePolicyId("srhkhgsnxuwwkpph")) - .withIngressAclId("sbzxl") - .withEgressAclId("xomeikjclwzacn") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE); - model = BinaryData.fromObject(model).toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1321268747, model.mtu()); - Assertions.assertEquals("jiqul", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ailfemjjzak", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ohykfkxbbcbrw", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("ri", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ezkiswqjmdghsypa", model.importRoutePolicyId()); - Assertions.assertEquals("bjufptbjczjnciu", model.exportRoutePolicyId()); - Assertions.assertEquals("vldaswv", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("i", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zlgcndhzxrrf", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("sbzxl", model.ingressAclId()); - Assertions.assertEquals("xomeikjclwzacn", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.java deleted file mode 100644 index 0bb1d894bc68..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPropertiesBgpConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPropertiesBgpConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":479544259,\"multiplier\":2023428837},\"defaultRouteOriginate\":\"True\",\"allowAS\":313574832,\"allowASOverride\":\"Disable\",\"fabricASN\":9116002011177336524,\"peerASN\":6420721020164105387,\"ipv4ListenRangePrefixes\":[\"ncq\",\"azqicqchygtv\",\"byjanep\",\"bdpkxyqvgx\"],\"ipv6ListenRangePrefixes\":[\"detv\"],\"ipv4NeighborAddress\":[{\"address\":\"dxuwsaifm\",\"configurationState\":\"Succeeded\"},{\"address\":\"s\",\"configurationState\":\"PendingCommit\"},{\"address\":\"hg\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"cknjolgj\",\"configurationState\":\"Succeeded\"}],\"ipv6NeighborAddress\":[{\"address\":\"lszerqzevx\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"ntxwaljglzob\",\"configurationState\":\"Succeeded\"}],\"annotation\":\"afrqulhm\"}") - .toObject(InternalNetworkPropertiesBgpConfiguration.class); - Assertions.assertEquals("afrqulhm", model.annotation()); - Assertions.assertEquals(479544259, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2023428837, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); - Assertions.assertEquals(313574832, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(6420721020164105387L, model.peerAsn()); - Assertions.assertEquals("ncq", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("detv", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("dxuwsaifm", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("lszerqzevx", model.ipv6NeighborAddress().get(0).address()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPropertiesBgpConfiguration model - = new InternalNetworkPropertiesBgpConfiguration().withAnnotation("afrqulhm") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(479544259).withMultiplier(2023428837)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(313574832) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(6420721020164105387L) - .withIpv4ListenRangePrefixes(Arrays.asList("ncq", "azqicqchygtv", "byjanep", "bdpkxyqvgx")) - .withIpv6ListenRangePrefixes(Arrays.asList("detv")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("dxuwsaifm"), - new NeighborAddress().withAddress("s"), new NeighborAddress().withAddress("hg"), - new NeighborAddress().withAddress("cknjolgj"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("lszerqzevx"), - new NeighborAddress().withAddress("ntxwaljglzob"))); - model = BinaryData.fromObject(model).toObject(InternalNetworkPropertiesBgpConfiguration.class); - Assertions.assertEquals("afrqulhm", model.annotation()); - Assertions.assertEquals(479544259, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2023428837, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); - Assertions.assertEquals(313574832, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(6420721020164105387L, model.peerAsn()); - Assertions.assertEquals("ncq", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("detv", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("dxuwsaifm", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("lszerqzevx", model.ipv6NeighborAddress().get(0).address()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java deleted file mode 100644 index c613325ed00e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.Extension; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPropertiesStaticRouteConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPropertiesStaticRouteConfiguration model = BinaryData.fromString( - "{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":211674107,\"multiplier\":1331398488},\"ipv4Routes\":[{\"prefix\":\"qao\",\"nextHop\":[\"jrkc\",\"amgglvlmfejdoq\",\"ykglt\"]}],\"ipv6Routes\":[{\"prefix\":\"hqfgqkayejsx\",\"nextHop\":[\"gflwfgziiucijj\",\"eatlijjjrtvamcas\"]}]}") - .toObject(InternalNetworkPropertiesStaticRouteConfiguration.class); - Assertions.assertEquals(211674107, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1331398488, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qao", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("jrkc", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hqfgqkayejsx", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("gflwfgziiucijj", model.ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPropertiesStaticRouteConfiguration model - = new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(211674107).withMultiplier(1331398488)) - .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("qao") - .withNextHop(Arrays.asList("jrkc", "amgglvlmfejdoq", "ykglt")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("hqfgqkayejsx") - .withNextHop(Arrays.asList("gflwfgziiucijj", "eatlijjjrtvamcas")))) - .withExtension(Extension.NO_EXTENSION); - model = BinaryData.fromObject(model).toObject(InternalNetworkPropertiesStaticRouteConfiguration.class); - Assertions.assertEquals(211674107, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1331398488, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qao", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("jrkc", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hqfgqkayejsx", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("gflwfgziiucijj", model.ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java index f3b8c0c6cb96..acdfba9ff1a5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,16 +8,25 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -25,131 +34,174 @@ public final class InternalNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkProperties model = BinaryData.fromString( - "{\"vlanId\":397269197,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":244721827,\"multiplier\":2037693383},\"defaultRouteOriginate\":\"False\",\"allowAS\":1284555207,\"allowASOverride\":\"Disable\",\"fabricASN\":8681531274121612481,\"peerASN\":2057762139557191940,\"ipv4ListenRangePrefixes\":[\"jdrqcrjidhftu\",\"vhdxlwyo\",\"bfqz\",\"kfnjyixhafrat\"],\"ipv6ListenRangePrefixes\":[\"bjroumzzn\",\"al\"],\"ipv4NeighborAddress\":[{\"address\":\"uzgfxonjtpusl\",\"configurationState\":\"Rejected\"},{\"address\":\"vtio\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"d\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"gryfqiuasig\",\"configurationState\":\"ErrorDeprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"nequy\",\"configurationState\":\"Accepted\"},{\"address\":\"oqgrmtqjkqevadr\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"uawvcmjzk\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"isczskoswo\",\"configurationState\":\"Rejected\"}],\"annotation\":\"zugamxzkrrcoiis\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":77234697,\"multiplier\":6478909},\"ipv4Routes\":[{\"prefix\":\"dsbezaxyfu\",\"nextHop\":[\"xuizhyhnepkpet\",\"arxqiubx\",\"ukecpx\",\"azvdhctmmkosz\"]},{\"prefix\":\"dblnsntrp\",\"nextHop\":[\"qkio\",\"kb\"]}],\"ipv6Routes\":[{\"prefix\":\"hklbnldpvcbh\",\"nextHop\":[\"zyqu\",\"usqxutrpbrr\"]},{\"prefix\":\"yuuatvlmbjwcolbm\",\"nextHop\":[\"b\",\"w\",\"pcpahprzrvxhmtf\"]}]},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"mtu\":1998287589,\"connectedIPv4Subnets\":[{\"prefix\":\"gxnoqrxtdis\",\"annotation\":\"evhdlmydid\"},{\"prefix\":\"hepfwwtjfdoes\",\"annotation\":\"hmwcdbck\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"kxkxhnegk\",\"annotation\":\"z\"},{\"prefix\":\"bhtmeplvuk\",\"annotation\":\"brlbpgs\"},{\"prefix\":\"bagn\",\"annotation\":\"jhgem\"}],\"importRoutePolicyId\":\"wakywalhjymxcgq\",\"exportRoutePolicyId\":\"gdrclssolj\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vtfycnlbvgjcodk\",\"importIpv6RoutePolicyId\":\"ji\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"s\",\"exportIpv6RoutePolicyId\":\"k\"},\"ingressAclId\":\"bcufqbvntn\",\"egressAclId\":\"mqso\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"gnlykm\"}") + "{\"annotation\":\"a\",\"extension\":\"NPB\",\"mtu\":1665426893,\"connectedIPv4Subnets\":[{\"prefix\":\"yxpavidnie\",\"annotation\":\"ffcvvyezslpuxgcb\"},{\"prefix\":\"svalpnptwtrkxgpa\",\"annotation\":\"ugxyqvnjobfelhl\"},{\"prefix\":\"iuhzzgqlmfa\",\"annotation\":\"z\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"djpxpqht\",\"annotation\":\"hnmhkrezsdsux\"},{\"prefix\":\"eqdgcruxsp\",\"annotation\":\"ymmqgwokmikp\"},{\"prefix\":\"zfbmjxuv\",\"annotation\":\"pfdvhaxdv\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ehpphthdklmveta\",\"importIpv6RoutePolicyId\":\"akfqoixwgiksb\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ooxr\",\"exportIpv6RoutePolicyId\":\"gwphchgjtnht\"},\"ingressAclId\":\"facihmbfntu\",\"egressAclId\":\"ezbxvqxbn\",\"isMonitoringEnabled\":\"True\",\"vlanId\":15435205,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1571960341,\"multiplier\":1104263199},\"defaultRouteOriginate\":\"False\",\"allowAS\":1595462512,\"allowASOverride\":\"Enable\",\"fabricASN\":4939984832208579796,\"peerASN\":4713411285304930480,\"ipv4ListenRangePrefixes\":[\"wztjfmk\",\"htgfred\"],\"ipv6ListenRangePrefixes\":[\"cgrllc\",\"na\",\"vjowazhpabac\"],\"ipv4NeighborAddress\":[{\"address\":\"otgkwsxnsrqorcg\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"eetqujxcxxq\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"urcgojmrvvxwj\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"q\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Rejected\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"xk\",\"nsbvr\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"All\",\"Post-Policy\"]}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"tejrthc\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1568167663,\"multiplier\":1014445888},\"ipv4Routes\":[{\"prefix\":\"rostvrjeqmtzz\",\"nextHop\":[\"qrztrxal\",\"rdhabsr\",\"rsnrhp\",\"a\"]},{\"prefix\":\"iwkkvya\",\"nextHop\":[\"kvvcsemsvuvdjkq\",\"etqmmli\"]},{\"prefix\":\"rj\",\"nextHop\":[\"nw\",\"dchpojxlehzl\"]}],\"ipv6Routes\":[{\"prefix\":\"fquwzpwiibel\",\"nextHop\":[\"erwk\",\"bpjxljtxbusqtb\",\"xniu\",\"sdzhgbdgzpagsec\"]},{\"prefix\":\"adbuwqrgxfllmqiy\",\"nextHop\":[\"zoellnkkiiwvmtum\",\"pymdjfuax\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":309661732,\"threshold\":1410269883,\"idleTimeExpiry\":788439044},{\"maximumRoutes\":870184100,\"threshold\":494652447,\"idleTimeExpiry\":924415526},{\"maximumRoutes\":1436666704,\"threshold\":527770676,\"idleTimeExpiry\":1839530310}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":433528992,\"threshold\":699683864,\"idleTimeExpiry\":825597262}]},\"lastOperation\":{\"details\":\"kqv\"},\"networkFabricId\":\"epdxcltuubwyvpj\",\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"}") .toObject(InternalNetworkProperties.class); - Assertions.assertEquals("gnlykm", model.annotation()); - Assertions.assertEquals(397269197, model.vlanId()); - Assertions.assertEquals("zugamxzkrrcoiis", model.bgpConfiguration().annotation()); - Assertions.assertEquals(244721827, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2037693383, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("a", model.annotation()); + Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1665426893, model.mtu()); + Assertions.assertEquals("ffcvvyezslpuxgcb", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yxpavidnie", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("hnmhkrezsdsux", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("djpxpqht", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("ehpphthdklmveta", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("akfqoixwgiksb", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ooxr", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("gwphchgjtnht", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("facihmbfntu", model.ingressAclId()); + Assertions.assertEquals("ezbxvqxbn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(15435205, model.vlanId()); + Assertions.assertEquals("tejrthc", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1571960341, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1104263199, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1284555207, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2057762139557191940L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("jdrqcrjidhftu", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("bjroumzzn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("uzgfxonjtpusl", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nequy", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(77234697, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(6478909, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("dsbezaxyfu", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xuizhyhnepkpet", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hklbnldpvcbh", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zyqu", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1595462512, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(4713411285304930480L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("wztjfmk", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("cgrllc", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("otgkwsxnsrqorcg", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("urcgojmrvvxwj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("xk", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + model.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1568167663, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1014445888, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("rostvrjeqmtzz", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qrztrxal", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fquwzpwiibel", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("erwk", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(1998287589, model.mtu()); - Assertions.assertEquals("evhdlmydid", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gxnoqrxtdis", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("z", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("kxkxhnegk", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("wakywalhjymxcgq", model.importRoutePolicyId()); - Assertions.assertEquals("gdrclssolj", model.exportRoutePolicyId()); - Assertions.assertEquals("vtfycnlbvgjcodk", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ji", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("s", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("k", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("bcufqbvntn", model.ingressAclId()); - Assertions.assertEquals("mqso", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(309661732, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1410269883, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(788439044, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(433528992, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(699683864, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(825597262, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkProperties model = new InternalNetworkProperties().withAnnotation("gnlykm") - .withVlanId(397269197) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("zugamxzkrrcoiis") + InternalNetworkProperties model = new InternalNetworkProperties().withAnnotation("a") + .withExtension(Extension.NPB) + .withMtu(1665426893) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("ffcvvyezslpuxgcb").withPrefix("yxpavidnie"), + new ConnectedSubnet().withAnnotation("ugxyqvnjobfelhl").withPrefix("svalpnptwtrkxgpa"), + new ConnectedSubnet().withAnnotation("z").withPrefix("iuhzzgqlmfa"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("hnmhkrezsdsux").withPrefix("djpxpqht"), + new ConnectedSubnet().withAnnotation("ymmqgwokmikp").withPrefix("eqdgcruxsp"), + new ConnectedSubnet().withAnnotation("pfdvhaxdv").withPrefix("zfbmjxuv"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("ehpphthdklmveta") + .withImportIpv6RoutePolicyId("akfqoixwgiksb")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("ooxr").withExportIpv6RoutePolicyId("gwphchgjtnht")) + .withIngressAclId("facihmbfntu") + .withEgressAclId("ezbxvqxbn") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withVlanId(15435205) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("tejrthc") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(244721827).withMultiplier(2037693383)) + new BfdConfiguration().withIntervalInMilliSeconds(1571960341).withMultiplier(1104263199)) .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1284555207) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(2057762139557191940L) - .withIpv4ListenRangePrefixes(Arrays.asList("jdrqcrjidhftu", "vhdxlwyo", "bfqz", "kfnjyixhafrat")) - .withIpv6ListenRangePrefixes(Arrays.asList("bjroumzzn", "al")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("uzgfxonjtpusl"), - new NeighborAddress().withAddress("vtio"), new NeighborAddress().withAddress("d"), - new NeighborAddress().withAddress("gryfqiuasig"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("nequy"), - new NeighborAddress().withAddress("oqgrmtqjkqevadr"), - new NeighborAddress().withAddress("uawvcmjzk"), new NeighborAddress().withAddress("isczskoswo")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() + .withAllowAS(1595462512) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(4713411285304930480L) + .withIpv4ListenRangePrefixes(Arrays.asList("wztjfmk", "htgfred")) + .withIpv6ListenRangePrefixes(Arrays.asList("cgrllc", "na", "vjowazhpabac")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("otgkwsxnsrqorcg"), + new NeighborAddress().withAddress("eetqujxcxxq"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("urcgojmrvvxwj"), + new NeighborAddress().withAddress("q"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("xk", "nsbvr")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED) + .withExportPolicyConfiguration(new BmpExportPolicyProperties().withExportPolicies( + Arrays.asList(BmpExportPolicy.LOCAL_RIB, BmpExportPolicy.ALL, BmpExportPolicy.POST_POLICY)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(77234697).withMultiplier(6478909)) + new BfdConfiguration().withIntervalInMilliSeconds(1568167663).withMultiplier(1014445888)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("dsbezaxyfu") - .withNextHop(Arrays.asList("xuizhyhnepkpet", "arxqiubx", "ukecpx", "azvdhctmmkosz")), - new StaticRouteProperties().withPrefix("dblnsntrp").withNextHop(Arrays.asList("qkio", "kb")))) + new StaticRouteProperties().withPrefix("rostvrjeqmtzz") + .withNextHop(Arrays.asList("qrztrxal", "rdhabsr", "rsnrhp", "a")), + new StaticRouteProperties().withPrefix("iwkkvya") + .withNextHop(Arrays.asList("kvvcsemsvuvdjkq", "etqmmli")), + new StaticRouteProperties().withPrefix("rj").withNextHop(Arrays.asList("nw", "dchpojxlehzl")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("hklbnldpvcbh") - .withNextHop(Arrays.asList("zyqu", "usqxutrpbrr")), - new StaticRouteProperties().withPrefix("yuuatvlmbjwcolbm") - .withNextHop(Arrays.asList("b", "w", "pcpahprzrvxhmtf")))) + new StaticRouteProperties().withPrefix("fquwzpwiibel") + .withNextHop(Arrays.asList("erwk", "bpjxljtxbusqtb", "xniu", "sdzhgbdgzpagsec")), + new StaticRouteProperties().withPrefix("adbuwqrgxfllmqiy") + .withNextHop(Arrays.asList("zoellnkkiiwvmtum", "pymdjfuax")))) .withExtension(Extension.NO_EXTENSION)) - .withMtu(1998287589) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("evhdlmydid").withPrefix("gxnoqrxtdis"), - new ConnectedSubnet().withAnnotation("hmwcdbck").withPrefix("hepfwwtjfdoes"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withAnnotation("z").withPrefix("kxkxhnegk"), - new ConnectedSubnet().withAnnotation("brlbpgs").withPrefix("bhtmeplvuk"), - new ConnectedSubnet().withAnnotation("jhgem").withPrefix("bagn"))) - .withImportRoutePolicyId("wakywalhjymxcgq") - .withExportRoutePolicyId("gdrclssolj") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("vtfycnlbvgjcodk") - .withImportIpv6RoutePolicyId("ji")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("s").withExportIpv6RoutePolicyId("k")) - .withIngressAclId("bcufqbvntn") - .withEgressAclId("mqso") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NPB); + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(309661732) + .withThreshold(1410269883) + .withIdleTimeExpiry(788439044), + new PrefixLimitProperties().withMaximumRoutes(870184100) + .withThreshold(494652447) + .withIdleTimeExpiry(924415526), + new PrefixLimitProperties().withMaximumRoutes(1436666704) + .withThreshold(527770676) + .withIdleTimeExpiry(1839530310)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(433528992) + .withThreshold(699683864) + .withIdleTimeExpiry(825597262)))); model = BinaryData.fromObject(model).toObject(InternalNetworkProperties.class); - Assertions.assertEquals("gnlykm", model.annotation()); - Assertions.assertEquals(397269197, model.vlanId()); - Assertions.assertEquals("zugamxzkrrcoiis", model.bgpConfiguration().annotation()); - Assertions.assertEquals(244721827, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2037693383, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("a", model.annotation()); + Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1665426893, model.mtu()); + Assertions.assertEquals("ffcvvyezslpuxgcb", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yxpavidnie", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("hnmhkrezsdsux", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("djpxpqht", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("ehpphthdklmveta", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("akfqoixwgiksb", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ooxr", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("gwphchgjtnht", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("facihmbfntu", model.ingressAclId()); + Assertions.assertEquals("ezbxvqxbn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(15435205, model.vlanId()); + Assertions.assertEquals("tejrthc", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1571960341, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1104263199, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1284555207, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2057762139557191940L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("jdrqcrjidhftu", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("bjroumzzn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("uzgfxonjtpusl", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nequy", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(77234697, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(6478909, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("dsbezaxyfu", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xuizhyhnepkpet", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hklbnldpvcbh", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zyqu", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1595462512, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(4713411285304930480L, model.bgpConfiguration().peerAsn()); + Assertions.assertEquals("wztjfmk", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("cgrllc", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("otgkwsxnsrqorcg", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("urcgojmrvvxwj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("xk", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + model.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1568167663, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1014445888, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("rostvrjeqmtzz", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qrztrxal", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fquwzpwiibel", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("erwk", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(1998287589, model.mtu()); - Assertions.assertEquals("evhdlmydid", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gxnoqrxtdis", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("z", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("kxkxhnegk", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("wakywalhjymxcgq", model.importRoutePolicyId()); - Assertions.assertEquals("gdrclssolj", model.exportRoutePolicyId()); - Assertions.assertEquals("vtfycnlbvgjcodk", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ji", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("s", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("k", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("bcufqbvntn", model.ingressAclId()); - Assertions.assertEquals("mqso", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(309661732, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1410269883, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(788439044, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(433528992, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(699683864, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(825597262, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..ef0ee1bcaf1c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateRequestTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkUpdateBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkUpdateBfdAdministrativeStateRequest model = BinaryData + .fromString("{\"routeType\":\"Bgp\",\"neighborAddress\":\"njhx\",\"administrativeState\":\"MAT\"}") + .toObject(InternalNetworkUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(InternalNetworkRouteType.BGP, model.routeType()); + Assertions.assertEquals("njhx", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.MAT, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkUpdateBfdAdministrativeStateRequest model + = new InternalNetworkUpdateBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.BGP) + .withNeighborAddress("njhx") + .withAdministrativeState(BfdAdministrativeState.MAT); + model = BinaryData.fromObject(model).toObject(InternalNetworkUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(InternalNetworkRouteType.BGP, model.routeType()); + Assertions.assertEquals("njhx", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.MAT, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java new file mode 100644 index 000000000000..cda6758f2559 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkUpdateBfdAdministrativeStateResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkUpdateBfdAdministrativeStateResponseProperties model = BinaryData.fromString( + "{\"neighborAddressAdministrativeStatus\":[{\"neighborAddress\":\"iybxvgnzuzpb\",\"administrativeState\":\"Enabled\",\"error\":\"scpiuz\"},{\"neighborAddress\":\"unhdimjuk\",\"administrativeState\":\"Enabled\",\"error\":\"kaugpucdocfqplwg\"}]}") + .toObject(InternalNetworkUpdateBfdAdministrativeStateResponseProperties.class); + Assertions.assertEquals("iybxvgnzuzpb", model.neighborAddressAdministrativeStatus().get(0).neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, + model.neighborAddressAdministrativeStatus().get(0).administrativeState()); + Assertions.assertEquals("scpiuz", model.neighborAddressAdministrativeStatus().get(0).error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..6bba1e0210c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkUpdateBgpAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkUpdateBgpAdministrativeStateRequest model + = BinaryData.fromString("{\"neighborAddress\":\"sdbpokszanmh\",\"administrativeState\":\"Enabled\"}") + .toObject(InternalNetworkUpdateBgpAdministrativeStateRequest.class); + Assertions.assertEquals("sdbpokszanmh", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.ENABLED, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkUpdateBgpAdministrativeStateRequest model + = new InternalNetworkUpdateBgpAdministrativeStateRequest().withNeighborAddress("sdbpokszanmh") + .withAdministrativeState(BgpAdministrativeState.ENABLED); + model = BinaryData.fromObject(model).toObject(InternalNetworkUpdateBgpAdministrativeStateRequest.class); + Assertions.assertEquals("sdbpokszanmh", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.ENABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateResponsePropertiesTests.java new file mode 100644 index 000000000000..cdd21128d5fa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkUpdateBgpAdministrativeStateResponsePropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkUpdateBgpAdministrativeStateResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkUpdateBgpAdministrativeStateResponseProperties model = BinaryData.fromString( + "{\"neighborAddressAdministrativeStatus\":[{\"neighborAddress\":\"zqfsgnwdxzed\",\"administrativeState\":\"Enabled\",\"error\":\"fb\"},{\"neighborAddress\":\"xi\",\"administrativeState\":\"Enabled\",\"error\":\"fyzavfrbypicdb\"}]}") + .toObject(InternalNetworkUpdateBgpAdministrativeStateResponseProperties.class); + Assertions.assertEquals("zqfsgnwdxzed", model.neighborAddressAdministrativeStatus().get(0).neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.ENABLED, + model.neighborAddressAdministrativeStatus().get(0).administrativeState()); + Assertions.assertEquals("fb", model.neighborAddressAdministrativeStatus().get(0).error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java index d1e45cb28d46..3dbb6b09e752 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java @@ -1,28 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -34,108 +43,148 @@ public final class InternalNetworksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"vlanId\":2065783866,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":153419128,\"multiplier\":1244711113},\"defaultRouteOriginate\":\"True\",\"allowAS\":429345111,\"allowASOverride\":\"Enable\",\"fabricASN\":2331153992242910204,\"peerASN\":7849127751955317721,\"ipv4ListenRangePrefixes\":[\"hob\",\"vyuepacoeroh\",\"xtigukfkbsyc\"],\"ipv6ListenRangePrefixes\":[\"mbnpeenlq\",\"qyv\",\"fb\",\"avqdvfjdsqephtos\"],\"ipv4NeighborAddress\":[{\"address\":\"arjwgu\",\"configurationState\":\"PendingCommit\"},{\"address\":\"xaeypyqoizf\",\"configurationState\":\"Deprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"qbwscjw\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"miflrvfe\",\"configurationState\":\"Succeeded\"},{\"address\":\"shwfrhhas\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"uznwwum\",\"configurationState\":\"Accepted\"}],\"annotation\":\"cilbwtpwbjlpfwuq\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":730470737,\"multiplier\":832295437},\"ipv4Routes\":[{\"prefix\":\"lizm\",\"nextHop\":[\"xghamrplanchqot\",\"mxlmxejwyvjzb\"]},{\"prefix\":\"wvtuek\",\"nextHop\":[\"ypqsmpsbeqie\",\"u\"]},{\"prefix\":\"hjuwndalnjjhrgkj\",\"nextHop\":[\"cpihlzyxvtajfj\",\"toidnekurdgcpzan\",\"qvengn\"]},{\"prefix\":\"uelrnanbrpkocu\",\"nextHop\":[\"bagegjtjltckiwx\",\"gfagijxmdbo\"]}],\"ipv6Routes\":[{\"prefix\":\"hxhahuq\",\"nextHop\":[\"nvzsodmokrqd\",\"sgkq\"]}]},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"mtu\":1930831324,\"connectedIPv4Subnets\":[{\"prefix\":\"yzzl\",\"annotation\":\"jhzppdb\"},{\"prefix\":\"bmc\",\"annotation\":\"o\"},{\"prefix\":\"prsmivapesbfz\",\"annotation\":\"ejrwwsfvt\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"xtmblm\",\"annotation\":\"leuo\"},{\"prefix\":\"elvsprbxjt\",\"annotation\":\"ujtoudodexwmvssr\"}],\"importRoutePolicyId\":\"iexuwemtg\",\"exportRoutePolicyId\":\"ebymmcgskscbsx\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"xicjojxolknsh\",\"importIpv6RoutePolicyId\":\"akptbhmbg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lbnatlnc\",\"exportIpv6RoutePolicyId\":\"zcdkxo\"},\"ingressAclId\":\"d\",\"egressAclId\":\"vhbujkaho\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"dzccqtwsrbfbsd\"},\"id\":\"cdzfbvexrv\",\"name\":\"h\",\"type\":\"mfsnqpvjtshl\"}"; + = "{\"properties\":{\"annotation\":\"xa\",\"extension\":\"NoExtension\",\"mtu\":670239772,\"connectedIPv4Subnets\":[{\"prefix\":\"nivf\",\"annotation\":\"bskinmxanjgua\"},{\"prefix\":\"hipgfx\",\"annotation\":\"wa\"},{\"prefix\":\"zeqjno\",\"annotation\":\"ujliti\"},{\"prefix\":\"shmqxgjzslho\",\"annotation\":\"qxipbxs\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"cnggocnwnjmiit\",\"annotation\":\"mfb\"},{\"prefix\":\"lk\",\"annotation\":\"jxwwqz\"},{\"prefix\":\"ye\",\"annotation\":\"ffrhqzvwz\"},{\"prefix\":\"wcqoa\",\"annotation\":\"tj\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"etfdpurvz\",\"importIpv6RoutePolicyId\":\"jbesfumedsa\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vqhbwsvi\",\"exportIpv6RoutePolicyId\":\"kyaghfvublszsveg\"},\"ingressAclId\":\"ax\",\"egressAclId\":\"pnymbjrsdiufqxr\",\"isMonitoringEnabled\":\"False\",\"vlanId\":1630936804,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":2112614280,\"multiplier\":2070294877},\"defaultRouteOriginate\":\"True\",\"allowAS\":1950523014,\"allowASOverride\":\"Enable\",\"fabricASN\":6210886518375174444,\"peerASN\":7162718804422660082,\"ipv4ListenRangePrefixes\":[\"vjgwnmxcng\",\"wdavpqyh\",\"xhorzozfrgkwp\",\"n\"],\"ipv6ListenRangePrefixes\":[\"bgtcggoppmx\"],\"ipv4NeighborAddress\":[{\"address\":\"gdd\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"},{\"address\":\"a\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"sxvzc\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"qwbrzkmgyl\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"coiqwnqlizlcyhj\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"omm\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Failed\"},{\"address\":\"ajcmpohjdvfjv\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingAdministrativeUpdate\"},{\"address\":\"boindiuyqdjkugcj\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"PendingAdministrativeUpdate\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"vshkvupbzqwwtt\"],\"bmpConfigurationState\":\"Enabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\"]}},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\",\"annotation\":\"bjvv\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":371651813,\"multiplier\":308383665},\"ipv4Routes\":[{\"prefix\":\"sky\",\"nextHop\":[\"djoorbuuhbcck\"]},{\"prefix\":\"cvtelmdrmasvg\",\"nextHop\":[\"hlbkquhmb\",\"nismviaasdexs\",\"glxljuy\",\"kkpovzespdipdx\"]},{\"prefix\":\"npdjomd\",\"nextHop\":[\"dwosjxywwvilkyht\",\"riyhdbbj\",\"sjmc\",\"brpwj\"]},{\"prefix\":\"n\",\"nextHop\":[\"tkghrrxauuhdkh\",\"izyxoyxnhub\",\"wip\"]}],\"ipv6Routes\":[{\"prefix\":\"ivpezzyrpdxy\",\"nextHop\":[\"pqxsemezkpdmmowf\",\"frqebrjopotefe\"]},{\"prefix\":\"fxm\",\"nextHop\":[\"y\"]},{\"prefix\":\"widnrd\",\"nextHop\":[\"kvhuiadyh\",\"disypgapfdwhwbe\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":555797947,\"threshold\":954210117,\"idleTimeExpiry\":400751332},{\"maximumRoutes\":867304070,\"threshold\":254882571,\"idleTimeExpiry\":814416976},{\"maximumRoutes\":439121966,\"threshold\":282883572,\"idleTimeExpiry\":630136615},{\"maximumRoutes\":1559171982,\"threshold\":46063064,\"idleTimeExpiry\":1717098326}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1593849595,\"threshold\":1156108756,\"idleTimeExpiry\":514898197},{\"maximumRoutes\":558072460,\"threshold\":1755812450,\"idleTimeExpiry\":1328219659},{\"maximumRoutes\":106523854,\"threshold\":817221139,\"idleTimeExpiry\":1398939086}]},\"lastOperation\":{\"details\":\"eeocyarvsfzgcsco\"},\"networkFabricId\":\"fsgilwisqxzpz\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\"},\"id\":\"fvogkn\",\"name\":\"csh\",\"type\":\"pcjqtuzbir\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternalNetwork response = manager.internalNetworks() - .define("nhdikatzmtuvfn") - .withExistingL3IsolationDomain("eqcrjv", "jskqsfnmiwapd") - .withVlanId(1678496031) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("wfogbv") + .define("ppppte") + .withExistingL3IsolationDomain("znfokcb", "rskyl") + .withVlanId(292560001) + .withAnnotation("ktretutsygzjp") + .withExtension(Extension.NPB) + .withMtu(18517898) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("otghxkrrpmgdoli").withPrefix("ltanvb"), + new ConnectedSubnet().withAnnotation("omz").withPrefix("izsglavdtttyd"), + new ConnectedSubnet().withAnnotation("pwmveyrc").withPrefix("qkjqcsh"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("zmleuqxhmrilwkc").withPrefix("dmoufjuqowuicvjy"), + new ConnectedSubnet().withAnnotation("a").withPrefix("usvp"), + new ConnectedSubnet().withAnnotation("dqqzikv").withPrefix("lxxzn"))) + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("iwodhas").withImportIpv6RoutePolicyId("aae")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("xvf") + .withExportIpv6RoutePolicyId("chtdmhrztbyulkoe")) + .withIngressAclId("soq") + .withEgressAclId("bygrqcidiwkxi") + .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("hdyasklmyfh") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2133761517).withMultiplier(1219338426)) + new BfdConfiguration().withIntervalInMilliSeconds(379504704).withMultiplier(465081524)) .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(830031798) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(1457459029942100829L) - .withIpv4ListenRangePrefixes(Arrays.asList("odincfbaoboiahk", "psvax", "ksaxyeedvpmodkt")) - .withIpv6ListenRangePrefixes(Arrays.asList("ydvvgkmorbpcjesf", "vuztnsvmsh", "kg", "gf")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("ehhlclpkryrcbmjj"), - new NeighborAddress().withAddress("ivrfnztx"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("tjviilohlgrjc"), - new NeighborAddress().withAddress("hz")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() + .withAllowAS(1679867735) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerAsn(9029479734233543707L) + .withIpv4ListenRangePrefixes(Arrays.asList("atkliopgw")) + .withIpv6ListenRangePrefixes(Arrays.asList("tccety", "vxkwobbwnsdpyirt")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("pjeegz"), + new NeighborAddress().withAddress("e"), new NeighborAddress().withAddress("hfwphnm"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("xuofneaqahzkv"), + new NeighborAddress().withAddress("sddxaovubf"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("bua", "pvdwhvnjcbuzu", "kqoeou")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED) + .withExportPolicyConfiguration(new BmpExportPolicyProperties().withExportPolicies(Arrays + .asList(BmpExportPolicy.POST_POLICY, BmpExportPolicy.POST_POLICY, BmpExportPolicy.PRE_POLICY)))) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(965402508).withMultiplier(1411400151)) + new BfdConfiguration().withIntervalInMilliSeconds(1512051119).withMultiplier(683985811)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("uomsxhdkhmemxk") - .withNextHop(Arrays.asList("apesnbyoullyfz", "nxrmxxjv", "batjgzkm")), - new StaticRouteProperties().withPrefix("fwzlmpx").withNextHop(Arrays.asList("djsiommdz")))) + new StaticRouteProperties().withPrefix("jatvfddqspdutt") + .withNextHop(Arrays.asList("tszqexcqcw", "xxvcvekqjdr", "mlvkdwwqhhlf", "mwuyar")), + new StaticRouteProperties().withPrefix("wsvtzotmwx") + .withNextHop(Arrays.asList("fbdanfexlawkeq", "hzbwrtmjskbienjn")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ulxrcbdnpfcg") - .withNextHop(Arrays.asList("ttowqx", "cpbzxpz", "oovhatiywtcvzu")), - new StaticRouteProperties().withPrefix("pkfeomotquqlqe").withNextHop(Arrays.asList("sgqp")), - new StaticRouteProperties().withPrefix("k") - .withNextHop(Arrays.asList("pfv", "sqmmetwtlafnkjte", "bdpnuvhgcgrllyy", "smocbxhrchm")), - new StaticRouteProperties().withPrefix("tvzhu") - .withNextHop(Arrays.asList("dykg", "skwvb", "cawwayqtsrn", "otgnmzebcreluedc")))) + new StaticRouteProperties().withPrefix("kmvoun").withNextHop(Arrays.asList("vsfqu")), + new StaticRouteProperties().withPrefix("r") + .withNextHop(Arrays.asList("qbknoxjhe", "whmmwbvrpajb", "igxxrezpuzk", "igifino")), + new StaticRouteProperties().withPrefix("sdtlpshxjhans").withNextHop(Arrays.asList("oalcnkgqs")))) .withExtension(Extension.NPB)) - .withMtu(721985116) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("jklfsdntkqiym").withPrefix("hllxwknoo"), - new ConnectedSubnet().withAnnotation("dlhmks").withPrefix("ddslwnl"), - new ConnectedSubnet().withAnnotation("pm").withPrefix("ybnnnlpqdnnska"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("rndzzywxqr").withPrefix("wknrdvvmb"), - new ConnectedSubnet().withAnnotation("tnnefputlkszuxjm").withPrefix("qxtkd"), - new ConnectedSubnet().withAnnotation("a").withPrefix("zs"), - new ConnectedSubnet().withAnnotation("fguamrvamu").withPrefix("fwqjzybmfqdnpp"))) - .withImportRoutePolicyId("gdwpjbb") - .withExportRoutePolicyId("kgc") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("spjvsyydjlhd") - .withImportIpv6RoutePolicyId("csqvyee")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("ulojwumfjdymeq") - .withExportIpv6RoutePolicyId("xpfyxdjspnonx")) - .withIngressAclId("hq") - .withEgressAclId("hnatwvgcmcvdjl") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withExtension(Extension.NO_EXTENSION) - .withAnnotation("twllqypmjc") + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1486705336) + .withThreshold(468951898) + .withIdleTimeExpiry(827799827), + new PrefixLimitProperties().withMaximumRoutes(1740633536) + .withThreshold(1443201522) + .withIdleTimeExpiry(239118066), + new PrefixLimitProperties().withMaximumRoutes(788086595) + .withThreshold(259976201) + .withIdleTimeExpiry(1742579720), + new PrefixLimitProperties().withMaximumRoutes(1288168728) + .withThreshold(872361785) + .withIdleTimeExpiry(909764788)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(555184275) + .withThreshold(152845963) + .withIdleTimeExpiry(49868033), + new PrefixLimitProperties().withMaximumRoutes(713655061) + .withThreshold(479349760) + .withIdleTimeExpiry(1189616792), + new PrefixLimitProperties().withMaximumRoutes(1696052954) + .withThreshold(1077761570) + .withIdleTimeExpiry(2115175863), + new PrefixLimitProperties().withMaximumRoutes(994045139) + .withThreshold(969049683) + .withIdleTimeExpiry(58365872)))) .create(); - Assertions.assertEquals(2065783866, response.vlanId()); - Assertions.assertEquals("cilbwtpwbjlpfwuq", response.bgpConfiguration().annotation()); - Assertions.assertEquals(153419128, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1244711113, response.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("xa", response.annotation()); + Assertions.assertEquals(Extension.NO_EXTENSION, response.extension()); + Assertions.assertEquals(670239772, response.mtu()); + Assertions.assertEquals("bskinmxanjgua", response.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("nivf", response.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("mfb", response.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("cnggocnwnjmiit", response.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("etfdpurvz", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jbesfumedsa", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("vqhbwsvi", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("kyaghfvublszsveg", response.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ax", response.ingressAclId()); + Assertions.assertEquals("pnymbjrsdiufqxr", response.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.isMonitoringEnabled()); + Assertions.assertEquals(1630936804, response.vlanId()); + Assertions.assertEquals("bjvv", response.bgpConfiguration().annotation()); + Assertions.assertEquals(2112614280, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2070294877, response.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.TRUE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(429345111, response.bgpConfiguration().allowAS()); + Assertions.assertEquals(1950523014, response.bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.ENABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7849127751955317721L, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("hob", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("mbnpeenlq", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("arjwgu", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("qbwscjw", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(730470737, + Assertions.assertEquals(7162718804422660082L, response.bgpConfiguration().peerAsn()); + Assertions.assertEquals("vjgwnmxcng", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("bgtcggoppmx", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("gdd", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("coiqwnqlizlcyhj", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("vshkvupbzqwwtt", + response.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + response.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, response.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, response.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(371651813, response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(832295437, response.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("lizm", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xghamrplanchqot", + Assertions.assertEquals(308383665, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("sky", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("djoorbuuhbcck", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hxhahuq", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("nvzsodmokrqd", + Assertions.assertEquals("ivpezzyrpdxy", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pqxsemezkpdmmowf", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, response.staticRouteConfiguration().extension()); - Assertions.assertEquals(1930831324, response.mtu()); - Assertions.assertEquals("jhzppdb", response.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("yzzl", response.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("leuo", response.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xtmblm", response.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("iexuwemtg", response.importRoutePolicyId()); - Assertions.assertEquals("ebymmcgskscbsx", response.exportRoutePolicyId()); - Assertions.assertEquals("xicjojxolknsh", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("akptbhmbg", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("lbnatlnc", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zcdkxo", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("d", response.ingressAclId()); - Assertions.assertEquals("vhbujkaho", response.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, response.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, response.extension()); - Assertions.assertEquals("dzccqtwsrbfbsd", response.annotation()); + Assertions.assertEquals(555797947, response.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(954210117, response.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(400751332, response.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1593849595, response.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1156108756, response.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(514898197, response.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java index 8f741af9b890..89e36e33d19c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java @@ -1,20 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,54 +29,65 @@ public final class InternalNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"vlanId\":23127857,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1179284056,\"multiplier\":1230517100},\"defaultRouteOriginate\":\"False\",\"allowAS\":176785876,\"allowASOverride\":\"Disable\",\"fabricASN\":3202778725632733690,\"peerASN\":8191108194055206264,\"ipv4ListenRangePrefixes\":[\"shoxfzzjd\",\"upbusxyugoz\",\"plxzg\"],\"ipv6ListenRangePrefixes\":[\"notiixkkbyg\",\"giq\"],\"ipv4NeighborAddress\":[{\"address\":\"hybbnhttyizonzs\",\"configurationState\":\"DeferredControl\"},{\"address\":\"o\",\"configurationState\":\"Provisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"z\",\"configurationState\":\"Succeeded\"},{\"address\":\"ciuoxyipdthjfvn\",\"configurationState\":\"Succeeded\"},{\"address\":\"nsputfe\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"nufssjgbfbbachxx\",\"configurationState\":\"Deprovisioned\"}],\"annotation\":\"nfnbphceeivkb\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1354197629,\"multiplier\":2080962665},\"ipv4Routes\":[{\"prefix\":\"pvtwttfsclg\",\"nextHop\":[\"gygn\",\"bfytnhdnihuzzjuz\",\"wgbzdtorbi\",\"nyfzdpxct\"]},{\"prefix\":\"ucrxdtejob\",\"nextHop\":[\"rlwtidcnzal\",\"m\",\"upjhltyl\",\"uudvbgvzlzjsb\"]}],\"ipv6Routes\":[{\"prefix\":\"utzaziydpoknsea\",\"nextHop\":[\"bdqraokd\",\"rluob\"]},{\"prefix\":\"valqwzkny\",\"nextHop\":[\"xysvclfjyclvild\"]}]},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"mtu\":1930619530,\"connectedIPv4Subnets\":[{\"prefix\":\"fqpfildcgb\",\"annotation\":\"uzfbp\"},{\"prefix\":\"cryvidbzdylbvj\",\"annotation\":\"gngwn\"},{\"prefix\":\"jftecgprzsqmp\",\"annotation\":\"cakz\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"haa\",\"annotation\":\"xoyxuuco\"},{\"prefix\":\"usyrux\",\"annotation\":\"hhlhrvmgs\"}],\"importRoutePolicyId\":\"gmnc\",\"exportRoutePolicyId\":\"tpiforomppz\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"qmeu\",\"importIpv6RoutePolicyId\":\"lfcmpuaiugoceqtl\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jymwiccu\",\"exportIpv6RoutePolicyId\":\"cfunlakgixhqjqh\"},\"ingressAclId\":\"wb\",\"egressAclId\":\"iwtwfgoc\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"annotation\":\"nnzu\"},\"id\":\"bkyy\",\"name\":\"syweohlmtsnvon\",\"type\":\"bftswcd\"}"; + = "{\"properties\":{\"annotation\":\"lkyfqll\",\"extension\":\"NoExtension\",\"mtu\":171479383,\"connectedIPv4Subnets\":[{\"prefix\":\"pilhxtabli\",\"annotation\":\"oomgsejisydh\"},{\"prefix\":\"rdxnkl\",\"annotation\":\"fffglftlqakierx\"},{\"prefix\":\"vprb\",\"annotation\":\"ewcs\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"eljfarinufziztgd\",\"annotation\":\"hymvkkjtdhmigkwa\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"gie\",\"importIpv6RoutePolicyId\":\"lsijqygo\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"daehxvvi\",\"exportIpv6RoutePolicyId\":\"safgkysym\"},\"ingressAclId\":\"xslmllbpe\",\"egressAclId\":\"eteza\",\"isMonitoringEnabled\":\"False\",\"vlanId\":1694260716,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":984955282,\"multiplier\":582353213},\"defaultRouteOriginate\":\"True\",\"allowAS\":1262500263,\"allowASOverride\":\"Enable\",\"fabricASN\":229534985750756573,\"peerASN\":7144229842175509345,\"ipv4ListenRangePrefixes\":[\"z\",\"aiecu\",\"fsof\",\"hfmgiixurveekhsm\"],\"ipv6ListenRangePrefixes\":[\"mywoe\",\"kpuuuxiuwhcyc\",\"ekmufipygtmoy\"],\"ipv4NeighborAddress\":[{\"address\":\"maosongtbh\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"wqgiyujnrvwjxmw\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"nbpiuvq\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Failed\"}],\"ipv6NeighborAddress\":[{\"address\":\"npbsungnjkkmkzfb\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"yrdiiwhm\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"ydwmaqeytjpua\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Accepted\"},{\"address\":\"vzugiu\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorDeprovisioning\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"sc\",\"jtnqbkpobjufksd\",\"xkgiwxlylxf\",\"voylfclsr\"],\"bmpConfigurationState\":\"Enabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\"]}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"annotation\":\"b\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1356286342,\"multiplier\":1034064004},\"ipv4Routes\":[{\"prefix\":\"ulzguvckpdp\",\"nextHop\":[\"nrjqskikqd\",\"iybqtlv\"]},{\"prefix\":\"fjjsetiz\",\"nextHop\":[\"nadn\",\"isbpxlserq\"]},{\"prefix\":\"xnhfcccdutxybnjb\",\"nextHop\":[\"pmeglolpotclmbk\",\"qjrytymfnojjh\",\"nnt\",\"jqgovvi\"]}],\"ipv6Routes\":[{\"prefix\":\"xytrafettwytavp\",\"nextHop\":[\"lgyql\",\"olgspyqsa\",\"nhhvp\",\"ukourqviyf\"]},{\"prefix\":\"segwez\",\"nextHop\":[\"qoujtcpdtdzl\"]},{\"prefix\":\"ogzbasjc\",\"nextHop\":[\"kikkkajmnvbi\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":778001022,\"threshold\":1464782804,\"idleTimeExpiry\":187705580},{\"maximumRoutes\":677085981,\"threshold\":414545478,\"idleTimeExpiry\":1047901691}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1127437418,\"threshold\":1749112981,\"idleTimeExpiry\":1568329813},{\"maximumRoutes\":1078146108,\"threshold\":927112344,\"idleTimeExpiry\":1598917379},{\"maximumRoutes\":1160906977,\"threshold\":273046029,\"idleTimeExpiry\":2089204479}]},\"lastOperation\":{\"details\":\"gm\"},\"networkFabricId\":\"kt\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"EnabledDegraded\"},\"id\":\"m\",\"name\":\"siidivbbrt\",\"type\":\"fliqntnoegxo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternalNetwork response = manager.internalNetworks() - .getWithResponse("syzfeoctrzjw", "zwckzebmbvwdxgyy", "mxqzl", com.azure.core.util.Context.NONE) + .getWithResponse("grvfagyp", "lfrxrpahptvikf", "nm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(23127857, response.vlanId()); - Assertions.assertEquals("nfnbphceeivkb", response.bgpConfiguration().annotation()); - Assertions.assertEquals(1179284056, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1230517100, response.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(176785876, response.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8191108194055206264L, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("shoxfzzjd", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("notiixkkbyg", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("hybbnhttyizonzs", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("z", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1354197629, + Assertions.assertEquals("lkyfqll", response.annotation()); + Assertions.assertEquals(Extension.NO_EXTENSION, response.extension()); + Assertions.assertEquals(171479383, response.mtu()); + Assertions.assertEquals("oomgsejisydh", response.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("pilhxtabli", response.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("hymvkkjtdhmigkwa", response.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("eljfarinufziztgd", response.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("gie", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("lsijqygo", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("daehxvvi", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("safgkysym", response.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("xslmllbpe", response.ingressAclId()); + Assertions.assertEquals("eteza", response.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.isMonitoringEnabled()); + Assertions.assertEquals(1694260716, response.vlanId()); + Assertions.assertEquals("b", response.bgpConfiguration().annotation()); + Assertions.assertEquals(984955282, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(582353213, response.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(1262500263, response.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, response.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(7144229842175509345L, response.bgpConfiguration().peerAsn()); + Assertions.assertEquals("z", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("mywoe", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("maosongtbh", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("npbsungnjkkmkzfb", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("sc", response.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.ALL, + response.bgpConfiguration().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, response.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, response.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1356286342, response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2080962665, response.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("pvtwttfsclg", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gygn", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("utzaziydpoknsea", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("bdqraokd", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1034064004, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ulzguvckpdp", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nrjqskikqd", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("xytrafettwytavp", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lgyql", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, response.staticRouteConfiguration().extension()); - Assertions.assertEquals(1930619530, response.mtu()); - Assertions.assertEquals("uzfbp", response.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("fqpfildcgb", response.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("xoyxuuco", response.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("haa", response.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("gmnc", response.importRoutePolicyId()); - Assertions.assertEquals("tpiforomppz", response.exportRoutePolicyId()); - Assertions.assertEquals("qmeu", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("lfcmpuaiugoceqtl", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jymwiccu", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("cfunlakgixhqjqh", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wb", response.ingressAclId()); - Assertions.assertEquals("iwtwfgoc", response.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NO_EXTENSION, response.extension()); - Assertions.assertEquals("nnzu", response.annotation()); + Assertions.assertEquals(778001022, response.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1464782804, response.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(187705580, response.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1127437418, response.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1749112981, response.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1568329813, response.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java index 4165b24d8a84..6cf41c55e684 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java @@ -1,21 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -26,67 +30,95 @@ public final class InternalNetworksListByL3IsolationDomainMockTests { @Test public void testListByL3IsolationDomain() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"vlanId\":341895282,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":590116963,\"multiplier\":294196937},\"defaultRouteOriginate\":\"True\",\"allowAS\":922115529,\"allowASOverride\":\"Disable\",\"fabricASN\":410752828832351795,\"peerASN\":2311581557755890267,\"ipv4ListenRangePrefixes\":[\"zjnnuwwv\",\"zrfxajtbcqj\",\"bkj\"],\"ipv6ListenRangePrefixes\":[\"xrj\",\"yzrieitq\",\"lzuwtbdzqajxkmp\",\"bfhlgeehbd\"],\"ipv4NeighborAddress\":[{\"address\":\"nlx\",\"configurationState\":\"PendingCommit\"}],\"ipv6NeighborAddress\":[{\"address\":\"nb\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"oubukqmie\",\"configurationState\":\"Accepted\"}],\"annotation\":\"obvveq\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1576770702,\"multiplier\":1851687022},\"ipv4Routes\":[{\"prefix\":\"ecdsysxnkuhvhn\",\"nextHop\":[\"evzcrrwnk\",\"gdwq\",\"mxsfqeaxdqe\",\"uvmsaq\"]},{\"prefix\":\"viawg\",\"nextHop\":[\"wu\",\"vvzfzn\",\"gpbcbkcpympd\",\"ieasklkqcl\"]},{\"prefix\":\"fusrgnoskkhbmj\",\"nextHop\":[\"lyyuahvyeikbvqzr\",\"rgbqau\"]}],\"ipv6Routes\":[{\"prefix\":\"kxjnohafwmf\",\"nextHop\":[\"jly\",\"tugpeametsdwxfa\",\"txc\"]},{\"prefix\":\"fegs\",\"nextHop\":[\"b\",\"hou\",\"vkandhooimazkm\"]},{\"prefix\":\"f\",\"nextHop\":[\"gdmfvybfmpot\",\"lopfigrx\"]},{\"prefix\":\"trcodbqeogldmxxb\",\"nextHop\":[\"s\",\"vamsxrwq\",\"wdflgq\",\"plze\"]}]},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"mtu\":1102010974,\"connectedIPv4Subnets\":[{\"prefix\":\"ta\",\"annotation\":\"xt\"},{\"prefix\":\"fcyatbxdwr\",\"annotation\":\"vtkmx\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"shnugfbpeigkf\",\"annotation\":\"ovriqtuzwbkqcgz\"},{\"prefix\":\"gtdjhtbarptxurs\",\"annotation\":\"yyumhzpst\"},{\"prefix\":\"cqacvttyh\",\"annotation\":\"ilnsz\"}],\"importRoutePolicyId\":\"buwuu\",\"exportRoutePolicyId\":\"ydscizvkayioxpq\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"blclef\",\"importIpv6RoutePolicyId\":\"mbodvdgfua\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jymcfvvzc\",\"exportIpv6RoutePolicyId\":\"yuq\"},\"ingressAclId\":\"cktnbpkfnxrl\",\"egressAclId\":\"mlzvvrmesfhq\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"annotation\":\"revfwcbawapn\"},\"id\":\"tq\",\"name\":\"mkmzvag\",\"type\":\"xfblsxyfq\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"giiouka\",\"extension\":\"NPB\",\"mtu\":205893922,\"connectedIPv4Subnets\":[{\"prefix\":\"vfiypfvwyzjs\",\"annotation\":\"orvigrxmptu\"},{\"prefix\":\"de\",\"annotation\":\"pqghxdpgihfimlyx\"},{\"prefix\":\"mixjudbiacu\",\"annotation\":\"ucmfuvu\"},{\"prefix\":\"lvbujwpnzijpyyve\",\"annotation\":\"uhqym\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"thkt\",\"annotation\":\"ljkh\"},{\"prefix\":\"pgtpgxkkoyp\",\"annotation\":\"lvthivapuax\"},{\"prefix\":\"swqwbhlr\",\"annotation\":\"gkcnpdkwerxfezl\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ekvsuzyowra\",\"importIpv6RoutePolicyId\":\"ofrenuvp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"tnyyeyjatfpbxnre\",\"exportIpv6RoutePolicyId\":\"g\"},\"ingressAclId\":\"tohruqtximrxeyz\",\"egressAclId\":\"nxb\",\"isMonitoringEnabled\":\"False\",\"vlanId\":1125391433,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":479779461,\"multiplier\":509277110},\"defaultRouteOriginate\":\"False\",\"allowAS\":1771933881,\"allowASOverride\":\"Disable\",\"fabricASN\":2724076273841425100,\"peerASN\":4432043367584860222,\"ipv4ListenRangePrefixes\":[\"jpnixd\",\"qjkfvm\"],\"ipv6ListenRangePrefixes\":[\"geajyifeiiri\",\"mjdn\",\"nbtlxrdepqt\"],\"ipv4NeighborAddress\":[{\"address\":\"pkonovfnobuwhu\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"yfuhgmmzxp\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"}],\"ipv6NeighborAddress\":[{\"address\":\"cpdaoskgtalljsoa\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingCommit\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"rosxfdxrcbnmbb\",\"luvdceouevno\",\"zlreiwdskiegta\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"LocalRib\",\"All\",\"Pre-Policy\"]}},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"odbhgxba\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1156379325,\"multiplier\":52640580},\"ipv4Routes\":[{\"prefix\":\"vyhqwyxba\",\"nextHop\":[\"viynlslgxif\",\"dsclqwkddgepu\",\"ambzfxgshaq\",\"ueq\"]}],\"ipv6Routes\":[{\"prefix\":\"agzmyxsoxqarjt\",\"nextHop\":[\"lllmtiyguuhylzbd\",\"mtdohjxfqyyuwc\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1052018255,\"threshold\":1787806578,\"idleTimeExpiry\":1483832760},{\"maximumRoutes\":1981450216,\"threshold\":36477243,\"idleTimeExpiry\":991495202}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":327803000,\"threshold\":1257190271,\"idleTimeExpiry\":1736916783},{\"maximumRoutes\":1995747188,\"threshold\":846878482,\"idleTimeExpiry\":2134574626}]},\"lastOperation\":{\"details\":\"mxxxpnk\"},\"networkFabricId\":\"ljnkmsfsquxxqcim\",\"configurationState\":\"Rejected\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"id\":\"ivagcsmrtepsy\",\"name\":\"dgt\",\"type\":\"ozys\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internalNetworks() - .listByL3IsolationDomain("pnseptvdticca", "lgzwkopxdkb", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("pucl", "dytwdaiexisa", com.azure.core.util.Context.NONE); - Assertions.assertEquals(341895282, response.iterator().next().vlanId()); - Assertions.assertEquals("obvveq", response.iterator().next().bgpConfiguration().annotation()); - Assertions.assertEquals(590116963, + Assertions.assertEquals("giiouka", response.iterator().next().annotation()); + Assertions.assertEquals(Extension.NPB, response.iterator().next().extension()); + Assertions.assertEquals(205893922, response.iterator().next().mtu()); + Assertions.assertEquals("orvigrxmptu", response.iterator().next().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("vfiypfvwyzjs", response.iterator().next().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("ljkh", response.iterator().next().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("thkt", response.iterator().next().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("ekvsuzyowra", + response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("ofrenuvp", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("tnyyeyjatfpbxnre", + response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("g", response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tohruqtximrxeyz", response.iterator().next().ingressAclId()); + Assertions.assertEquals("nxb", response.iterator().next().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.iterator().next().isMonitoringEnabled()); + Assertions.assertEquals(1125391433, response.iterator().next().vlanId()); + Assertions.assertEquals("odbhgxba", response.iterator().next().bgpConfiguration().annotation()); + Assertions.assertEquals(479779461, response.iterator().next().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(294196937, + Assertions.assertEquals(509277110, response.iterator().next().bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, + Assertions.assertEquals(BooleanEnumProperty.FALSE, response.iterator().next().bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(922115529, response.iterator().next().bgpConfiguration().allowAS()); + Assertions.assertEquals(1771933881, response.iterator().next().bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.DISABLE, response.iterator().next().bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2311581557755890267L, response.iterator().next().bgpConfiguration().peerAsn()); - Assertions.assertEquals("zjnnuwwv", + Assertions.assertEquals(4432043367584860222L, response.iterator().next().bgpConfiguration().peerAsn()); + Assertions.assertEquals("jpnixd", response.iterator().next().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("xrj", response.iterator().next().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("nlx", + Assertions.assertEquals("geajyifeiiri", + response.iterator().next().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("pkonovfnobuwhu", response.iterator().next().bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nb", + Assertions.assertEquals("cpdaoskgtalljsoa", response.iterator().next().bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1576770702, + Assertions.assertEquals("rosxfdxrcbnmbb", + response.iterator().next().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.iterator().next().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + response.iterator() + .next() + .bgpConfiguration() + .bmpConfiguration() + .exportPolicyConfiguration() + .exportPolicies() + .get(0)); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + response.iterator().next().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + response.iterator().next().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1156379325, response.iterator().next().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1851687022, + Assertions.assertEquals(52640580, response.iterator().next().staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ecdsysxnkuhvhn", + Assertions.assertEquals("vyhqwyxba", response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("evzcrrwnk", + Assertions.assertEquals("viynlslgxif", response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kxjnohafwmf", + Assertions.assertEquals("agzmyxsoxqarjt", response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jly", + Assertions.assertEquals("lllmtiyguuhylzbd", response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, response.iterator().next().staticRouteConfiguration().extension()); - Assertions.assertEquals(1102010974, response.iterator().next().mtu()); - Assertions.assertEquals("xt", response.iterator().next().connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ta", response.iterator().next().connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ovriqtuzwbkqcgz", - response.iterator().next().connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("shnugfbpeigkf", response.iterator().next().connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("buwuu", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("ydscizvkayioxpq", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("blclef", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("mbodvdgfua", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jymcfvvzc", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("yuq", response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("cktnbpkfnxrl", response.iterator().next().ingressAclId()); - Assertions.assertEquals("mlzvvrmesfhq", response.iterator().next().egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.iterator().next().isMonitoringEnabled()); - Assertions.assertEquals(Extension.NO_EXTENSION, response.iterator().next().extension()); - Assertions.assertEquals("revfwcbawapn", response.iterator().next().annotation()); + Assertions.assertEquals(1052018255, + response.iterator().next().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1787806578, + response.iterator().next().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1483832760, + response.iterator().next().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(327803000, + response.iterator().next().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1257190271, + response.iterator().next().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1736916783, + response.iterator().next().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java index 56c7279ef436..2189704f2c7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java @@ -1,162 +1,71 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.Extension; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import org.junit.jupiter.api.Assertions; public final class InternalNetworksListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworksList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"vlanId\":100725241,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":873495468,\"multiplier\":1300228553},\"defaultRouteOriginate\":\"True\",\"allowAS\":1735235828,\"allowASOverride\":\"Enable\",\"fabricASN\":3930750995945071444,\"peerASN\":7347121529091171836,\"ipv4ListenRangePrefixes\":[\"cueljtiahxmfq\",\"yarvsxzqbglcjk\",\"yspthzod\",\"btl\"],\"ipv6ListenRangePrefixes\":[\"gblioskkfmkm\",\"djxyxgbkkqvjcteo\",\"dlrslskk\"],\"ipv4NeighborAddress\":[{}],\"ipv6NeighborAddress\":[{},{},{},{}],\"annotation\":\"zdpv\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1286292074,\"multiplier\":2105029866},\"ipv4Routes\":[{\"prefix\":\"snggytexvzilmhiv\",\"nextHop\":[]},{\"prefix\":\"kwwwnckn\",\"nextHop\":[]},{\"prefix\":\"zdajlskzptjxu\",\"nextHop\":[]},{\"prefix\":\"weucyrth\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ehmcgcje\",\"nextHop\":[]},{\"prefix\":\"n\",\"nextHop\":[]},{\"prefix\":\"ehokamvfej\",\"nextHop\":[]},{\"prefix\":\"qnttmbq\",\"nextHop\":[]}]},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"mtu\":955211490,\"connectedIPv4Subnets\":[{\"prefix\":\"ysthhza\",\"annotation\":\"fwy\"},{\"prefix\":\"rlhgenuze\",\"annotation\":\"vkvebaqsz\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"zlsmmdqgmihzpim\",\"annotation\":\"rh\"}],\"importRoutePolicyId\":\"t\",\"exportRoutePolicyId\":\"nklogxsvtzarhzv\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"qktcmbjwzzo\",\"importIpv6RoutePolicyId\":\"pkybtgl\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pgajsqjce\",\"exportIpv6RoutePolicyId\":\"bmfuvqarwzxu\"},\"ingressAclId\":\"ebluimmbwx\",\"egressAclId\":\"gtdmbvx\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NPB\",\"annotation\":\"qkbud\"},\"id\":\"waokbavlytta\",\"name\":\"knwfrkebsmhpdujd\",\"type\":\"gatolekscbctnan\"}],\"nextLink\":\"mwbzxpdc\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"lndbeaqbkixv\",\"extension\":\"NoExtension\",\"mtu\":1750807185,\"connectedIPv4Subnets\":[{\"prefix\":\"bfqvzfjmspu\",\"annotation\":\"feuzjljmphfkye\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"gj\",\"annotation\":\"icuydoccn\"},{\"prefix\":\"shanzbui\",\"annotation\":\"hbatecaatsdohzni\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"daomb\",\"importIpv6RoutePolicyId\":\"injdllwktlepo\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vqxuajgcqw\",\"exportIpv6RoutePolicyId\":\"ynkgfcfd\"},\"ingressAclId\":\"wsikxxtclhuulr\",\"egressAclId\":\"byokvjgbzsxe\",\"isMonitoringEnabled\":\"True\",\"vlanId\":1715829112,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1492724702,\"multiplier\":766894527},\"defaultRouteOriginate\":\"False\",\"allowAS\":716194665,\"allowASOverride\":\"Enable\",\"fabricASN\":629773384894688530,\"peerASN\":6418350443606757244,\"ipv4ListenRangePrefixes\":[\"ufpbpgnrhol\",\"ujbfwxiplkys\",\"l\",\"yjprxslw\"],\"ipv6ListenRangePrefixes\":[\"cvhtbbzjhfvh\",\"wzbxpc\"],\"ipv4NeighborAddress\":[{},{},{}],\"ipv6NeighborAddress\":[{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"ecohm\",\"vvlrrskapbxwiee\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"fokyks\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1143447896,\"multiplier\":1950190822},\"ipv4Routes\":[{\"prefix\":\"xzznnui\",\"nextHop\":[]},{\"prefix\":\"ersejeg\",\"nextHop\":[]},{\"prefix\":\"rkjguwrjmwvvbt\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"xximwgxq\",\"nextHop\":[]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]},\"lastOperation\":{\"details\":\"qfkyfhiwvjaqu\"},\"networkFabricId\":\"yynvskpa\",\"configurationState\":\"Failed\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"xmjbxcbccwkqmtxa\",\"name\":\"eqi\",\"type\":\"crpilgftrq\"},{\"properties\":{\"annotation\":\"jdaahuqimldahlfx\",\"extension\":\"NPB\",\"mtu\":1173087516,\"connectedIPv4Subnets\":[{\"prefix\":\"adj\",\"annotation\":\"snc\"},{\"prefix\":\"kiioshj\",\"annotation\":\"zetybn\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"tlcgctjchfjvmy\",\"annotation\":\"zebecuvl\"},{\"prefix\":\"efvwcljkxpylrwo\",\"annotation\":\"gwpsyxjijeypd\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"kerdkdkgawqwj\",\"importIpv6RoutePolicyId\":\"ldfkcefeygzqpjoi\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"naybdjnxu\",\"exportIpv6RoutePolicyId\":\"ntqontwhym\"},\"ingressAclId\":\"mulw\",\"egressAclId\":\"qtow\",\"isMonitoringEnabled\":\"True\",\"vlanId\":1187287919,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2095119395,\"multiplier\":80244651},\"defaultRouteOriginate\":\"False\",\"allowAS\":1793059389,\"allowASOverride\":\"Disable\",\"fabricASN\":5232052390056063404,\"peerASN\":3583033519488051677,\"ipv4ListenRangePrefixes\":[\"wmchqo\",\"tfxcpupuk\",\"ymjzpwdlvwtiws\"],\"ipv6ListenRangePrefixes\":[\"aonhqnamppul\"],\"ipv4NeighborAddress\":[{},{},{}],\"ipv6NeighborAddress\":[{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"wnaze\",\"jb\",\"aj\",\"cyizy\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{}},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"vfsxx\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1139609440,\"multiplier\":815452319},\"ipv4Routes\":[{\"prefix\":\"pwgoljt\",\"nextHop\":[]},{\"prefix\":\"xnmxsdobygoogxqa\",\"nextHop\":[]},{\"prefix\":\"j\",\"nextHop\":[]},{\"prefix\":\"vaz\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ucsa\",\"nextHop\":[]},{\"prefix\":\"djnosdkvibf\",\"nextHop\":[]},{\"prefix\":\"sgm\",\"nextHop\":[]},{\"prefix\":\"trnzpducdaaktu\",\"nextHop\":[]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]},\"lastOperation\":{\"details\":\"qdowkppnwyytfv\"},\"networkFabricId\":\"tfjikffffgkuh\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\"},\"id\":\"bkkejjkjigawgaz\",\"name\":\"xjqifhujjsbc\",\"type\":\"lzaahzbhuroolk\"},{\"properties\":{\"annotation\":\"irhhmo\",\"extension\":\"NoExtension\",\"mtu\":1899652732,\"connectedIPv4Subnets\":[{\"prefix\":\"jzc\",\"annotation\":\"axoialahfxwccokd\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"kmkcz\",\"annotation\":\"uhhoqeqshavlj\"},{\"prefix\":\"k\",\"annotation\":\"rqolnthbb\"},{\"prefix\":\"kgzukwdrnzkjth\",\"annotation\":\"eyjncjmlfuy\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"pfiddhl\",\"importIpv6RoutePolicyId\":\"fz\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jmqrfuiocuselq\",\"exportIpv6RoutePolicyId\":\"sazrhxuddqmdtff\"},\"ingressAclId\":\"jmr\",\"egressAclId\":\"hmwdmdlgyqixokw\",\"isMonitoringEnabled\":\"True\",\"vlanId\":13672233,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1087757375,\"multiplier\":1331585462},\"defaultRouteOriginate\":\"True\",\"allowAS\":1787505823,\"allowASOverride\":\"Disable\",\"fabricASN\":8834981153323638181,\"peerASN\":7714848345048051757,\"ipv4ListenRangePrefixes\":[\"jchtvsnvlaqd\",\"z\"],\"ipv6ListenRangePrefixes\":[\"watuwqkokbczoth\",\"mgobllmsnwg\",\"imaaneak\",\"t\"],\"ipv4NeighborAddress\":[{},{},{},{}],\"ipv6NeighborAddress\":[{},{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"rfvqtvkhgvo\",\"gxkfnaoaqymhccto\",\"uowyrnskbyhqu\"],\"bmpConfigurationState\":\"Enabled\",\"exportPolicyConfiguration\":{}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"jpxecxqnwhsco\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":561181776,\"multiplier\":798291972},\"ipv4Routes\":[{\"prefix\":\"npwirfljf\",\"nextHop\":[]},{\"prefix\":\"wxqouoxudnmc\",\"nextHop\":[]},{\"prefix\":\"aprhknqiijgencdg\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ueqihkkyowlt\",\"nextHop\":[]},{\"prefix\":\"ouwhldxwhie\",\"nextHop\":[]}],\"extension\":\"NPB\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]},\"lastOperation\":{\"details\":\"vprstv\"},\"networkFabricId\":\"tbfjtdyotnplf\",\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"qxwetjtd\",\"name\":\"hutfdoadtxopge\",\"type\":\"padkmdzgsszxvct\"},{\"properties\":{\"annotation\":\"bxuharl\",\"extension\":\"NoExtension\",\"mtu\":815863959,\"connectedIPv4Subnets\":[{\"prefix\":\"abvoyngsuxxcz\",\"annotation\":\"yqjoghdsa\"},{\"prefix\":\"djanormo\",\"annotation\":\"xxurntujmoilunwe\"},{\"prefix\":\"hdeeljslkyozdsfz\",\"annotation\":\"egrhrh\"},{\"prefix\":\"slejtvxj\",\"annotation\":\"vgjbfio\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"jod\",\"annotation\":\"bj\"},{\"prefix\":\"qwm\",\"annotation\":\"smoxsazuxejgwe\"},{\"prefix\":\"ywnfyszzaczs\",\"annotation\":\"q\"},{\"prefix\":\"dnddbbozsyv\",\"annotation\":\"kjmyitrchwudlx\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"htpmnoejhq\",\"importIpv6RoutePolicyId\":\"msibzo\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gxkydpm\",\"exportIpv6RoutePolicyId\":\"gfqvmtywhlakx\"},\"ingressAclId\":\"jpewpyjlfx\",\"egressAclId\":\"pqcrzgeuqxbpiat\",\"isMonitoringEnabled\":\"False\",\"vlanId\":551442869,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":704591870,\"multiplier\":365082016},\"defaultRouteOriginate\":\"False\",\"allowAS\":1779054521,\"allowASOverride\":\"Disable\",\"fabricASN\":9079801324794932011,\"peerASN\":2849121534633138958,\"ipv4ListenRangePrefixes\":[\"zyhgsqtnqsktx\"],\"ipv6ListenRangePrefixes\":[\"jbqggweeiwdhdm\"],\"ipv4NeighborAddress\":[{},{}],\"ipv6NeighborAddress\":[{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"cstu\",\"mlhxdfbklcii\",\"hgjsysmvxo\"],\"bmpConfigurationState\":\"Disabled\",\"exportPolicyConfiguration\":{}},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\",\"annotation\":\"fcuvbdujgcwx\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1461984569,\"multiplier\":1910633363},\"ipv4Routes\":[{\"prefix\":\"rizagbbgiarks\",\"nextHop\":[]},{\"prefix\":\"kpgdqxwabzrwiq\",\"nextHop\":[]},{\"prefix\":\"xhaclcdosqkptjq\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"fmmainwhedxkpbq\",\"nextHop\":[]},{\"prefix\":\"unt\",\"nextHop\":[]},{\"prefix\":\"buizazzelwg\",\"nextHop\":[]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]},\"lastOperation\":{\"details\":\"laxp\"},\"networkFabricId\":\"jwdabalfd\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"id\":\"lbtlqhopxo\",\"name\":\"vmrsiflikyyp\",\"type\":\"kgx\"}],\"nextLink\":\"fmy\"}") .toObject(InternalNetworksList.class); - Assertions.assertEquals(100725241, model.value().get(0).vlanId()); - Assertions.assertEquals("zdpv", model.value().get(0).bgpConfiguration().annotation()); - Assertions.assertEquals(873495468, + Assertions.assertEquals("lndbeaqbkixv", model.value().get(0).annotation()); + Assertions.assertEquals(Extension.NO_EXTENSION, model.value().get(0).extension()); + Assertions.assertEquals(1750807185, model.value().get(0).mtu()); + Assertions.assertEquals("feuzjljmphfkye", model.value().get(0).connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("bfqvzfjmspu", model.value().get(0).connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("icuydoccn", model.value().get(0).connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("gj", model.value().get(0).connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("daomb", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("injdllwktlepo", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("vqxuajgcqw", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ynkgfcfd", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("wsikxxtclhuulr", model.value().get(0).ingressAclId()); + Assertions.assertEquals("byokvjgbzsxe", model.value().get(0).egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.value().get(0).isMonitoringEnabled()); + Assertions.assertEquals(1715829112, model.value().get(0).vlanId()); + Assertions.assertEquals("fokyks", model.value().get(0).bgpConfiguration().annotation()); + Assertions.assertEquals(1492724702, model.value().get(0).bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1300228553, model.value().get(0).bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, + Assertions.assertEquals(766894527, model.value().get(0).bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1735235828, model.value().get(0).bgpConfiguration().allowAS()); + Assertions.assertEquals(716194665, model.value().get(0).bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.ENABLE, model.value().get(0).bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7347121529091171836L, model.value().get(0).bgpConfiguration().peerAsn()); - Assertions.assertEquals("cueljtiahxmfq", + Assertions.assertEquals(6418350443606757244L, model.value().get(0).bgpConfiguration().peerAsn()); + Assertions.assertEquals("ufpbpgnrhol", model.value().get(0).bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("gblioskkfmkm", + Assertions.assertEquals("cvhtbbzjhfvh", model.value().get(0).bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals(1286292074, + Assertions.assertEquals("ecohm", + model.value().get(0).bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.value().get(0).bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + model.value().get(0).bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.value().get(0).bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1143447896, model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2105029866, + Assertions.assertEquals(1950190822, model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("snggytexvzilmhiv", + Assertions.assertEquals("xzznnui", model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehmcgcje", + Assertions.assertEquals("xximwgxq", model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); Assertions.assertEquals(Extension.NO_EXTENSION, model.value().get(0).staticRouteConfiguration().extension()); - Assertions.assertEquals(955211490, model.value().get(0).mtu()); - Assertions.assertEquals("fwy", model.value().get(0).connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ysthhza", model.value().get(0).connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("rh", model.value().get(0).connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("zlsmmdqgmihzpim", model.value().get(0).connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("t", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("nklogxsvtzarhzv", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("qktcmbjwzzo", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pkybtgl", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pgajsqjce", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bmfuvqarwzxu", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ebluimmbwx", model.value().get(0).ingressAclId()); - Assertions.assertEquals("gtdmbvx", model.value().get(0).egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.value().get(0).isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.value().get(0).extension()); - Assertions.assertEquals("qkbud", model.value().get(0).annotation()); - Assertions.assertEquals("mwbzxpdc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworksList model - = new InternalNetworksList().withValue(Arrays.asList(new InternalNetworkInner().withVlanId(100725241) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("zdpv") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(873495468).withMultiplier(1300228553)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1735235828) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(7347121529091171836L) - .withIpv4ListenRangePrefixes(Arrays.asList("cueljtiahxmfq", "yarvsxzqbglcjk", "yspthzod", "btl")) - .withIpv6ListenRangePrefixes(Arrays.asList("gblioskkfmkm", "djxyxgbkkqvjcteo", "dlrslskk")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress())) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress(), new NeighborAddress(), - new NeighborAddress(), new NeighborAddress()))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1286292074).withMultiplier(2105029866)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("snggytexvzilmhiv").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("kwwwnckn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("zdajlskzptjxu").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("weucyrth").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("ehmcgcje").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("n").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("ehokamvfej").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("qnttmbq").withNextHop(Arrays.asList()))) - .withExtension(Extension.NO_EXTENSION)) - .withMtu(955211490) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("fwy").withPrefix("ysthhza"), - new ConnectedSubnet().withAnnotation("vkvebaqsz").withPrefix("rlhgenuze"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("rh").withPrefix("zlsmmdqgmihzpim"))) - .withImportRoutePolicyId("t") - .withExportRoutePolicyId("nklogxsvtzarhzv") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("qktcmbjwzzo") - .withImportIpv6RoutePolicyId("pkybtgl")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("pgajsqjce") - .withExportIpv6RoutePolicyId("bmfuvqarwzxu")) - .withIngressAclId("ebluimmbwx") - .withEgressAclId("gtdmbvx") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withExtension(Extension.NPB) - .withAnnotation("qkbud"))).withNextLink("mwbzxpdc"); - model = BinaryData.fromObject(model).toObject(InternalNetworksList.class); - Assertions.assertEquals(100725241, model.value().get(0).vlanId()); - Assertions.assertEquals("zdpv", model.value().get(0).bgpConfiguration().annotation()); - Assertions.assertEquals(873495468, - model.value().get(0).bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1300228553, model.value().get(0).bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.value().get(0).bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1735235828, model.value().get(0).bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.value().get(0).bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7347121529091171836L, model.value().get(0).bgpConfiguration().peerAsn()); - Assertions.assertEquals("cueljtiahxmfq", - model.value().get(0).bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("gblioskkfmkm", - model.value().get(0).bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals(1286292074, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2105029866, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("snggytexvzilmhiv", - model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehmcgcje", - model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals(Extension.NO_EXTENSION, model.value().get(0).staticRouteConfiguration().extension()); - Assertions.assertEquals(955211490, model.value().get(0).mtu()); - Assertions.assertEquals("fwy", model.value().get(0).connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ysthhza", model.value().get(0).connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("rh", model.value().get(0).connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("zlsmmdqgmihzpim", model.value().get(0).connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("t", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("nklogxsvtzarhzv", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("qktcmbjwzzo", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pkybtgl", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pgajsqjce", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bmfuvqarwzxu", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ebluimmbwx", model.value().get(0).ingressAclId()); - Assertions.assertEquals("gtdmbvx", model.value().get(0).egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.value().get(0).isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.value().get(0).extension()); - Assertions.assertEquals("qkbud", model.value().get(0).annotation()); - Assertions.assertEquals("mwbzxpdc", model.nextLink()); + Assertions.assertEquals("fmy", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java index 55d56bfeccc6..b5e88550d54d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,31 +15,35 @@ public final class InternetGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"ipv4Address\":\"qcy\",\"port\":905465654,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"qofyuicdhzbdy\",\"provisioningState\":\"Accepted\",\"internetGatewayRuleId\":\"bdvibidmhmwffpl\",\"annotation\":\"u\"},\"location\":\"pckc\",\"tags\":{\"oxoyyukp\":\"vwe\"},\"id\":\"aimmoiroqb\",\"name\":\"shbraga\",\"type\":\"yyrmfsvbp\"}") + "{\"properties\":{\"annotation\":\"s\",\"internetGatewayRuleId\":\"rb\",\"ipv4Address\":\"xsjybvitvqk\",\"port\":308344292,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"tggmuwdchozfnkfe\",\"lastOperation\":{\"details\":\"xn\"},\"provisioningState\":\"Failed\"},\"location\":\"zvoaikna\",\"tags\":{\"phvxz\":\"uwiguyxlyk\",\"pejtl\":\"wxh\",\"rxhxkn\":\"exaonwivkcq\",\"upijubyqjfkakfq\":\"ccrmmk\"},\"id\":\"rke\",\"name\":\"yildudxjascow\",\"type\":\"f\"}") .toObject(InternetGatewayInner.class); - Assertions.assertEquals("pckc", model.location()); - Assertions.assertEquals("vwe", model.tags().get("oxoyyukp")); + Assertions.assertEquals("zvoaikna", model.location()); + Assertions.assertEquals("uwiguyxlyk", model.tags().get("phvxz")); + Assertions.assertEquals("s", model.annotation()); + Assertions.assertEquals("rb", model.internetGatewayRuleId()); Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.typePropertiesType()); - Assertions.assertEquals("qofyuicdhzbdy", model.networkFabricControllerId()); - Assertions.assertEquals("bdvibidmhmwffpl", model.internetGatewayRuleId()); - Assertions.assertEquals("u", model.annotation()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.internetGatewayType()); + Assertions.assertEquals("tggmuwdchozfnkfe", model.networkFabricControllerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayInner model = new InternetGatewayInner().withLocation("pckc") - .withTags(mapOf("oxoyyukp", "vwe")) + InternetGatewayInner model = new InternetGatewayInner().withLocation("zvoaikna") + .withTags( + mapOf("phvxz", "uwiguyxlyk", "pejtl", "wxh", "rxhxkn", "exaonwivkcq", "upijubyqjfkakfq", "ccrmmk")) + .withAnnotation("s") + .withInternetGatewayRuleId("rb") .withTypePropertiesType(GatewayType.INFRASTRUCTURE) - .withNetworkFabricControllerId("qofyuicdhzbdy") - .withInternetGatewayRuleId("bdvibidmhmwffpl") - .withAnnotation("u"); + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId("tggmuwdchozfnkfe"); model = BinaryData.fromObject(model).toObject(InternetGatewayInner.class); - Assertions.assertEquals("pckc", model.location()); - Assertions.assertEquals("vwe", model.tags().get("oxoyyukp")); + Assertions.assertEquals("zvoaikna", model.location()); + Assertions.assertEquals("uwiguyxlyk", model.tags().get("phvxz")); + Assertions.assertEquals("s", model.annotation()); + Assertions.assertEquals("rb", model.internetGatewayRuleId()); Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.typePropertiesType()); - Assertions.assertEquals("qofyuicdhzbdy", model.networkFabricControllerId()); - Assertions.assertEquals("bdvibidmhmwffpl", model.internetGatewayRuleId()); - Assertions.assertEquals("u", model.annotation()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.internetGatewayType()); + Assertions.assertEquals("tggmuwdchozfnkfe", model.networkFabricControllerId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java new file mode 100644 index 000000000000..096ff996b767 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class InternetGatewayPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternetGatewayPatchProperties model = BinaryData.fromString("{\"internetGatewayRuleId\":\"kvec\"}") + .toObject(InternetGatewayPatchProperties.class); + Assertions.assertEquals("kvec", model.internetGatewayRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternetGatewayPatchProperties model = new InternetGatewayPatchProperties().withInternetGatewayRuleId("kvec"); + model = BinaryData.fromObject(model).toObject(InternetGatewayPatchProperties.class); + Assertions.assertEquals("kvec", model.internetGatewayRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java index 7add5ca29f88..7894199cd539 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,21 +13,21 @@ public final class InternetGatewayPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - InternetGatewayPatch model = BinaryData - .fromString( - "{\"properties\":{\"internetGatewayRuleId\":\"clgsc\"},\"tags\":{\"ofldpuviyfcaa\":\"imkrsrrmouc\"}}") + InternetGatewayPatch model = BinaryData.fromString( + "{\"properties\":{\"internetGatewayRuleId\":\"vqqugdrftbcv\"},\"tags\":{\"quowtljvfwhrea\":\"e\",\"ulmdgglm\":\"khyxvrqtvbcz\",\"ngpszngafpg\":\"pjpfseykgs\"}}") .toObject(InternetGatewayPatch.class); - Assertions.assertEquals("imkrsrrmouc", model.tags().get("ofldpuviyfcaa")); - Assertions.assertEquals("clgsc", model.internetGatewayRuleId()); + Assertions.assertEquals("e", model.tags().get("quowtljvfwhrea")); + Assertions.assertEquals("vqqugdrftbcv", model.internetGatewayRuleId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayPatch model = new InternetGatewayPatch().withTags(mapOf("ofldpuviyfcaa", "imkrsrrmouc")) - .withInternetGatewayRuleId("clgsc"); + InternetGatewayPatch model = new InternetGatewayPatch() + .withTags(mapOf("quowtljvfwhrea", "e", "ulmdgglm", "khyxvrqtvbcz", "ngpszngafpg", "pjpfseykgs")) + .withInternetGatewayRuleId("vqqugdrftbcv"); model = BinaryData.fromObject(model).toObject(InternetGatewayPatch.class); - Assertions.assertEquals("imkrsrrmouc", model.tags().get("ofldpuviyfcaa")); - Assertions.assertEquals("clgsc", model.internetGatewayRuleId()); + Assertions.assertEquals("e", model.tags().get("quowtljvfwhrea")); + Assertions.assertEquals("vqqugdrftbcv", model.internetGatewayRuleId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java deleted file mode 100644 index ed6abb70ed19..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchableProperties; -import org.junit.jupiter.api.Assertions; - -public final class InternetGatewayPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternetGatewayPatchableProperties model = BinaryData.fromString("{\"internetGatewayRuleId\":\"qhnlbqnbld\"}") - .toObject(InternetGatewayPatchableProperties.class); - Assertions.assertEquals("qhnlbqnbld", model.internetGatewayRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewayPatchableProperties model - = new InternetGatewayPatchableProperties().withInternetGatewayRuleId("qhnlbqnbld"); - model = BinaryData.fromObject(model).toObject(InternetGatewayPatchableProperties.class); - Assertions.assertEquals("qhnlbqnbld", model.internetGatewayRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java index 73a6d9f0b4ca..87fa86520424 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,24 +13,27 @@ public final class InternetGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayProperties model = BinaryData.fromString( - "{\"ipv4Address\":\"bopfppdbwnup\",\"port\":2068855752,\"type\":\"Workload\",\"networkFabricControllerId\":\"kuma\",\"provisioningState\":\"Canceled\",\"internetGatewayRuleId\":\"acfdmmcpugme\",\"annotation\":\"epvufhbzehew\"}") + "{\"annotation\":\"kpdxphlk\",\"internetGatewayRuleId\":\"nmgzvyfijdkzuqnw\",\"ipv4Address\":\"thuqolyahluq\",\"port\":608197313,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"rjb\",\"lastOperation\":{\"details\":\"kf\"},\"provisioningState\":\"Accepted\"}") .toObject(InternetGatewayProperties.class); - Assertions.assertEquals("epvufhbzehew", model.annotation()); + Assertions.assertEquals("kpdxphlk", model.annotation()); + Assertions.assertEquals("nmgzvyfijdkzuqnw", model.internetGatewayRuleId()); Assertions.assertEquals(GatewayType.WORKLOAD, model.type()); - Assertions.assertEquals("kuma", model.networkFabricControllerId()); - Assertions.assertEquals("acfdmmcpugme", model.internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.internetGatewayType()); + Assertions.assertEquals("rjb", model.networkFabricControllerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayProperties model = new InternetGatewayProperties().withAnnotation("epvufhbzehew") + InternetGatewayProperties model = new InternetGatewayProperties().withAnnotation("kpdxphlk") + .withInternetGatewayRuleId("nmgzvyfijdkzuqnw") .withType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("kuma") - .withInternetGatewayRuleId("acfdmmcpugme"); + .withInternetGatewayType(GatewayType.WORKLOAD) + .withNetworkFabricControllerId("rjb"); model = BinaryData.fromObject(model).toObject(InternetGatewayProperties.class); - Assertions.assertEquals("epvufhbzehew", model.annotation()); + Assertions.assertEquals("kpdxphlk", model.annotation()); + Assertions.assertEquals("nmgzvyfijdkzuqnw", model.internetGatewayRuleId()); Assertions.assertEquals(GatewayType.WORKLOAD, model.type()); - Assertions.assertEquals("kuma", model.networkFabricControllerId()); - Assertions.assertEquals("acfdmmcpugme", model.internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.internetGatewayType()); + Assertions.assertEquals("rjb", model.networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java index 32fa0ac2ccfd..d2abc000092e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -17,28 +19,48 @@ public final class InternetGatewayRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRuleInner model = BinaryData.fromString( - "{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"]},\"provisioningState\":\"Updating\",\"internetGatewayIds\":[\"ju\",\"plrvkmjcwmjvlg\",\"ggcvk\"],\"annotation\":\"lizrzbjpsfxsfuz\"},\"location\":\"vtmva\",\"tags\":{\"oveofizrvjfnmj\":\"idqlvhu\"},\"id\":\"vlwyzg\",\"name\":\"blkujrllfojuidjp\",\"type\":\"uyjucejikzo\"}") + "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"nbm\",\"wbjijkgq\"],\"condition\":\"And\",\"destinationAddressList\":[\"keznjaujvaa\",\"nggiycwkdtaa\"],\"sourceAddressList\":[\"fe\",\"aumrrqmbzmqkrat\",\"nxwbjsidbirkfp\"],\"headerAddressList\":[{\"headerName\":\"dgo\",\"addressList\":[\"ijymrhbguzozky\",\"wnf\"]},{\"headerName\":\"hhhqosm\",\"addressList\":[\"kutycyarnroohgua\",\"zoghktdpyczhc\",\"eocnhzqrottj\"]}]},\"lastOperation\":{\"details\":\"yjzp\"},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"h\",\"pqinf\",\"zpyglqdhmrj\"],\"annotation\":\"alcxpjbyy\"},\"location\":\"joqcjenkyhfqzvsq\",\"tags\":{\"uwyvcacoyvi\":\"jelgcmpzqjhhhq\"},\"id\":\"bsizus\",\"name\":\"szlbscm\",\"type\":\"lzijiufehgmvflnw\"}") .toObject(InternetGatewayRuleInner.class); - Assertions.assertEquals("vtmva", model.location()); - Assertions.assertEquals("idqlvhu", model.tags().get("oveofizrvjfnmj")); - Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); - Assertions.assertEquals("moichdlpnfpubntn", model.ruleProperties().addressList().get(0)); - Assertions.assertEquals("lizrzbjpsfxsfuz", model.annotation()); + Assertions.assertEquals("joqcjenkyhfqzvsq", model.location()); + Assertions.assertEquals("jelgcmpzqjhhhq", model.tags().get("uwyvcacoyvi")); + Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); + Assertions.assertEquals("nbm", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.ruleProperties().condition()); + Assertions.assertEquals("keznjaujvaa", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("fe", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("dgo", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("ijymrhbguzozky", + model.ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("alcxpjbyy", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRuleInner model = new InternetGatewayRuleInner().withLocation("vtmva") - .withTags(mapOf("oveofizrvjfnmj", "idqlvhu")) - .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) - .withAddressList(Arrays.asList("moichdlpnfpubntn", "atzviqsowsaael"))) - .withAnnotation("lizrzbjpsfxsfuz"); + InternetGatewayRuleInner model = new InternetGatewayRuleInner().withLocation("joqcjenkyhfqzvsq") + .withTags(mapOf("uwyvcacoyvi", "jelgcmpzqjhhhq")) + .withRuleProperties(new RuleProperties().withAction(Action.DENY) + .withAddressList(Arrays.asList("nbm", "wbjijkgq")) + .withCondition(RuleCondition.AND) + .withDestinationAddressList(Arrays.asList("keznjaujvaa", "nggiycwkdtaa")) + .withSourceAddressList(Arrays.asList("fe", "aumrrqmbzmqkrat", "nxwbjsidbirkfp")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("dgo") + .withAddressList(Arrays.asList("ijymrhbguzozky", "wnf")), + new HeaderAddressProperties().withHeaderName("hhhqosm") + .withAddressList(Arrays.asList("kutycyarnroohgua", "zoghktdpyczhc", "eocnhzqrottj"))))) + .withAnnotation("alcxpjbyy"); model = BinaryData.fromObject(model).toObject(InternetGatewayRuleInner.class); - Assertions.assertEquals("vtmva", model.location()); - Assertions.assertEquals("idqlvhu", model.tags().get("oveofizrvjfnmj")); - Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); - Assertions.assertEquals("moichdlpnfpubntn", model.ruleProperties().addressList().get(0)); - Assertions.assertEquals("lizrzbjpsfxsfuz", model.annotation()); + Assertions.assertEquals("joqcjenkyhfqzvsq", model.location()); + Assertions.assertEquals("jelgcmpzqjhhhq", model.tags().get("uwyvcacoyvi")); + Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); + Assertions.assertEquals("nbm", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.ruleProperties().condition()); + Assertions.assertEquals("keznjaujvaa", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("fe", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("dgo", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("ijymrhbguzozky", + model.ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("alcxpjbyy", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java index d9907732aa0a..f5f270d198d5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,17 +14,17 @@ public final class InternetGatewayRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRulePatch model = BinaryData.fromString( - "{\"tags\":{\"p\":\"folpymwamxqzra\",\"ulajvlejchc\":\"dphtv\",\"mzlanru\":\"rlzk\",\"phcnzqtpj\":\"dwv\"}}") + "{\"tags\":{\"carvvlfntymtpoi\":\"qusybwptd\",\"kdnwqapfgsdpcve\":\"enazerohzrsqals\",\"kva\":\"smzhhkuuipldqqct\"}}") .toObject(InternetGatewayRulePatch.class); - Assertions.assertEquals("folpymwamxqzra", model.tags().get("p")); + Assertions.assertEquals("qusybwptd", model.tags().get("carvvlfntymtpoi")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRulePatch model = new InternetGatewayRulePatch() - .withTags(mapOf("p", "folpymwamxqzra", "ulajvlejchc", "dphtv", "mzlanru", "rlzk", "phcnzqtpj", "dwv")); + InternetGatewayRulePatch model = new InternetGatewayRulePatch().withTags( + mapOf("carvvlfntymtpoi", "qusybwptd", "kdnwqapfgsdpcve", "enazerohzrsqals", "kva", "smzhhkuuipldqqct")); model = BinaryData.fromObject(model).toObject(InternetGatewayRulePatch.class); - Assertions.assertEquals("folpymwamxqzra", model.tags().get("p")); + Assertions.assertEquals("qusybwptd", model.tags().get("carvvlfntymtpoi")); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java index e10b71b12141..2ab422773137 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,21 +17,46 @@ public final class InternetGatewayRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRuleProperties model = BinaryData.fromString( - "{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"vtzejetjklnti\",\"yjuzkdb\",\"zolxrzvhqjwtr\"]},\"provisioningState\":\"Deleting\",\"internetGatewayIds\":[\"zpcrrkolawj\",\"jsmwrokc\",\"xfzzzwyjafitlhgu\"],\"annotation\":\"uchlgmltx\"}") + "{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"xrerlniylylyf\",\"xzutgqztwhghmupg\",\"yjtcdxabbujftab\",\"nbbklqpxzucafed\"],\"condition\":\"Or\",\"destinationAddressList\":[\"z\",\"fwxudgnhg\"],\"sourceAddressList\":[\"rtalvnbw\",\"pbeme\"],\"headerAddressList\":[{\"headerName\":\"vdjjukyrdn\",\"addressList\":[\"xahhxhqfaqnvzo\",\"gyipem\",\"hgav\",\"czuejdtxptl\"]},{\"headerName\":\"wzhomewjjstl\",\"addressList\":[\"qawmoaianc\",\"nvodrrs\"]},{\"headerName\":\"lxydkxrxv\",\"addressList\":[\"iwkgfbqljnq\",\"hychocokuleh\",\"rqlrqffawe\"]},{\"headerName\":\"rkphyjdxr\",\"addressList\":[\"uqd\",\"rxmrgchbapx\"]}]},\"lastOperation\":{\"details\":\"fjjkbajb\"},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"uusioycblev\",\"mclujyxkyxlzgs\",\"gkzz\",\"taf\"],\"annotation\":\"zffovwmbjl\"}") .toObject(InternetGatewayRuleProperties.class); - Assertions.assertEquals("uchlgmltx", model.annotation()); - Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); - Assertions.assertEquals("vtzejetjklnti", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals("zffovwmbjl", model.annotation()); + Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); + Assertions.assertEquals("xrerlniylylyf", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, model.ruleProperties().condition()); + Assertions.assertEquals("z", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("rtalvnbw", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("vdjjukyrdn", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("xahhxhqfaqnvzo", + model.ruleProperties().headerAddressList().get(0).addressList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRuleProperties model = new InternetGatewayRuleProperties().withAnnotation("uchlgmltx") - .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("vtzejetjklnti", "yjuzkdb", "zolxrzvhqjwtr"))); + InternetGatewayRuleProperties model = new InternetGatewayRuleProperties().withAnnotation("zffovwmbjl") + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList( + Arrays.asList("xrerlniylylyf", "xzutgqztwhghmupg", "yjtcdxabbujftab", "nbbklqpxzucafed")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("z", "fwxudgnhg")) + .withSourceAddressList(Arrays.asList("rtalvnbw", "pbeme")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("vdjjukyrdn") + .withAddressList(Arrays.asList("xahhxhqfaqnvzo", "gyipem", "hgav", "czuejdtxptl")), + new HeaderAddressProperties().withHeaderName("wzhomewjjstl") + .withAddressList(Arrays.asList("qawmoaianc", "nvodrrs")), + new HeaderAddressProperties().withHeaderName("lxydkxrxv") + .withAddressList(Arrays.asList("iwkgfbqljnq", "hychocokuleh", "rqlrqffawe")), + new HeaderAddressProperties().withHeaderName("rkphyjdxr") + .withAddressList(Arrays.asList("uqd", "rxmrgchbapx"))))); model = BinaryData.fromObject(model).toObject(InternetGatewayRuleProperties.class); - Assertions.assertEquals("uchlgmltx", model.annotation()); - Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); - Assertions.assertEquals("vtzejetjklnti", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals("zffovwmbjl", model.annotation()); + Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); + Assertions.assertEquals("xrerlniylylyf", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, model.ruleProperties().condition()); + Assertions.assertEquals("z", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("rtalvnbw", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("vdjjukyrdn", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("xahhxhqfaqnvzo", + model.ruleProperties().headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java index c2887d364f80..8b1bdf664876 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -26,31 +28,41 @@ public final class InternetGatewayRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"kzstzpzecdlc\",\"irtahtu\",\"cimtcaumviud\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"rmlujmtunlo\",\"wuzebfqvm\",\"jbhzyenf\"],\"annotation\":\"etxeudw\"},\"location\":\"dlckdoxocjcdevz\",\"tags\":{\"hfxmrhjnnhbcj\":\"eortwwyjmgvr\",\"fictptplkossjbzv\":\"wkdywkszavuafan\",\"czhfjdcc\":\"pzwdqzuhfgti\"},\"id\":\"nyuvbtcuhjcgjt\",\"name\":\"kntomnlz\",\"type\":\"hcdb\"}"; + = "{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"lah\",\"eqjchhrrx\",\"cztrqnuahh\",\"edvbrbdujpsh\"],\"condition\":\"Or\",\"destinationAddressList\":[\"ry\",\"y\",\"lwzjorvsgm\"],\"sourceAddressList\":[\"les\",\"jckyocyb\",\"lwdmpsdfsla\"],\"headerAddressList\":[{\"headerName\":\"hyylipvq\",\"addressList\":[\"mexnpoaeruywf\",\"ltwlzlmp\",\"prlcgqewm\",\"wyhqly\"]},{\"headerName\":\"kmxusmkpa\",\"addressList\":[\"wpbnjcko\",\"tun\"]}]},\"lastOperation\":{\"details\":\"ysvnddllbwnmvh\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"myrg\",\"sdouzohihqlwy\",\"sxeqtl\"],\"annotation\":\"mczcxouaneuep\"},\"location\":\"ztakov\",\"tags\":{\"mt\":\"wpv\"},\"id\":\"c\",\"name\":\"tucmiqsdsn\",\"type\":\"qqgs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGatewayRule response = manager.internetGatewayRules() - .define("hdbitq") - .withRegion("rrvkx") - .withExistingResourceGroup("xsxoxvimdvet") - .withRuleProperties( - new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("ujsgomrihumgrm", "d"))) - .withTags(mapOf("zjighd", "tanetinqxdhnpjn", "wvwetqffuxvfh", "mltpmr", "clmr", "qhngqqxjbsot", - "xbboceksramqch", "tujydeatwxpxbxed")) - .withAnnotation("yt") + .define("oanudvqannenxgo") + .withRegion("syc") + .withExistingResourceGroup("cem") + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("blqyfgzbfp", "ifsgzfg")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("iq", "dsohwnnayo", "ghjxhpppnksqi")) + .withSourceAddressList(Arrays.asList("egjto", "eohoygowdzizzu", "d", "rcppqvovsirtas")) + .withHeaderAddressList(Arrays.asList(new HeaderAddressProperties().withHeaderName("lpexhh") + .withAddressList(Arrays.asList("tl", "p", "biroxamnvrcq", "pbainsihdzxeufjy"))))) + .withTags(mapOf("caoc", "rqdty", "c", "uuxqnk")) + .withAnnotation("olghgtejty") .create(); - Assertions.assertEquals("dlckdoxocjcdevz", response.location()); - Assertions.assertEquals("eortwwyjmgvr", response.tags().get("hfxmrhjnnhbcj")); - Assertions.assertEquals(Action.DENY, response.ruleProperties().action()); - Assertions.assertEquals("kzstzpzecdlc", response.ruleProperties().addressList().get(0)); - Assertions.assertEquals("etxeudw", response.annotation()); + Assertions.assertEquals("ztakov", response.location()); + Assertions.assertEquals("wpv", response.tags().get("mt")); + Assertions.assertEquals(Action.ALLOW, response.ruleProperties().action()); + Assertions.assertEquals("lah", response.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.ruleProperties().condition()); + Assertions.assertEquals("ry", response.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("les", response.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("hyylipvq", response.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("mexnpoaeruywf", + response.ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("mczcxouaneuep", response.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java index fb86b44f08d3..629cb84e6386 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,23 +23,28 @@ public final class InternetGatewayRulesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"uujxsujk\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"e\",\"xbnjnczepdpc\"],\"annotation\":\"g\"},\"location\":\"mdquyyaescjxnavp\",\"tags\":{\"tbfkihainzkef\":\"bkx\",\"vcozcgoeozli\":\"zl\",\"honyonelivgtibt\":\"cbnunzuysajvvq\",\"mrvkxeojtdyulglh\":\"qjqjcajgofytkhhk\"},\"id\":\"lwruklfq\",\"name\":\"xspxgogypbztgae\",\"type\":\"jnskvct\"}"; + = "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"izdoysmzgbogdjw\"],\"condition\":\"Or\",\"destinationAddressList\":[\"pd\",\"uotk\",\"kbp\"],\"sourceAddressList\":[\"pbnkcwauylkbdsk\",\"pyfrtlukafq\"],\"headerAddressList\":[{\"headerName\":\"m\",\"addressList\":[\"yuxxeike\",\"npw\",\"nhqafuvvys\"]},{\"headerName\":\"jkxgfmesxjeqqfy\",\"addressList\":[\"kxtanlvoorv\",\"hdncq\"]},{\"headerName\":\"wtpssgqlnolspv\",\"addressList\":[\"egxlzd\",\"atptzkmfvdrkcw\",\"smnwsffia\"]}]},\"lastOperation\":{\"details\":\"frzzxirxxkmozkd\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"kivvpyznjwmd\",\"uzn\",\"jbzzwsesqy\"],\"annotation\":\"tvofgx\"},\"location\":\"hsxc\",\"tags\":{\"bxynkubwkdihs\":\"xcmepkpx\",\"wetwwjv\":\"nbyi\"},\"id\":\"ycygcvgebf\",\"name\":\"ityantecv\",\"type\":\"tkgopdjqnsicucq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGatewayRule response = manager.internetGatewayRules() - .getByResourceGroupWithResponse("lzayjwdun", "hmprkla", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("t", "scidkwzn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mdquyyaescjxnavp", response.location()); - Assertions.assertEquals("bkx", response.tags().get("tbfkihainzkef")); + Assertions.assertEquals("hsxc", response.location()); + Assertions.assertEquals("xcmepkpx", response.tags().get("bxynkubwkdihs")); Assertions.assertEquals(Action.DENY, response.ruleProperties().action()); - Assertions.assertEquals("uujxsujk", response.ruleProperties().addressList().get(0)); - Assertions.assertEquals("g", response.annotation()); + Assertions.assertEquals("izdoysmzgbogdjw", response.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.ruleProperties().condition()); + Assertions.assertEquals("pd", response.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("pbnkcwauylkbdsk", response.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("m", response.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("yuxxeike", response.ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("tvofgx", response.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java index 7a24a5bf2098..d3ac38a0e200 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,22 +24,31 @@ public final class InternetGatewayRulesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"xrnwukfajnp\",\"wzjggkwdep\",\"mz\",\"ayfiq\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"orjvudyhgtrtt\",\"uayiqyl\",\"kmmxzifbqgqexo\",\"q\"],\"annotation\":\"tgqrqkkvfygkuobp\"},\"location\":\"inpgobothxiew\",\"tags\":{\"qgzyvextc\":\"yjt\",\"whdlrifioz\":\"slroldow\",\"kudsozodwjc\":\"tcbiich\",\"qycymzrlcfg\":\"qoyxr\"},\"id\":\"wzauzfdhe\",\"name\":\"dnyciwzk\",\"type\":\"lykqadfge\"}]}"; + = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"jjlypwgwbycfamui\",\"isppygothisir\",\"hbogxwngpymye\",\"pusozaoutjliwbn\"],\"condition\":\"Or\",\"destinationAddressList\":[\"zjoyyptnokd\"],\"sourceAddressList\":[\"kzeowizvjejzxkf\",\"zqwkxxbo\",\"uvkkcowgnwhldc\"],\"headerAddressList\":[{\"headerName\":\"huqmdyn\",\"addressList\":[\"lcvlmrvhedrbzzb\",\"yag\",\"xwcndkdlxdlh\"]}]},\"lastOperation\":{\"details\":\"zcjawkyxo\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"qus\",\"xiaj\",\"crsdgtj\"],\"annotation\":\"opnccaxtp\"},\"location\":\"szehij\",\"tags\":{\"hjmg\":\"feabzjp\",\"xymfqmvnhsf\":\"ceqaklsfxlrx\",\"dptsp\":\"xtusbjxpuok\",\"asjwnwnj\":\"gtplonalpwaulkwu\"},\"id\":\"rnfgtmupblhnxq\",\"name\":\"zzikxufuwcajy\",\"type\":\"zlku\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.internetGatewayRules().listByResourceGroup("uzimbwttmhlvr", com.azure.core.util.Context.NONE); + = manager.internetGatewayRules().listByResourceGroup("eciexsc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("inpgobothxiew", response.iterator().next().location()); - Assertions.assertEquals("yjt", response.iterator().next().tags().get("qgzyvextc")); + Assertions.assertEquals("szehij", response.iterator().next().location()); + Assertions.assertEquals("feabzjp", response.iterator().next().tags().get("hjmg")); Assertions.assertEquals(Action.ALLOW, response.iterator().next().ruleProperties().action()); - Assertions.assertEquals("xrnwukfajnp", response.iterator().next().ruleProperties().addressList().get(0)); - Assertions.assertEquals("tgqrqkkvfygkuobp", response.iterator().next().annotation()); + Assertions.assertEquals("jjlypwgwbycfamui", response.iterator().next().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.iterator().next().ruleProperties().condition()); + Assertions.assertEquals("zjoyyptnokd", + response.iterator().next().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("kzeowizvjejzxkf", + response.iterator().next().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("huqmdyn", + response.iterator().next().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("lcvlmrvhedrbzzb", + response.iterator().next().ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("opnccaxtp", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java index 92c7e125f8a6..acef4e67fe0d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,22 +24,30 @@ public final class InternetGatewayRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"oha\",\"bri\",\"madjrsbga\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"vqmxqsxofxqnki\",\"okgltsx\",\"oiobh\"],\"annotation\":\"b\"},\"location\":\"ptlsrvqzgaqs\",\"tags\":{\"oxrqhjninpeswv\":\"njlvgrghnh\"},\"id\":\"hq\",\"name\":\"gebzqzmcsviujo\",\"type\":\"zdvmsnao\"}]}"; + = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"tugiwsvlfpmbp\",\"rgnx\"],\"condition\":\"And\",\"destinationAddressList\":[\"zaysfzuvu\"],\"sourceAddressList\":[\"y\",\"qcjclvbqovkz\",\"eytphnazpgvfcubx\"],\"headerAddressList\":[{\"headerName\":\"edbqrlbyhzyf\",\"addressList\":[\"qkrzvdj\",\"cevbkk\"]},{\"headerName\":\"fjwgp\",\"addressList\":[\"wx\",\"hw\",\"fqzwysmsqqmdajsq\"]}]},\"lastOperation\":{\"details\":\"ftyi\"},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"iifdrbsrpj\",\"pbibsnxmfo\"],\"annotation\":\"npnrfvqgcuwgkmq\"},\"location\":\"rewtfu\",\"tags\":{\"kcgittfmlpihtepa\":\"sxn\",\"nybnt\":\"jebrinvfcdsijs\",\"ayxujzoxgakqt\":\"x\"},\"id\":\"rjucazwe\",\"name\":\"mah\",\"type\":\"lx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internetGatewayRules().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ptlsrvqzgaqs", response.iterator().next().location()); - Assertions.assertEquals("njlvgrghnh", response.iterator().next().tags().get("oxrqhjninpeswv")); - Assertions.assertEquals(Action.DENY, response.iterator().next().ruleProperties().action()); - Assertions.assertEquals("oha", response.iterator().next().ruleProperties().addressList().get(0)); - Assertions.assertEquals("b", response.iterator().next().annotation()); + Assertions.assertEquals("rewtfu", response.iterator().next().location()); + Assertions.assertEquals("sxn", response.iterator().next().tags().get("kcgittfmlpihtepa")); + Assertions.assertEquals(Action.ALLOW, response.iterator().next().ruleProperties().action()); + Assertions.assertEquals("tugiwsvlfpmbp", response.iterator().next().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, response.iterator().next().ruleProperties().condition()); + Assertions.assertEquals("zaysfzuvu", + response.iterator().next().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("y", response.iterator().next().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("edbqrlbyhzyf", + response.iterator().next().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("qkrzvdj", + response.iterator().next().ruleProperties().headerAddressList().get(0).addressList().get(0)); + Assertions.assertEquals("npnrfvqgcuwgkmq", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java index a48ca70102a4..59ea47e8fcb5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java @@ -1,76 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRulesListResult; import com.azure.resourcemanager.managednetworkfabric.models.Action; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import org.junit.jupiter.api.Assertions; public final class InternetGatewayRulesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRulesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"v\",\"hlaiwd\",\"xsmlz\",\"hzdtxetlgydlh\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"pxy\",\"afiqgeaarbgjekg\",\"klbyulidwcw\"],\"annotation\":\"zegjonfhjirwgdn\"},\"location\":\"brfkspz\",\"tags\":{\"jcitdigsxcdglj\":\"tk\",\"tomflrytswfpf\":\"lkeuac\",\"lurlpshhkvp\":\"dgycxnmskwhqjjy\",\"skondcbrwimu\":\"dwqslsrhmpqvw\"},\"id\":\"qejo\",\"name\":\"ovyrrleaesinu\",\"type\":\"tljqobbpih\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"ecybmrqbrj\",\"bmpxdlvykfrexc\",\"s\",\"qwjksghudgz\"]},\"provisioningState\":\"Deleting\",\"internetGatewayIds\":[\"ggsvoujkxibdaf\",\"rkmdyom\"],\"annotation\":\"fbvfbhdy\"},\"location\":\"hpwpgddeimawzovg\",\"tags\":{\"sqowxwc\":\"muikjcjcaztbws\"},\"id\":\"mlikytw\",\"name\":\"czcswka\",\"type\":\"ve\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"dvlvhbwrnfxtgdd\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"hn\",\"naoyank\",\"oe\",\"swankltytmh\"],\"annotation\":\"oznnhdrlktgj\"},\"location\":\"gguxhemlwyw\",\"tags\":{\"bukklels\":\"czg\",\"srlsmd\":\"xblycsxzuj\"},\"id\":\"sqplpvmjcd\",\"name\":\"ewbidyvteowxv\",\"type\":\"piudeugfsxzecpa\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"ufykhvuhxepmru\",\"znabaobns\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"ltymkmvguihywart\",\"pphkixkykxds\",\"j\",\"emmucfxh\"],\"annotation\":\"kflrmymy\"},\"location\":\"cqlh\",\"tags\":{\"uugqk\":\"wslmiiiovgqcg\"},\"id\":\"totiowlxteqdptjg\",\"name\":\"dtguk\",\"type\":\"anblwphqlkccu\"}],\"nextLink\":\"ygqwahoiu\"}") + "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"jqvq\",\"vweht\",\"emxhzzy\"],\"condition\":\"And\",\"destinationAddressList\":[\"xivzrrry\",\"eimipskd\",\"zatvfuzka\"],\"sourceAddressList\":[\"vvruxwi\",\"syeipqd\",\"mjtgrqg\",\"gkkileplkcsmkn\"],\"headerAddressList\":[{},{},{},{}]},\"lastOperation\":{\"details\":\"aedorvvmqf\"},\"provisioningState\":\"Failed\",\"internetGatewayIds\":[\"dgwumgxdgdhp\",\"bgd\",\"xjd\"],\"annotation\":\"jsaqwotmmwllcols\"},\"location\":\"xaptefhexcgjok\",\"tags\":{\"eksnbksdqhjvyk\":\"nhvlqjbekp\",\"vnwqjwgo\":\"xeslkhhustcpoqm\",\"bkjbz\":\"nlejjjkxybwf\",\"nsxfwu\":\"ensvkzykjtj\"},\"id\":\"hcdpkupnqrmgj\",\"name\":\"bpkuwxeoio\",\"type\":\"fiz\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"jzwfb\",\"yay\",\"mmfz\"],\"condition\":\"Or\",\"destinationAddressList\":[\"rzx\",\"dew\",\"rsxkr\",\"lbjazejww\"],\"sourceAddressList\":[\"oypsuhbrnnhj\"],\"headerAddressList\":[{},{},{},{}]},\"lastOperation\":{\"details\":\"hqkb\"},\"provisioningState\":\"Failed\",\"internetGatewayIds\":[\"ozycy\",\"iqyhgfse\",\"zlex\"],\"annotation\":\"fledynojpziu\"},\"location\":\"bzkkd\",\"tags\":{\"elpkpbafvafhlbyl\":\"qsyclj\",\"sofpltd\":\"cbevxrhyzdfw\",\"hfnrac\":\"mairrh\"},\"id\":\"npq\",\"name\":\"g\",\"type\":\"uuj\"}],\"nextLink\":\"uhd\"}") .toObject(InternetGatewayRulesListResult.class); - Assertions.assertEquals("brfkspz", model.value().get(0).location()); - Assertions.assertEquals("tk", model.value().get(0).tags().get("jcitdigsxcdglj")); + Assertions.assertEquals("xaptefhexcgjok", model.value().get(0).location()); + Assertions.assertEquals("nhvlqjbekp", model.value().get(0).tags().get("eksnbksdqhjvyk")); Assertions.assertEquals(Action.ALLOW, model.value().get(0).ruleProperties().action()); - Assertions.assertEquals("v", model.value().get(0).ruleProperties().addressList().get(0)); - Assertions.assertEquals("zegjonfhjirwgdn", model.value().get(0).annotation()); - Assertions.assertEquals("ygqwahoiu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewayRulesListResult model = new InternetGatewayRulesListResult().withValue(Arrays.asList( - new InternetGatewayRuleInner().withLocation("brfkspz") - .withTags(mapOf("jcitdigsxcdglj", "tk", "tomflrytswfpf", "lkeuac", "lurlpshhkvp", "dgycxnmskwhqjjy", - "skondcbrwimu", "dwqslsrhmpqvw")) - .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) - .withAddressList(Arrays.asList("v", "hlaiwd", "xsmlz", "hzdtxetlgydlh"))) - .withAnnotation("zegjonfhjirwgdn"), - new InternetGatewayRuleInner().withLocation("hpwpgddeimawzovg") - .withTags(mapOf("sqowxwc", "muikjcjcaztbws")) - .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("ecybmrqbrj", "bmpxdlvykfrexc", "s", "qwjksghudgz"))) - .withAnnotation("fbvfbhdy"), - new InternetGatewayRuleInner().withLocation("gguxhemlwyw") - .withTags(mapOf("bukklels", "czg", "srlsmd", "xblycsxzuj")) - .withRuleProperties( - new RuleProperties().withAction(Action.DENY).withAddressList(Arrays.asList("dvlvhbwrnfxtgdd"))) - .withAnnotation("oznnhdrlktgj"), - new InternetGatewayRuleInner().withLocation("cqlh") - .withTags(mapOf("uugqk", "wslmiiiovgqcg")) - .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("ufykhvuhxepmru", "znabaobns"))) - .withAnnotation("kflrmymy"))) - .withNextLink("ygqwahoiu"); - model = BinaryData.fromObject(model).toObject(InternetGatewayRulesListResult.class); - Assertions.assertEquals("brfkspz", model.value().get(0).location()); - Assertions.assertEquals("tk", model.value().get(0).tags().get("jcitdigsxcdglj")); - Assertions.assertEquals(Action.ALLOW, model.value().get(0).ruleProperties().action()); - Assertions.assertEquals("v", model.value().get(0).ruleProperties().addressList().get(0)); - Assertions.assertEquals("zegjonfhjirwgdn", model.value().get(0).annotation()); - Assertions.assertEquals("ygqwahoiu", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("jqvq", model.value().get(0).ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.value().get(0).ruleProperties().condition()); + Assertions.assertEquals("xivzrrry", model.value().get(0).ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("vvruxwi", model.value().get(0).ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("jsaqwotmmwllcols", model.value().get(0).annotation()); + Assertions.assertEquals("uhd", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java index f4442f870735..1ec592b1e982 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; @@ -24,32 +24,34 @@ public final class InternetGatewaysCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ipv4Address\":\"ldaqwjun\",\"port\":300799614,\"type\":\"Workload\",\"networkFabricControllerId\":\"jhwcbrdsyp\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"kbvzpkodngvnq\",\"annotation\":\"gsbtwgnldxu\"},\"location\":\"lhvbqyczn\",\"tags\":{\"qwucqsdgbx\":\"piiuvcqoq\",\"myvwp\":\"wtvmijccpkkjl\"},\"id\":\"jmaih\",\"name\":\"nnlb\",\"type\":\"xjppcbqetfzfppv\"}"; + = "{\"properties\":{\"annotation\":\"il\",\"internetGatewayRuleId\":\"abqtjchxsfwe\",\"ipv4Address\":\"eiyem\",\"port\":1262614540,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"dqqwcspfhrn\",\"lastOperation\":{\"details\":\"m\"},\"provisioningState\":\"Succeeded\"},\"location\":\"qgs\",\"tags\":{\"zqdvgnomtkgoyny\":\"q\",\"h\":\"arw\",\"iltl\":\"uzmv\"},\"id\":\"mfkctpaiwh\",\"name\":\"jw\",\"type\":\"xduwimwn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGateway response = manager.internetGateways() - .define("mi") - .withRegion("xpijvapeak") - .withExistingResourceGroup("o") - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("znghuqzgpdglkf") - .withTags(mapOf("a", "cedliklxkyoddoq", "qyrgqmndk", "qtrkicw")) - .withInternetGatewayRuleId("gavtfy") - .withAnnotation("edfmzuk") + .define("ritjjh") + .withRegion("disjeovgc") + .withExistingResourceGroup("cleyam") + .withNetworkFabricControllerId("yx") + .withTags(mapOf("dibzvpdjytmeouiu", "hgjonr", "njbbhwsfllzy", "kcnq", "pbyejsgb", "zpjjds")) + .withAnnotation("yp") + .withInternetGatewayRuleId("ncgwpvbtkaf") + .withTypePropertiesType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) .create(); - Assertions.assertEquals("lhvbqyczn", response.location()); - Assertions.assertEquals("piiuvcqoq", response.tags().get("qwucqsdgbx")); + Assertions.assertEquals("qgs", response.location()); + Assertions.assertEquals("q", response.tags().get("zqdvgnomtkgoyny")); + Assertions.assertEquals("il", response.annotation()); + Assertions.assertEquals("abqtjchxsfwe", response.internetGatewayRuleId()); Assertions.assertEquals(GatewayType.WORKLOAD, response.typePropertiesType()); - Assertions.assertEquals("jhwcbrdsyp", response.networkFabricControllerId()); - Assertions.assertEquals("kbvzpkodngvnq", response.internetGatewayRuleId()); - Assertions.assertEquals("gsbtwgnldxu", response.annotation()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.internetGatewayType()); + Assertions.assertEquals("dqqwcspfhrn", response.networkFabricControllerId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java index 2c5370941cec..601a9cb00c03 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; @@ -22,24 +22,25 @@ public final class InternetGatewaysGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ipv4Address\":\"do\",\"port\":530993716,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"k\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"dprpensbmzjrituk\",\"annotation\":\"mh\"},\"location\":\"exmizzjxwjoqfzw\",\"tags\":{\"tqmri\":\"uhduwdvol\",\"zbkiumjf\":\"dsf\",\"voyiogbntnwzr\":\"oxedrmrazhvch\",\"vcebspcir\":\"zsoowxcsmxtlcapp\"},\"id\":\"omhkdwuwedupb\",\"name\":\"mzkwhjjsqwhae\",\"type\":\"efvvkxdb\"}"; + = "{\"properties\":{\"annotation\":\"j\",\"internetGatewayRuleId\":\"lzq\",\"ipv4Address\":\"sriletbhlbhkijqg\",\"port\":47293470,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"qiwxeppuhkizo\",\"lastOperation\":{\"details\":\"vjyvobevfbmxzo\"},\"provisioningState\":\"Canceled\"},\"location\":\"s\",\"tags\":{\"meuyxhcwu\":\"pajiobybyilhdbb\"},\"id\":\"t\",\"name\":\"go\",\"type\":\"choji\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGateway response = manager.internetGateways() - .getByResourceGroupWithResponse("jixgofqdqws", "mihuvrqp", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("itiut", "ka", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("exmizzjxwjoqfzw", response.location()); - Assertions.assertEquals("uhduwdvol", response.tags().get("tqmri")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.typePropertiesType()); - Assertions.assertEquals("k", response.networkFabricControllerId()); - Assertions.assertEquals("dprpensbmzjrituk", response.internetGatewayRuleId()); - Assertions.assertEquals("mh", response.annotation()); + Assertions.assertEquals("s", response.location()); + Assertions.assertEquals("pajiobybyilhdbb", response.tags().get("meuyxhcwu")); + Assertions.assertEquals("j", response.annotation()); + Assertions.assertEquals("lzq", response.internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.typePropertiesType()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.internetGatewayType()); + Assertions.assertEquals("qiwxeppuhkizo", response.networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java index 28f7c321c5cb..7ecaf6a470c1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; @@ -23,23 +23,24 @@ public final class InternetGatewaysListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ipv4Address\":\"dzdobuesdy\",\"port\":666543839,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"z\",\"provisioningState\":\"Canceled\",\"internetGatewayRuleId\":\"upktwpdpsegivyt\",\"annotation\":\"vbbkflewgsltut\"},\"location\":\"vedwuu\",\"tags\":{\"kk\":\"enxcqsxwclykcrud\",\"mptedeuenthsh\":\"njre\",\"kkhpjngla\":\"fiygpg\"},\"id\":\"lmihnmtrdlpxiw\",\"name\":\"gecpvfpnr\",\"type\":\"i\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"bsbkvfk\",\"internetGatewayRuleId\":\"bbpoijs\",\"ipv4Address\":\"ru\",\"port\":697078351,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"knarscxnk\",\"lastOperation\":{\"details\":\"inzosxrs\"},\"provisioningState\":\"Canceled\"},\"location\":\"jw\",\"tags\":{\"vuxqactoqqehnqi\":\"xvezwwqchxowp\",\"lbkize\":\"rgnvuolvptv\"},\"id\":\"brwlpe\",\"name\":\"misoiq\",\"type\":\"etzgwywyxbwuam\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.internetGateways().listByResourceGroup("mcvaq", com.azure.core.util.Context.NONE); + = manager.internetGateways().listByResourceGroup("laqqfrgiplxr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vedwuu", response.iterator().next().location()); - Assertions.assertEquals("enxcqsxwclykcrud", response.iterator().next().tags().get("kk")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.iterator().next().typePropertiesType()); - Assertions.assertEquals("z", response.iterator().next().networkFabricControllerId()); - Assertions.assertEquals("upktwpdpsegivyt", response.iterator().next().internetGatewayRuleId()); - Assertions.assertEquals("vbbkflewgsltut", response.iterator().next().annotation()); + Assertions.assertEquals("jw", response.iterator().next().location()); + Assertions.assertEquals("xvezwwqchxowp", response.iterator().next().tags().get("vuxqactoqqehnqi")); + Assertions.assertEquals("bsbkvfk", response.iterator().next().annotation()); + Assertions.assertEquals("bbpoijs", response.iterator().next().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().typePropertiesType()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().internetGatewayType()); + Assertions.assertEquals("knarscxnk", response.iterator().next().networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java index 11817ec18b4f..7617b8c8cf6c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; @@ -23,22 +23,23 @@ public final class InternetGatewaysListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ipv4Address\":\"oxl\",\"port\":397632568,\"type\":\"Workload\",\"networkFabricControllerId\":\"yf\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"ifbwbl\",\"annotation\":\"hpxukxgoyxon\"},\"location\":\"wdqrxros\",\"tags\":{\"atktwjrppifeyrq\":\"rldxfuaefew\",\"ojklwjpzw\":\"elrmdcizhvks\"},\"id\":\"ncw\",\"name\":\"smpyeyzolbfnfly\",\"type\":\"fxudui\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"opqqiyjrehe\",\"internetGatewayRuleId\":\"h\",\"ipv4Address\":\"gmx\",\"port\":2009136030,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"gro\",\"lastOperation\":{\"details\":\"sqdzyy\"},\"provisioningState\":\"Succeeded\"},\"location\":\"tgqpqfwuplfjkb\",\"tags\":{\"ta\":\"useimuipg\"},\"id\":\"xbfhb\",\"name\":\"pldzipheife\",\"type\":\"zn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internetGateways().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("wdqrxros", response.iterator().next().location()); - Assertions.assertEquals("rldxfuaefew", response.iterator().next().tags().get("atktwjrppifeyrq")); - Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().typePropertiesType()); - Assertions.assertEquals("yf", response.iterator().next().networkFabricControllerId()); - Assertions.assertEquals("ifbwbl", response.iterator().next().internetGatewayRuleId()); - Assertions.assertEquals("hpxukxgoyxon", response.iterator().next().annotation()); + Assertions.assertEquals("tgqpqfwuplfjkb", response.iterator().next().location()); + Assertions.assertEquals("useimuipg", response.iterator().next().tags().get("ta")); + Assertions.assertEquals("opqqiyjrehe", response.iterator().next().annotation()); + Assertions.assertEquals("h", response.iterator().next().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.iterator().next().typePropertiesType()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().internetGatewayType()); + Assertions.assertEquals("gro", response.iterator().next().networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java index 5c68e391a9c6..8a35f0947248 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java @@ -1,69 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewaysListResult; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewaysListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class InternetGatewaysListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewaysListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ipv4Address\":\"hbhlvbm\",\"port\":453041096,\"type\":\"Workload\",\"networkFabricControllerId\":\"bsxtkcudfbsfarfs\",\"provisioningState\":\"Accepted\",\"internetGatewayRuleId\":\"kjxnqpvwgfstmhq\",\"annotation\":\"izmdksa\"},\"location\":\"fcluqvo\",\"tags\":{\"w\":\"cjimryvwgcwwpbmz\",\"bvopwndyqle\":\"sydsxwefohe\",\"lowkxxpvb\":\"llklmtk\",\"k\":\"dfjmzsyzfhotlh\"},\"id\":\"yych\",\"name\":\"nsjlpjrtws\",\"type\":\"hv\"},{\"properties\":{\"ipv4Address\":\"icphvtrrmhw\",\"port\":231529095,\"type\":\"Workload\",\"networkFabricControllerId\":\"pyf\",\"provisioningState\":\"Failed\",\"internetGatewayRuleId\":\"vjglrocuyzlwhhme\",\"annotation\":\"ooclutnp\"},\"location\":\"emc\",\"tags\":{\"jxsglhsr\":\"mmyky\",\"ylmbkzudni\":\"rye\",\"tjewlpxuzzj\":\"rfih\",\"otoihiqa\":\"nrefqyh\"},\"id\":\"ydiw\",\"name\":\"brkwpzdqt\",\"type\":\"hcspo\"}],\"nextLink\":\"qaxsipietgbebjf\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"cngoadyedmzrg\",\"internetGatewayRuleId\":\"oknub\",\"ipv4Address\":\"itpkpztrgdg\",\"port\":1339773074,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"sw\",\"lastOperation\":{\"details\":\"xpqitweialwvs\"},\"provisioningState\":\"Canceled\"},\"location\":\"z\",\"tags\":{\"sxzakuejkm\":\"qtyltcoqcujp\"},\"id\":\"bizt\",\"name\":\"ofqcvovjufycsjm\",\"type\":\"bemyeji\"},{\"properties\":{\"annotation\":\"uxegthortudawlpj\",\"internetGatewayRuleId\":\"lqerpptcbgqnzm\",\"ipv4Address\":\"iilialwc\",\"port\":1452234120,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"ccgzpraoxnyu\",\"lastOperation\":{\"details\":\"tsgftipwcxbyubh\"},\"provisioningState\":\"Failed\"},\"location\":\"yurnpnuhzafc\",\"tags\":{\"bui\":\"hiigby\",\"vcrk\":\"vxva\"},\"id\":\"lbnb\",\"name\":\"xvhcs\",\"type\":\"hzlwxaea\"}],\"nextLink\":\"ur\"}") .toObject(InternetGatewaysListResult.class); - Assertions.assertEquals("fcluqvo", model.value().get(0).location()); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.value().get(0).tags().get("w")); + Assertions.assertEquals("z", model.value().get(0).location()); + Assertions.assertEquals("qtyltcoqcujp", model.value().get(0).tags().get("sxzakuejkm")); + Assertions.assertEquals("cngoadyedmzrg", model.value().get(0).annotation()); + Assertions.assertEquals("oknub", model.value().get(0).internetGatewayRuleId()); Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).typePropertiesType()); - Assertions.assertEquals("bsxtkcudfbsfarfs", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("kjxnqpvwgfstmhq", model.value().get(0).internetGatewayRuleId()); - Assertions.assertEquals("izmdksa", model.value().get(0).annotation()); - Assertions.assertEquals("qaxsipietgbebjf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewaysListResult model = new InternetGatewaysListResult().withValue(Arrays.asList( - new InternetGatewayInner().withLocation("fcluqvo") - .withTags(mapOf("w", "cjimryvwgcwwpbmz", "bvopwndyqle", "sydsxwefohe", "lowkxxpvb", "llklmtk", "k", - "dfjmzsyzfhotlh")) - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("bsxtkcudfbsfarfs") - .withInternetGatewayRuleId("kjxnqpvwgfstmhq") - .withAnnotation("izmdksa"), - new InternetGatewayInner().withLocation("emc") - .withTags(mapOf("jxsglhsr", "mmyky", "ylmbkzudni", "rye", "tjewlpxuzzj", "rfih", "otoihiqa", "nrefqyh")) - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("pyf") - .withInternetGatewayRuleId("vjglrocuyzlwhhme") - .withAnnotation("ooclutnp"))) - .withNextLink("qaxsipietgbebjf"); - model = BinaryData.fromObject(model).toObject(InternetGatewaysListResult.class); - Assertions.assertEquals("fcluqvo", model.value().get(0).location()); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.value().get(0).tags().get("w")); - Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).typePropertiesType()); - Assertions.assertEquals("bsxtkcudfbsfarfs", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("kjxnqpvwgfstmhq", model.value().get(0).internetGatewayRuleId()); - Assertions.assertEquals("izmdksa", model.value().get(0).annotation()); - Assertions.assertEquals("qaxsipietgbebjf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).internetGatewayType()); + Assertions.assertEquals("sw", model.value().get(0).networkFabricControllerId()); + Assertions.assertEquals("ur", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java index 0c4151496afc..4aaa7bbd069e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -27,43 +27,52 @@ public final class IpCommunitiesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":7419786157769811395,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"rrrqnneqrypyurv\",\"hhovtue\"]},{\"action\":\"Permit\",\"sequenceNumber\":5041983404964007850,\"wellKnownCommunities\":[\"NoExport\",\"GShut\"],\"communityMembers\":[\"yb\",\"dzycxhaoegjzgplj\",\"nwczsraz\"]},{\"action\":\"Deny\",\"sequenceNumber\":7036914459390802617,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoAdvertise\"],\"communityMembers\":[\"h\",\"pua\",\"asizzfmugykwuyc\",\"otennd\"]}],\"annotation\":\"thdzitjzffph\"},\"location\":\"wjqvs\",\"tags\":{\"z\":\"onadez\",\"rsguogkcbr\":\"vfybxmmrvnuvqk\",\"tvvqtmvifgcvsim\":\"tpyabensjflwp\",\"xgosnxa\":\"lbmti\"},\"id\":\"ptcd\",\"name\":\"mzxaoxlhmvj\",\"type\":\"nn\"}"; + = "{\"properties\":{\"annotation\":\"lhefq\",\"networkFabricId\":\"rnxtpzdgyi\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":7586023866821824856,\"wellKnownCommunities\":[\"NoExport\",\"NoExport\",\"GShut\"],\"communityMembers\":[\"xoucs\"]},{\"action\":\"Deny\",\"sequenceNumber\":5299077949522645246,\"wellKnownCommunities\":[\"Internet\",\"NoExport\"],\"communityMembers\":[\"iahokeacmadyo\"]}],\"lastOperation\":{\"details\":\"dauo\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"tntoet\",\"tags\":{\"f\":\"gdgbzftsbpef\",\"ogpbogpbwe\":\"gthcdbzoxho\"},\"id\":\"oxlzrijpkbrvm\",\"name\":\"up\",\"type\":\"krqeqjtzaw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - IpCommunity response - = manager.ipCommunities() - .define("khdhpmkxdujkxpuq") - .withRegion("i") - .withExistingResourceGroup("cabaam") - .withTags(mapOf("pvhcbtza", "bvxqtolpwb", "ick", "rjxcon", "gvuqzgbjwvrudmp", "kithueoc", "esgyzwph", - "ewpmioleaja")) - .withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4994198146168498626L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("ezxiz", "syxbfjilb")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6838121574977908802L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) - .withCommunityMembers(Arrays.asList("wivkdf", "jsk")))) - .withAnnotation("bxzepirtv") - .create(); + IpCommunity response = manager.ipCommunities() + .define("oxexvt") + .withRegion("wyppnularnuppr") + .withExistingResourceGroup("p") + .withIpCommunityRules(Arrays.asList( + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8533269732226999406L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("szwrqmsw", "rsm", "w", "cnzfajpt")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(3949619966555893744L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("pp", "fj", "dc")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(815462763401119906L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.NO_EXPORT, WellKnownCommunities.INTERNET, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("tgggidrx", "ykjchz", "zwcpqkpgbs", "jqjjt")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(6377793504015016238L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.NO_EXPORT, WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("pbko", "pujcr", "p")))) + .withTags(mapOf("u", "epsozuzxoyanlhj", "ruryyqytaqj", "waauxk")) + .withAnnotation("hsymgkirfzvtzrqo") + .create(); - Assertions.assertEquals("wjqvs", response.location()); - Assertions.assertEquals("onadez", response.tags().get("z")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.ipCommunityRules().get(0).action()); - Assertions.assertEquals(7419786157769811395L, response.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + Assertions.assertEquals("tntoet", response.location()); + Assertions.assertEquals("gdgbzftsbpef", response.tags().get("f")); + Assertions.assertEquals("lhefq", response.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipCommunityRules().get(0).action()); + Assertions.assertEquals(7586023866821824856L, response.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, response.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rrrqnneqrypyurv", response.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("thdzitjzffph", response.annotation()); + Assertions.assertEquals("xoucs", response.ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java index ccd1f7f7fcb3..af8f69fd63ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -23,26 +23,26 @@ public final class IpCommunitiesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6487978937622546147,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"dfiekkiskyy\",\"aeknfffy\"]},{\"action\":\"Permit\",\"sequenceNumber\":2958499754343838175,\"wellKnownCommunities\":[\"NoExport\",\"GShut\",\"NoExport\"],\"communityMembers\":[\"ufbbjiu\",\"fofhoajjyls\"]},{\"action\":\"Permit\",\"sequenceNumber\":3348662806706509828,\"wellKnownCommunities\":[\"LocalAS\",\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"qquyhbcee\"]},{\"action\":\"Permit\",\"sequenceNumber\":7959928209860796152,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\",\"Internet\"],\"communityMembers\":[\"tvuxeu\",\"mds\",\"ij\",\"axxfdlypkcpw\"]}],\"annotation\":\"qnnmjundt\"},\"location\":\"cltjhbcycgqa\",\"tags\":{\"acww\":\"ihxv\",\"qgugwl\":\"opxpryxnsbubwhz\"},\"id\":\"xahtqmmkdhwqc\",\"name\":\"webagmfpkephu\",\"type\":\"eucosvkk\"}"; + = "{\"properties\":{\"annotation\":\"jtk\",\"networkFabricId\":\"myjdbcknsojtmpd\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5843239366804985563,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"va\",\"tkcen\"]},{\"action\":\"Permit\",\"sequenceNumber\":1341916419942847465,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"nppxxeysqe\",\"fwugo\",\"ys\",\"munvzmvnbcklssx\"]}],\"lastOperation\":{\"details\":\"svfsuk\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\"},\"location\":\"kpnne\",\"tags\":{\"or\":\"ez\"},\"id\":\"zwk\",\"name\":\"ohjx\",\"type\":\"cmmvuamorhkn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpCommunity response = manager.ipCommunities() - .getByResourceGroupWithResponse("zsbzrrxeyvidcowl", "mbdctqxavejo", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("vjdywpfxi", "jfk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cltjhbcycgqa", response.location()); - Assertions.assertEquals("ihxv", response.tags().get("acww")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipCommunityRules().get(0).action()); - Assertions.assertEquals(6487978937622546147L, response.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, + Assertions.assertEquals("kpnne", response.location()); + Assertions.assertEquals("ez", response.tags().get("or")); + Assertions.assertEquals("jtk", response.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.ipCommunityRules().get(0).action()); + Assertions.assertEquals(5843239366804985563L, response.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, response.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("dfiekkiskyy", response.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qnnmjundt", response.annotation()); + Assertions.assertEquals("va", response.ipCommunityRules().get(0).communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java index 13b10b7842f6..5f23116da038 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -24,28 +24,28 @@ public final class IpCommunitiesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6659845447567248443,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"zfpffbuqxknvmcgm\",\"gzyojfchicpare\",\"zoksgqhb\"]},{\"action\":\"Permit\",\"sequenceNumber\":321179277904162,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\"],\"communityMembers\":[\"blkcrfldfljw\",\"kbptsfl\"]}],\"annotation\":\"umbmwgftshfg\"},\"location\":\"xuq\",\"tags\":{\"ikuqirhs\":\"sk\",\"zibrlr\":\"xpaowkgvnlfueyx\",\"cfebpiucenbvrll\":\"u\",\"dzwilsxryi\":\"dfkn\"},\"id\":\"j\",\"name\":\"lwrduxntpfxxgja\",\"type\":\"yxfwfctq\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"ijpbychcwhlhdz\",\"networkFabricId\":\"rlfcmeyxypx\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5666178434728554722,\"wellKnownCommunities\":[\"Internet\",\"NoAdvertise\",\"GShut\"],\"communityMembers\":[\"vetpdezebvtkg\"]}],\"lastOperation\":{\"details\":\"adfh\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"xuounzzckogcva\",\"tags\":{\"dw\":\"ovnyoftsodi\",\"zqd\":\"lkuamxhojtnqeony\",\"mkztwzlw\":\"v\",\"pfe\":\"llhm\"},\"id\":\"rfuzedud\",\"name\":\"tgdvwatfvjvum\",\"type\":\"mbcflhycluounv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipCommunities().listByResourceGroup("ergv", com.azure.core.util.Context.NONE); + = manager.ipCommunities().listByResourceGroup("uuudrwizznkrar", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xuq", response.iterator().next().location()); - Assertions.assertEquals("sk", response.iterator().next().tags().get("ikuqirhs")); - Assertions.assertEquals(CommunityActionTypes.DENY, + Assertions.assertEquals("xuounzzckogcva", response.iterator().next().location()); + Assertions.assertEquals("ovnyoftsodi", response.iterator().next().tags().get("dw")); + Assertions.assertEquals("ijpbychcwhlhdz", response.iterator().next().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().ipCommunityRules().get(0).action()); - Assertions.assertEquals(6659845447567248443L, + Assertions.assertEquals(5666178434728554722L, response.iterator().next().ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, + Assertions.assertEquals(WellKnownCommunities.INTERNET, response.iterator().next().ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("zfpffbuqxknvmcgm", + Assertions.assertEquals("vetpdezebvtkg", response.iterator().next().ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("umbmwgftshfg", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java index 49aed4146839..fa7b0716b214 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -24,26 +24,27 @@ public final class IpCommunitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5260536428143266927,\"wellKnownCommunities\":[\"GShut\",\"LocalAS\",\"LocalAS\"],\"communityMembers\":[\"jck\",\"ehdmvfoyrxxxff\",\"mcuanszeerv\",\"cgcsapvbcqpf\"]},{\"action\":\"Deny\",\"sequenceNumber\":1940775927740565981,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"inenk\",\"ivp\",\"rkvorlfqmljewyn\"]},{\"action\":\"Deny\",\"sequenceNumber\":8398901790986088094,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"rkm\",\"ufavvlnpbso\",\"m\",\"nklnmrz\"]}],\"annotation\":\"tvrkkfcwxizkstx\"},\"location\":\"ykeipxutcbvr\",\"tags\":{\"xtvsayyaeiivjq\":\"nfa\",\"xqetxtdqius\":\"qtjwrvewojoq\",\"jvg\":\"guz\",\"mjsisfqqhc\":\"ijzqjhljsa\"},\"id\":\"ecagsbfeiirpn\",\"name\":\"ygllfkchhgsjuzzc\",\"type\":\"jlwmqc\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"v\",\"networkFabricId\":\"oazarivczez\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5419507834765947909,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"ddbdhgvjhoezjik\",\"suxrsoxtxuu\"]},{\"action\":\"Deny\",\"sequenceNumber\":6138323203053091943,\"wellKnownCommunities\":[\"LocalAS\",\"LocalAS\"],\"communityMembers\":[\"wvuw\",\"bzcmpbymsgcl\",\"smrgjfy\"]},{\"action\":\"Deny\",\"sequenceNumber\":3312349306270397191,\"wellKnownCommunities\":[\"Internet\",\"GShut\"],\"communityMembers\":[\"hs\",\"qiumktslmeyonc\"]}],\"lastOperation\":{\"details\":\"vmawxrgwt\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"},\"location\":\"ihwwkhiyubykxzcv\",\"tags\":{\"olqqpa\":\"yihpsrjzpvojwjan\",\"kzdnotgyowis\":\"zpzmojupqlus\",\"zbceimsco\":\"fifmitqvypkiqlou\"},\"id\":\"ynaehllwqm\",\"name\":\"aihescjvzlgcliaj\",\"type\":\"wxvihyi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipCommunities().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ykeipxutcbvr", response.iterator().next().location()); - Assertions.assertEquals("nfa", response.iterator().next().tags().get("xtvsayyaeiivjq")); + Assertions.assertEquals("ihwwkhiyubykxzcv", response.iterator().next().location()); + Assertions.assertEquals("yihpsrjzpvojwjan", response.iterator().next().tags().get("olqqpa")); + Assertions.assertEquals("v", response.iterator().next().annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().ipCommunityRules().get(0).action()); - Assertions.assertEquals(5260536428143266927L, + Assertions.assertEquals(5419507834765947909L, response.iterator().next().ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, response.iterator().next().ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jck", response.iterator().next().ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("tvrkkfcwxizkstx", response.iterator().next().annotation()); + Assertions.assertEquals("ddbdhgvjhoezjik", + response.iterator().next().ipCommunityRules().get(0).communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java index 0064e629b8b7..d62937cc0a78 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java @@ -1,97 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunitiesListResult; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitiesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class IpCommunitiesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunitiesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4356169983765004043,\"wellKnownCommunities\":[\"Internet\",\"GShut\",\"LocalAS\"],\"communityMembers\":[\"geleohdbvq\",\"wzkjopwbeonrlkw\"]}],\"annotation\":\"qybxceakxcp\"},\"location\":\"oqfyiaseqch\",\"tags\":{\"uem\":\"tzrazisgyk\",\"klinhmdptysprq\":\"anbwzohmnrxxbso\",\"pli\":\"gnzxojpslsvj\"},\"id\":\"fiqwoy\",\"name\":\"qvapcohhoucq\",\"type\":\"q\"},{\"properties\":{\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8065845285267929372,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"Internet\",\"LocalAS\"],\"communityMembers\":[\"cawetzqddt\",\"wflj\"]},{\"action\":\"Permit\",\"sequenceNumber\":1601336838590319246,\"wellKnownCommunities\":[\"Internet\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"zwcjjncqtj\",\"mizvgbgatzuuvbx\",\"grebwggahttzlsw\"]},{\"action\":\"Permit\",\"sequenceNumber\":8685578675388239679,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"qzasunwqrjzfrgqh\"]},{\"action\":\"Permit\",\"sequenceNumber\":8053513658904619463,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"njrohmbpy\",\"yx\",\"meblyd\",\"vkfkmr\"]}],\"annotation\":\"xne\"},\"location\":\"sm\",\"tags\":{\"ucygvo\":\"lfpya\"},\"id\":\"vyuns\",\"name\":\"xlghieegj\",\"type\":\"gvvpasek\"}],\"nextLink\":\"buxantuyg\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"qumoeno\",\"networkFabricId\":\"aienhqhsknd\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":718676955727293096,\"wellKnownCommunities\":[\"LocalAS\",\"NoAdvertise\",\"GShut\"],\"communityMembers\":[\"wf\"]},{\"action\":\"Deny\",\"sequenceNumber\":1577811503950676558,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\",\"NoAdvertise\"],\"communityMembers\":[\"xivcnrlyxnu\"]},{\"action\":\"Permit\",\"sequenceNumber\":7723827571808099593,\"wellKnownCommunities\":[\"Internet\",\"LocalAS\",\"LocalAS\"],\"communityMembers\":[\"pat\"]}],\"lastOperation\":{\"details\":\"sdtcjbctvivuzqym\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"location\":\"it\",\"tags\":{\"mxeatkdbmwnrdjy\":\"zvbrzcdbanfzndsc\"},\"id\":\"bqbnaomhjrmkuh\",\"name\":\"axljal\",\"type\":\"i\"},{\"properties\":{\"annotation\":\"jmobca\",\"networkFabricId\":\"de\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2348526307879631032,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"gvaknokzwjjzrl\",\"ixldzyyfy\",\"pqsixymmp\"]},{\"action\":\"Deny\",\"sequenceNumber\":7630612268508981016,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"uvsmbms\",\"zoyovwzdbpq\",\"ybe\",\"gvmxnok\"]}],\"lastOperation\":{\"details\":\"lubses\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"hunlpirykycnd\",\"tags\":{\"bmnwa\":\"ivjreuyk\"},\"id\":\"ltbxoeeonqlnfw\",\"name\":\"y\",\"type\":\"mvqdbpbhfckdvez\"}],\"nextLink\":\"cssbzhddu\"}") .toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("oqfyiaseqch", model.value().get(0).location()); - Assertions.assertEquals("tzrazisgyk", model.value().get(0).tags().get("uem")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipCommunityRules().get(0).action()); - Assertions.assertEquals(4356169983765004043L, model.value().get(0).ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals("it", model.value().get(0).location()); + Assertions.assertEquals("zvbrzcdbanfzndsc", model.value().get(0).tags().get("mxeatkdbmwnrdjy")); + Assertions.assertEquals("qumoeno", model.value().get(0).annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).ipCommunityRules().get(0).action()); + Assertions.assertEquals(718676955727293096L, model.value().get(0).ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.value().get(0).ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("geleohdbvq", model.value().get(0).ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qybxceakxcp", model.value().get(0).annotation()); - Assertions.assertEquals("buxantuyg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunitiesListResult model - = new IpCommunitiesListResult().withValue(Arrays.asList( - new IpCommunityInner().withLocation("oqfyiaseqch") - .withTags(mapOf("uem", "tzrazisgyk", "klinhmdptysprq", "anbwzohmnrxxbso", "pli", "gnzxojpslsvj")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4356169983765004043L) - .withWellKnownCommunities(Arrays.asList( - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("geleohdbvq", "wzkjopwbeonrlkw")))) - .withAnnotation("qybxceakxcp"), - new IpCommunityInner().withLocation("sm") - .withTags(mapOf("ucygvo", "lfpya")) - .withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8065845285267929372L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET, - WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("cawetzqddt", "wflj")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1601336838590319246L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("zwcjjncqtj", "mizvgbgatzuuvbx", "grebwggahttzlsw")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8685578675388239679L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("qzasunwqrjzfrgqh")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8053513658904619463L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("njrohmbpy", "yx", "meblyd", "vkfkmr")))) - .withAnnotation("xne"))) - .withNextLink("buxantuyg"); - model = BinaryData.fromObject(model).toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("oqfyiaseqch", model.value().get(0).location()); - Assertions.assertEquals("tzrazisgyk", model.value().get(0).tags().get("uem")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipCommunityRules().get(0).action()); - Assertions.assertEquals(4356169983765004043L, model.value().get(0).ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, - model.value().get(0).ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("geleohdbvq", model.value().get(0).ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qybxceakxcp", model.value().get(0).annotation()); - Assertions.assertEquals("buxantuyg", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("wf", model.value().get(0).ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("cssbzhddu", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java deleted file mode 100644 index 50395313ff7e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityAddOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityAddOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityAddOperationProperties model = BinaryData - .fromString("{\"add\":{\"ipCommunityIds\":[\"gkuirxxeuwiiir\",\"vnfgbdviwxo\",\"ktxagfujdb\"]}}") - .toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("gkuirxxeuwiiir", model.add().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityAddOperationProperties model = new IpCommunityAddOperationProperties().withAdd( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("gkuirxxeuwiiir", "vnfgbdviwxo", "ktxagfujdb"))); - model = BinaryData.fromObject(model).toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("gkuirxxeuwiiir", model.add().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java deleted file mode 100644 index 6962651ce673..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityDeleteOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityDeleteOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityDeleteOperationProperties model - = BinaryData.fromString("{\"delete\":{\"ipCommunityIds\":[\"exbvxgxq\"]}}") - .toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("exbvxgxq", model.delete().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityDeleteOperationProperties model = new IpCommunityDeleteOperationProperties() - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("exbvxgxq"))); - model = BinaryData.fromObject(model).toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("exbvxgxq", model.delete().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java index f9baea7c71d4..d7fb8c8ab727 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,15 +12,17 @@ public final class IpCommunityIdListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpCommunityIdList model = BinaryData.fromString("{\"ipCommunityIds\":[\"ywdal\",\"sdeqngcaydzinlo\"]}") - .toObject(IpCommunityIdList.class); - Assertions.assertEquals("ywdal", model.ipCommunityIds().get(0)); + IpCommunityIdList model + = BinaryData.fromString("{\"ipCommunityIds\":[\"mqonxvnmcyze\",\"uvwa\",\"esswbrnbox\",\"shkmqfvbks\"]}") + .toObject(IpCommunityIdList.class); + Assertions.assertEquals("mqonxvnmcyze", model.ipCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityIdList model = new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ywdal", "sdeqngcaydzinlo")); + IpCommunityIdList model = new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("mqonxvnmcyze", "uvwa", "esswbrnbox", "shkmqfvbks")); model = BinaryData.fromObject(model).toObject(IpCommunityIdList.class); - Assertions.assertEquals("ywdal", model.ipCommunityIds().get(0)); + Assertions.assertEquals("mqonxvnmcyze", model.ipCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java index b4458e250098..89237f12b705 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,57 +18,37 @@ public final class IpCommunityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8541029645599018882,\"wellKnownCommunities\":[\"GShut\",\"GShut\"],\"communityMembers\":[\"ufypiv\"]},{\"action\":\"Permit\",\"sequenceNumber\":4020865096407527323,\"wellKnownCommunities\":[\"LocalAS\",\"NoAdvertise\",\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"mifoxxkub\",\"phavpmhbrb\",\"gvgovpbbttefjo\"]},{\"action\":\"Deny\",\"sequenceNumber\":1806621259574631060,\"wellKnownCommunities\":[\"Internet\",\"NoExport\",\"NoExport\"],\"communityMembers\":[\"ik\",\"frdbiqmrjgeihf\",\"lg\"]},{\"action\":\"Deny\",\"sequenceNumber\":5397474834240245211,\"wellKnownCommunities\":[\"NoAdvertise\",\"Internet\",\"LocalAS\"],\"communityMembers\":[\"pbyephmgtvljvrcm\",\"fqip\",\"xhnpo\"]}],\"annotation\":\"qwcabvnui\"},\"location\":\"ey\",\"tags\":{\"jlrxwtoaukhfk\":\"lpaugmrm\",\"oaedsxjwuivedwcg\":\"cisiz\",\"mguaml\":\"eewxeiqbpsmg\",\"lzgaufcshhvnew\":\"dlrgms\"},\"id\":\"nxkympqanxrjk\",\"name\":\"xtwbta\",\"type\":\"ypnyghshxc\"}") + "{\"properties\":{\"annotation\":\"dndsbdweade\",\"networkFabricId\":\"mwntopagttmvmma\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2211985521883674757,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoExport\",\"Internet\",\"Internet\"],\"communityMembers\":[\"uazjcgmxitpfinz\"]}],\"lastOperation\":{\"details\":\"ltkrl\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"cqguef\",\"tags\":{\"lyujlfyoump\":\"mpheqdur\",\"brzmqxucycijoclx\":\"kyeclcdigpta\",\"zjd\":\"utgjcyz\"},\"id\":\"r\",\"name\":\"jb\",\"type\":\"xjeaoqaqbzgyh\"}") .toObject(IpCommunityInner.class); - Assertions.assertEquals("ey", model.location()); - Assertions.assertEquals("lpaugmrm", model.tags().get("jlrxwtoaukhfk")); + Assertions.assertEquals("cqguef", model.location()); + Assertions.assertEquals("mpheqdur", model.tags().get("lyujlfyoump")); + Assertions.assertEquals("dndsbdweade", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8541029645599018882L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, + Assertions.assertEquals(2211985521883674757L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("ufypiv", model.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qwcabvnui", model.annotation()); + Assertions.assertEquals("uazjcgmxitpfinz", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityInner model - = new IpCommunityInner().withLocation("ey") - .withTags(mapOf("jlrxwtoaukhfk", "lpaugmrm", "oaedsxjwuivedwcg", "cisiz", "mguaml", "eewxeiqbpsmg", - "lzgaufcshhvnew", "dlrgms")) - .withIpCommunityRules( - Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8541029645599018882L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("ufypiv")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4020865096407527323L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_ADVERTISE, - WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("mifoxxkub", "phavpmhbrb", "gvgovpbbttefjo")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1806621259574631060L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_EXPORT, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("ik", "frdbiqmrjgeihf", "lg")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5397474834240245211L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, - WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("pbyephmgtvljvrcm", "fqip", "xhnpo")))) - .withAnnotation("qwcabvnui"); + IpCommunityInner model = new IpCommunityInner().withLocation("cqguef") + .withTags(mapOf("lyujlfyoump", "mpheqdur", "brzmqxucycijoclx", "kyeclcdigpta", "zjd", "utgjcyz")) + .withAnnotation("dndsbdweade") + .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(2211985521883674757L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, + WellKnownCommunities.NO_EXPORT, WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("uazjcgmxitpfinz")))); model = BinaryData.fromObject(model).toObject(IpCommunityInner.class); - Assertions.assertEquals("ey", model.location()); - Assertions.assertEquals("lpaugmrm", model.tags().get("jlrxwtoaukhfk")); + Assertions.assertEquals("cqguef", model.location()); + Assertions.assertEquals("mpheqdur", model.tags().get("lyujlfyoump")); + Assertions.assertEquals("dndsbdweade", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8541029645599018882L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, + Assertions.assertEquals(2211985521883674757L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("ufypiv", model.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qwcabvnui", model.annotation()); + Assertions.assertEquals("uazjcgmxitpfinz", model.ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java index afd4769ce721..912803b4f833 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,32 +18,50 @@ public final class IpCommunityPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityPatch model = BinaryData.fromString( - "{\"properties\":{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8815374333697807058,\"wellKnownCommunities\":[\"NoExport\",\"GShut\",\"LocalAS\",\"Internet\"],\"communityMembers\":[\"wrxaomzisg\",\"rrczezkhhltnj\",\"dhqoawj\"]}]},\"tags\":{\"rrueqthwmg\":\"ueayfbpcmsplb\",\"gdhxi\":\"mbscbbx\",\"opedbwdpyqyybxub\":\"d\"}}") + "{\"properties\":{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5137821243095219898,\"wellKnownCommunities\":[\"LocalAS\",\"NoAdvertise\"],\"communityMembers\":[\"ljpnwynudqll\"]},{\"action\":\"Permit\",\"sequenceNumber\":8052220666513208080,\"wellKnownCommunities\":[\"GShut\",\"NoAdvertise\",\"NoAdvertise\",\"Internet\"],\"communityMembers\":[\"huxiqhzlraymez\",\"lskihmxrfdsajred\",\"wyyshtuwgm\",\"vuafpwzyifr\"]},{\"action\":\"Deny\",\"sequenceNumber\":9085455575056076824,\"wellKnownCommunities\":[\"NoExport\",\"LocalAS\"],\"communityMembers\":[\"pxgzdyimsfayor\",\"r\"]},{\"action\":\"Permit\",\"sequenceNumber\":1531468196728241369,\"wellKnownCommunities\":[\"LocalAS\",\"LocalAS\",\"LocalAS\"],\"communityMembers\":[\"bnsmjkwynqxaek\",\"sykvwjtqpke\"]}]},\"tags\":{\"urcclfgxannn\":\"ltjcrspxk\",\"ewxigpxvk\":\"ytzpo\",\"dfaifyzyzeyuube\":\"maupxvpi\"}}") .toObject(IpCommunityPatch.class); - Assertions.assertEquals("ueayfbpcmsplb", model.tags().get("rrueqthwmg")); + Assertions.assertEquals("ltjcrspxk", model.tags().get("urcclfgxannn")); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8815374333697807058L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, + Assertions.assertEquals(5137821243095219898L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("wrxaomzisg", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("ljpnwynudqll", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpCommunityPatch model = new IpCommunityPatch() - .withTags(mapOf("rrueqthwmg", "ueayfbpcmsplb", "gdhxi", "mbscbbx", "opedbwdpyqyybxub", "d")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8815374333697807058L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_EXPORT, WellKnownCommunities.GSHUT, - WellKnownCommunities.LOCAL_AS, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("wrxaomzisg", "rrczezkhhltnj", "dhqoawj")))); + .withTags(mapOf("urcclfgxannn", "ltjcrspxk", "ewxigpxvk", "ytzpo", "dfaifyzyzeyuube", "maupxvpi")) + .withIpCommunityRules(Arrays.asList( + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(5137821243095219898L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("ljpnwynudqll")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(8052220666513208080L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.NO_ADVERTISE, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.INTERNET)) + .withCommunityMembers( + Arrays.asList("huxiqhzlraymez", "lskihmxrfdsajred", "wyyshtuwgm", "vuafpwzyifr")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(9085455575056076824L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.NO_EXPORT, WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("pxgzdyimsfayor", "r")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(1531468196728241369L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, + WellKnownCommunities.LOCAL_AS, WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("bnsmjkwynqxaek", "sykvwjtqpke")))); model = BinaryData.fromObject(model).toObject(IpCommunityPatch.class); - Assertions.assertEquals("ueayfbpcmsplb", model.tags().get("rrueqthwmg")); + Assertions.assertEquals("ltjcrspxk", model.tags().get("urcclfgxannn")); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8815374333697807058L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, + Assertions.assertEquals(5137821243095219898L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("wrxaomzisg", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("ljpnwynudqll", model.ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java index 37a1427ccd16..adb273353f18 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,33 +16,31 @@ public final class IpCommunityPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityPatchableProperties model = BinaryData.fromString( - "{\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3602928584762894021,\"wellKnownCommunities\":[\"Internet\",\"LocalAS\",\"GShut\"],\"communityMembers\":[\"rldefxrdcox\",\"b\"]},{\"action\":\"Permit\",\"sequenceNumber\":2255670015013104702,\"wellKnownCommunities\":[\"LocalAS\",\"Internet\",\"Internet\"],\"communityMembers\":[\"bnqbpizxqltgrd\",\"gypxrxvbfihwuhvc\",\"a\",\"s\"]}]}") + "{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":271327439098936771,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"thgygvfltgvdi\"]},{\"action\":\"Deny\",\"sequenceNumber\":190205408839754865,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"etwkdrcyrucpc\",\"nn\"]}]}") .toObject(IpCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(3602928584762894021L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(271327439098936771L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rldefxrdcox", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("thgygvfltgvdi", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpCommunityPatchableProperties model = new IpCommunityPatchableProperties().withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3602928584762894021L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("rldefxrdcox", "b")), new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2255670015013104702L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.INTERNET, - WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("bnqbpizxqltgrd", "gypxrxvbfihwuhvc", "a", "s")))); + .withSequenceNumber(271327439098936771L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("thgygvfltgvdi")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(190205408839754865L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("etwkdrcyrucpc", "nn")))); model = BinaryData.fromObject(model).toObject(IpCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(3602928584762894021L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(271327439098936771L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rldefxrdcox", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("thgygvfltgvdi", model.ipCommunityRules().get(0).communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java index 531079b4b4d2..48a2d428b4df 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,41 +16,45 @@ public final class IpCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityProperties model = BinaryData.fromString( - "{\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8431047214936206826,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"GShut\",\"NoExport\"],\"communityMembers\":[\"jjkhvyomaclu\",\"vxnqmhrpqpd\"]},{\"action\":\"Permit\",\"sequenceNumber\":1779225770048104813,\"wellKnownCommunities\":[\"NoAdvertise\",\"LocalAS\",\"NoAdvertise\",\"Internet\"],\"communityMembers\":[\"f\",\"xuifmcsypobkdqz\"]},{\"action\":\"Deny\",\"sequenceNumber\":1055349990243516782,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"lgtrczzy\"]}],\"annotation\":\"xzji\"}") + "{\"annotation\":\"wvua\",\"networkFabricId\":\"wbqamteuliy\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6587094493738850881,\"wellKnownCommunities\":[\"Internet\"],\"communityMembers\":[\"auxxepmyw\"]},{\"action\":\"Permit\",\"sequenceNumber\":6860341300408282511,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoExport\",\"LocalAS\"],\"communityMembers\":[\"ijqpkzfbojxjmcs\"]},{\"action\":\"Deny\",\"sequenceNumber\":2240819145094168645,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"pwnkwywzwo\"]},{\"action\":\"Deny\",\"sequenceNumber\":8736317778676807202,\"wellKnownCommunities\":[\"LocalAS\",\"NoAdvertise\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"tamtyv\",\"kn\",\"rwzawnvs\",\"cfhzagxnvhycv\"]}],\"lastOperation\":{\"details\":\"wrzregzgyufu\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(IpCommunityProperties.class); - Assertions.assertEquals("xzji", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8431047214936206826L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("wvua", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(6587094493738850881L, model.ipCommunityRules().get(0).sequenceNumber()); Assertions.assertEquals(WellKnownCommunities.INTERNET, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jjkhvyomaclu", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("auxxepmyw", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityProperties model = new IpCommunityProperties().withAnnotation("xzji") + IpCommunityProperties model = new IpCommunityProperties().withAnnotation("wvua") .withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8431047214936206826L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("jjkhvyomaclu", "vxnqmhrpqpd")), new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1779225770048104813L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("f", "xuifmcsypobkdqz")), + .withSequenceNumber(6587094493738850881L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("auxxepmyw")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6860341300408282511L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, + WellKnownCommunities.NO_EXPORT, WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("ijqpkzfbojxjmcs")), new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1055349990243516782L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("lgtrczzy")))); + .withSequenceNumber(2240819145094168645L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("pwnkwywzwo")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8736317778676807202L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_ADVERTISE, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("tamtyv", "kn", "rwzawnvs", "cfhzagxnvhycv")))); model = BinaryData.fromObject(model).toObject(IpCommunityProperties.class); - Assertions.assertEquals("xzji", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8431047214936206826L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("wvua", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(6587094493738850881L, model.ipCommunityRules().get(0).sequenceNumber()); Assertions.assertEquals(WellKnownCommunities.INTERNET, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jjkhvyomaclu", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("auxxepmyw", model.ipCommunityRules().get(0).communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java index d44e8922e209..1df411427d1f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,25 +15,25 @@ public final class IpCommunityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityRule model = BinaryData.fromString( - "{\"action\":\"Deny\",\"sequenceNumber\":4981708752507309083,\"wellKnownCommunities\":[\"GShut\",\"LocalAS\",\"Internet\",\"GShut\"],\"communityMembers\":[\"xihspnxwq\",\"gnepz\"]}") + "{\"action\":\"Permit\",\"sequenceNumber\":5680566642026176857,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoExport\",\"Internet\",\"NoExport\"],\"communityMembers\":[\"tta\",\"jyosxwwh\"]}") .toObject(IpCommunityRule.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(4981708752507309083L, model.sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("xihspnxwq", model.communityMembers().get(0)); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); + Assertions.assertEquals(5680566642026176857L, model.sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.wellKnownCommunities().get(0)); + Assertions.assertEquals("tta", model.communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityRule model = new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(4981708752507309083L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("xihspnxwq", "gnepz")); + IpCommunityRule model = new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(5680566642026176857L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT, + WellKnownCommunities.INTERNET, WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("tta", "jyosxwwh")); model = BinaryData.fromObject(model).toObject(IpCommunityRule.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(4981708752507309083L, model.sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("xihspnxwq", model.communityMembers().get(0)); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); + Assertions.assertEquals(5680566642026176857L, model.sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.wellKnownCommunities().get(0)); + Assertions.assertEquals("tta", model.communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java deleted file mode 100644 index 8577855d7613..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitySetOperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunitySetOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunitySetOperationProperties model - = BinaryData.fromString("{\"set\":{\"ipCommunityIds\":[\"feoo\",\"ftpvevtarp\",\"klqlii\"]}}") - .toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("feoo", model.set().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunitySetOperationProperties model = new IpCommunitySetOperationProperties() - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("feoo", "ftpvevtarp", "klqlii"))); - model = BinaryData.fromObject(model).toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("feoo", model.set().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java index 61eaa614d365..4fac905e4b78 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -26,39 +26,37 @@ public final class IpExtendedCommunitiesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1711996139104785096,\"routeTargets\":[\"nguhbnhogsezre\",\"eggpdtyzpxlit\",\"kejmgemudupehsk\"]},{\"action\":\"Deny\",\"sequenceNumber\":3023047299258548814,\"routeTargets\":[\"hrype\"]},{\"action\":\"Deny\",\"sequenceNumber\":5734677290528862693,\"routeTargets\":[\"kapvnpeukgn\",\"fakeqnitro\",\"lcsvktfpsrows\",\"vfxjtxlawmv\"]}],\"annotation\":\"qabjropxfqdmllz\"},\"location\":\"jyuwq\",\"tags\":{\"trhqdoxdeg\":\"gdpvhwirilam\"},\"id\":\"cdedpkwdtobpgdci\",\"name\":\"pdaqermn\",\"type\":\"dlirqqclsaqifep\"}"; + = "{\"properties\":{\"annotation\":\"oxp\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":3443499046415993170,\"routeTargets\":[\"ubfpeomegynhea\"]},{\"action\":\"Permit\",\"sequenceNumber\":4495177292155168611,\"routeTargets\":[\"aj\",\"tsvc\",\"sythuioixpfgqlw\"]},{\"action\":\"Deny\",\"sequenceNumber\":6109141026772143106,\"routeTargets\":[\"vqcjrmnverbfveh\"]},{\"action\":\"Permit\",\"sequenceNumber\":1288471003175952324,\"routeTargets\":[\"tqeyonmoigawl\",\"jw\",\"rovjvjjuypcn\"]}],\"networkFabricId\":\"cbejmujzmfpspa\",\"lastOperation\":{\"details\":\"uwygssssjcpfep\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"vdcciyzrdj\",\"tags\":{\"kyx\":\"wk\",\"eynxkxqnwcekqsb\":\"ksdelrwqmffvbht\"},\"id\":\"cad\",\"name\":\"apzebje\",\"type\":\"wwgverbywuuvei\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpExtendedCommunity response = manager.ipExtendedCommunities() - .define("lislxyljzbkd") - .withRegion("i") - .withExistingResourceGroup("tkajqhsnsej") + .define("ceuvynhmbz") + .withRegion("mcwmqpcwoe") + .withExistingResourceGroup("lkffgyfehjs") .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1053364534586372657L) - .withRouteTargets(Arrays.asList("tvrpeawzzkv", "ccozvqxsphtra", "trmsukxt", "ytgcpt")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1590788620746051426L) - .withRouteTargets(Arrays.asList("egyckmemfvrc", "lcl")), new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6350842390036956791L) - .withRouteTargets(Arrays.asList("j")))) - .withTags(mapOf("ebvsewfzvvpay", "lx", "dcyandblkb", "qwh", "qctfvxu", "tcvpvdfmo")) - .withAnnotation("mwrv") + .withSequenceNumber(4739396259293915029L) + .withRouteTargets(Arrays.asList("tbiycepjklly", "dsormbvir", "xeyumwlbpyidecff", "hizwqz")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(733560282865317061L) + .withRouteTargets(Arrays.asList("ypioszczswhdglxp", "ewtlfsw")))) + .withTags( + mapOf("efwdxbpvbs", "fruc", "qmfwiesh", "bzmvdeyoexpothtp", "kymqmgudvy", "iel", "lcwdg", "ecuve")) + .withAnnotation("fxfyzqrsu") .create(); - Assertions.assertEquals("jyuwq", response.location()); - Assertions.assertEquals("gdpvhwirilam", response.tags().get("trhqdoxdeg")); + Assertions.assertEquals("vdcciyzrdj", response.location()); + Assertions.assertEquals("wk", response.tags().get("kyx")); + Assertions.assertEquals("oxp", response.annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1711996139104785096L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("nguhbnhogsezre", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("qabjropxfqdmllz", response.annotation()); + Assertions.assertEquals(3443499046415993170L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("ubfpeomegynhea", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java index cc016ad2280f..674a7a795604 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -22,24 +22,24 @@ public final class IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3845588111981176241,\"routeTargets\":[\"oxovlz\",\"kleldkqdlqqhnt\",\"rykkxakruuptiicg\",\"pz\"]},{\"action\":\"Deny\",\"sequenceNumber\":5786331397833650098,\"routeTargets\":[\"n\",\"xiemacmztje\"]},{\"action\":\"Deny\",\"sequenceNumber\":7768651645848572236,\"routeTargets\":[\"brysgktfmocnqbb\",\"rtb\",\"fzghfuifwxudyn\",\"hocqxugjx\"]},{\"action\":\"Deny\",\"sequenceNumber\":649725561434329546,\"routeTargets\":[\"rfbplvhmhu\",\"osdjlz\",\"dmddghqeuyaorse\",\"vp\"]}],\"annotation\":\"sorsbegcl\"},\"location\":\"x\",\"tags\":{\"lunssky\":\"qzyhzydyvtuqvi\",\"hxzjdcwuzs\":\"igtvjxsocsvjekej\",\"aojeeyvfxb\":\"yfyixecmasjnfgng\"},\"id\":\"ckmoaljaxvwxt\",\"name\":\"uzhvojyffwflbk\",\"type\":\"cdzuiygtcyzc\"}"; + = "{\"properties\":{\"annotation\":\"qvmhtyafcvtosovx\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4224371589389175964,\"routeTargets\":[\"kzxqrzsngltlbsnl\"]},{\"action\":\"Permit\",\"sequenceNumber\":8907596840082490110,\"routeTargets\":[\"rhkwh\"]},{\"action\":\"Deny\",\"sequenceNumber\":9216875268958994846,\"routeTargets\":[\"uujymyjvkoyjgto\"]},{\"action\":\"Permit\",\"sequenceNumber\":4011761695532173551,\"routeTargets\":[\"chl\"]}],\"networkFabricId\":\"ngmw\",\"lastOperation\":{\"details\":\"vqmkjsv\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"location\":\"noq\",\"tags\":{\"cntqoszrwkkxdnxu\":\"e\",\"nxrbyvbdvgzt\":\"ygdoitdf\",\"b\":\"tzsge\"},\"id\":\"qxffejcng\",\"name\":\"cdykkpnfvzbvtxgs\",\"type\":\"usqjjc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpExtendedCommunity response = manager.ipExtendedCommunities() - .getByResourceGroupWithResponse("sbnuc", "xh", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nrvgitzdjixk", "pladohnizvvekpq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("x", response.location()); - Assertions.assertEquals("qzyhzydyvtuqvi", response.tags().get("lunssky")); + Assertions.assertEquals("noq", response.location()); + Assertions.assertEquals("e", response.tags().get("cntqoszrwkkxdnxu")); + Assertions.assertEquals("qvmhtyafcvtosovx", response.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, response.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3845588111981176241L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("oxovlz", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("sorsbegcl", response.annotation()); + Assertions.assertEquals(4224371589389175964L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("kzxqrzsngltlbsnl", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java index f002466ad39c..e0d538393279 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -23,26 +23,26 @@ public final class IpExtendedCommunitiesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8880320550954967024,\"routeTargets\":[\"aujbfomfbozpj\",\"xefppq\",\"wdnnjjthpsnxebyc\"]},{\"action\":\"Deny\",\"sequenceNumber\":7875316579641726370,\"routeTargets\":[\"xubnn\"]},{\"action\":\"Deny\",\"sequenceNumber\":7308374102330148260,\"routeTargets\":[\"cxnouspdyzssjl\",\"ykdygjvgs\",\"jlf\",\"h\"]},{\"action\":\"Deny\",\"sequenceNumber\":1052579675599113124,\"routeTargets\":[\"xcrbcrgyoimm\",\"szzcctvk\"]}],\"annotation\":\"nhtvagw\"},\"location\":\"wcnvpnyldjdkjvdr\",\"tags\":{\"nrjlqdoqejexf\":\"kxiox\",\"drklpdyehjrwc\":\"lhuhdkubgyw\",\"yw\":\"lvxboc\"},\"id\":\"fvuhzmolhveolngs\",\"name\":\"mhwdxqupyml\",\"type\":\"klmnjqzmqynhitr\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"uvaejyaf\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":68814974622341063,\"routeTargets\":[\"xvdn\"]},{\"action\":\"Permit\",\"sequenceNumber\":6913517984931682319,\"routeTargets\":[\"tulwgpdzlf\",\"bi\"]}],\"networkFabricId\":\"gmxynwaofnoiphwa\",\"lastOperation\":{\"details\":\"ugxjtuhidjws\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"location\":\"jwadvfqrvtymn\",\"tags\":{\"t\":\"dmjdp\",\"rqbfimageiqjne\":\"pjrbnzbe\",\"rpjmevszbjnqktok\":\"rhxsktu\",\"b\":\"jckm\"},\"id\":\"xxdxnhinn\",\"name\":\"akqwtozxltjsf\",\"type\":\"x\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipExtendedCommunities().listByResourceGroup("efpubaldjcgldryv", com.azure.core.util.Context.NONE); + = manager.ipExtendedCommunities().listByResourceGroup("ggjimlcbmhsfg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wcnvpnyldjdkjvdr", response.iterator().next().location()); - Assertions.assertEquals("kxiox", response.iterator().next().tags().get("nrjlqdoqejexf")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, + Assertions.assertEquals("jwadvfqrvtymn", response.iterator().next().location()); + Assertions.assertEquals("dmjdp", response.iterator().next().tags().get("t")); + Assertions.assertEquals("uvaejyaf", response.iterator().next().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8880320550954967024L, + Assertions.assertEquals(68814974622341063L, response.iterator().next().ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("aujbfomfbozpj", + Assertions.assertEquals("xvdn", response.iterator().next().ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("nhtvagw", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java index 704c41e00352..ee2ffbd0eaad 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -23,26 +23,26 @@ public final class IpExtendedCommunitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6239357357687311670,\"routeTargets\":[\"iqnrjocogwfvkywz\",\"qeiaddp\"]},{\"action\":\"Deny\",\"sequenceNumber\":6395873061735067904,\"routeTargets\":[\"lmdcnutiexmizu\",\"zbqvioyn\",\"tfqhhvvwzprjaaai\"]}],\"annotation\":\"btvavlya\"},\"location\":\"locnwmefzvzuzq\",\"tags\":{\"enfsfyqncowm\":\"korvbzgy\"},\"id\":\"nozf\",\"name\":\"ywjiaaosla\",\"type\":\"agwaakktbjort\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"xwzznocrbtazop\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1089591809136719227,\"routeTargets\":[\"hmaknppucfvxq\",\"mxc\"]},{\"action\":\"Permit\",\"sequenceNumber\":6772469334226183531,\"routeTargets\":[\"nvdumi\"]}],\"networkFabricId\":\"xmrntphy\",\"lastOperation\":{\"details\":\"ddt\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"location\":\"jabzs\",\"tags\":{\"wwvb\":\"zaxmkuthooaicmsz\"},\"id\":\"vibivh\",\"name\":\"ryppmmtqxqiqae\",\"type\":\"ugqfcorajdb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("locnwmefzvzuzq", response.iterator().next().location()); - Assertions.assertEquals("korvbzgy", response.iterator().next().tags().get("enfsfyqncowm")); - Assertions.assertEquals(CommunityActionTypes.DENY, + Assertions.assertEquals("jabzs", response.iterator().next().location()); + Assertions.assertEquals("zaxmkuthooaicmsz", response.iterator().next().tags().get("wwvb")); + Assertions.assertEquals("xwzznocrbtazop", response.iterator().next().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(6239357357687311670L, + Assertions.assertEquals(1089591809136719227L, response.iterator().next().ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iqnrjocogwfvkywz", + Assertions.assertEquals("hmaknppucfvxq", response.iterator().next().ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("btvavlya", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java deleted file mode 100644 index d7d8d0827170..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityAddOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityAddOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityAddOperationProperties model - = BinaryData.fromString("{\"add\":{\"ipExtendedCommunityIds\":[\"vaedogzou\",\"xbxxgjogcphivfhr\"]}}") - .toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("vaedogzou", model.add().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityAddOperationProperties model = new IpExtendedCommunityAddOperationProperties().withAdd( - new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("vaedogzou", "xbxxgjogcphivfhr"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("vaedogzou", model.add().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java deleted file mode 100644 index acab63a08078..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityDeleteOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityDeleteOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityDeleteOperationProperties model - = BinaryData.fromString("{\"delete\":{\"ipExtendedCommunityIds\":[\"fdvdoeary\"]}}") - .toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("fdvdoeary", model.delete().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityDeleteOperationProperties model = new IpExtendedCommunityDeleteOperationProperties() - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("fdvdoeary"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("fdvdoeary", model.delete().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java index 725710c0accc..971e1ffc1941 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,17 +12,16 @@ public final class IpExtendedCommunityIdListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpExtendedCommunityIdList model = BinaryData - .fromString("{\"ipExtendedCommunityIds\":[\"p\",\"zmdahyclxrs\",\"doebldpoiaffj\",\"rtnhrevimxmax\"]}") + IpExtendedCommunityIdList model = BinaryData.fromString("{\"ipExtendedCommunityIds\":[\"vfvhrqxrqgh\"]}") .toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("p", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("vfvhrqxrqgh", model.ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityIdList model = new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("p", "zmdahyclxrs", "doebldpoiaffj", "rtnhrevimxmax")); + IpExtendedCommunityIdList model + = new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("vfvhrqxrqgh")); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("p", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("vfvhrqxrqgh", model.ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java index 51b72228490a..d0ff846326a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -17,41 +17,38 @@ public final class IpExtendedCommunityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8508263172627219350,\"routeTargets\":[\"rqofulopmjnlexwh\"]},{\"action\":\"Permit\",\"sequenceNumber\":3625150454036060730,\"routeTargets\":[\"bke\",\"hu\"]},{\"action\":\"Permit\",\"sequenceNumber\":2124934229054015076,\"routeTargets\":[\"t\",\"toyint\",\"pbrlcyrduczkgofx\",\"fsrucv\"]},{\"action\":\"Permit\",\"sequenceNumber\":8080220027377198790,\"routeTargets\":[\"jttbstv\",\"eaqnrmvvfkoxm\",\"ghktuidvrm\",\"zlpdwwex\"]}],\"annotation\":\"zvlazipbhpwvqsgn\"},\"location\":\"uuzivensrpmeyyvp\",\"tags\":{\"ksrf\":\"tlbijpzg\"},\"id\":\"fvolmknbnxwcd\",\"name\":\"mmpvf\",\"type\":\"awz\"}") + "{\"properties\":{\"annotation\":\"nqfblhkalehpava\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4669399214654556212,\"routeTargets\":[\"tiogqgdmini\"]},{\"action\":\"Deny\",\"sequenceNumber\":486844500805381299,\"routeTargets\":[\"johiyg\"]},{\"action\":\"Deny\",\"sequenceNumber\":1077297875489107910,\"routeTargets\":[\"n\",\"pczykmktpvwxqc\"]}],\"networkFabricId\":\"hchkhufm\",\"lastOperation\":{\"details\":\"mqyjgy\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"euzanhs\",\"tags\":{\"gqjclidftujwj\":\"senwphpzf\"},\"id\":\"ufwbeqrku\",\"name\":\"rhtssr\",\"type\":\"qnmdvhazcvjy\"}") .toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("uuzivensrpmeyyvp", model.location()); - Assertions.assertEquals("tlbijpzg", model.tags().get("ksrf")); + Assertions.assertEquals("euzanhs", model.location()); + Assertions.assertEquals("senwphpzf", model.tags().get("gqjclidftujwj")); + Assertions.assertEquals("nqfblhkalehpava", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8508263172627219350L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("rqofulopmjnlexwh", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("zvlazipbhpwvqsgn", model.annotation()); + Assertions.assertEquals(4669399214654556212L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("tiogqgdmini", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityInner model = new IpExtendedCommunityInner().withLocation("uuzivensrpmeyyvp") - .withTags(mapOf("ksrf", "tlbijpzg")) + IpExtendedCommunityInner model = new IpExtendedCommunityInner().withLocation("euzanhs") + .withTags(mapOf("gqjclidftujwj", "senwphpzf")) + .withAnnotation("nqfblhkalehpava") .withIpExtendedCommunityRules(Arrays.asList( new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8508263172627219350L) - .withRouteTargets(Arrays.asList("rqofulopmjnlexwh")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3625150454036060730L) - .withRouteTargets(Arrays.asList("bke", "hu")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2124934229054015076L) - .withRouteTargets(Arrays.asList("t", "toyint", "pbrlcyrduczkgofx", "fsrucv")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8080220027377198790L) - .withRouteTargets(Arrays.asList("jttbstv", "eaqnrmvvfkoxm", "ghktuidvrm", "zlpdwwex")))) - .withAnnotation("zvlazipbhpwvqsgn"); + .withSequenceNumber(4669399214654556212L) + .withRouteTargets(Arrays.asList("tiogqgdmini")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(486844500805381299L) + .withRouteTargets(Arrays.asList("johiyg")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(1077297875489107910L) + .withRouteTargets(Arrays.asList("n", "pczykmktpvwxqc")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("uuzivensrpmeyyvp", model.location()); - Assertions.assertEquals("tlbijpzg", model.tags().get("ksrf")); + Assertions.assertEquals("euzanhs", model.location()); + Assertions.assertEquals("senwphpzf", model.tags().get("gqjclidftujwj")); + Assertions.assertEquals("nqfblhkalehpava", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8508263172627219350L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("rqofulopmjnlexwh", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("zvlazipbhpwvqsgn", model.annotation()); + Assertions.assertEquals(4669399214654556212L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("tiogqgdmini", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java index d23680cf3d1c..b3be736cde61 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java @@ -1,103 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityListResult; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class IpExtendedCommunityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":1372777057626285328,\"routeTargets\":[\"upeuknijduyye\",\"pydjfboc\",\"v\"]},{\"action\":\"Deny\",\"sequenceNumber\":2704241280285106932,\"routeTargets\":[\"tywikd\",\"hl\"]},{\"action\":\"Permit\",\"sequenceNumber\":7479528386540707541,\"routeTargets\":[\"gbhgau\",\"cdixmx\",\"f\"]},{\"action\":\"Deny\",\"sequenceNumber\":8950923037770050787,\"routeTargets\":[\"qg\",\"kfnozoeoqbvj\",\"vefgwbmqjchntas\"]}],\"annotation\":\"ymxbulpzealb\"},\"location\":\"kyojwyvfk\",\"tags\":{\"sgxjc\":\"suah\"},\"id\":\"mzrrscubiwsdrn\",\"name\":\"xqw\",\"type\":\"diffjxcjrmmuab\"},{\"properties\":{\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2828569188008254931,\"routeTargets\":[\"yefoyzbamwineo\",\"vfkakpold\",\"vevboclzh\",\"jknyu\"]},{\"action\":\"Permit\",\"sequenceNumber\":1613523004175535231,\"routeTargets\":[\"xpn\",\"upzaamrdixtre\",\"ids\"]}],\"annotation\":\"skbruffgllukkut\"},\"location\":\"xhrp\",\"tags\":{\"iryr\":\"mblcouqehbhbcds\",\"pmbltoormkfql\":\"ndo\",\"nbmjksibjgsjjxxa\":\"xldykalsygaolnjp\"},\"id\":\"mr\",\"name\":\"ad\",\"type\":\"yqegx\"},{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8159905812934622437,\"routeTargets\":[\"ijkgqxnhm\",\"keznjaujvaa\",\"nggiycwkdtaa\",\"xw\"]},{\"action\":\"Permit\",\"sequenceNumber\":1273993162017075597,\"routeTargets\":[\"mrrqmbzmqkratb\",\"xwbjs\",\"dbirkfpksokdgo\"]},{\"action\":\"Deny\",\"sequenceNumber\":6649960660552995565,\"routeTargets\":[\"ym\",\"hbguzo\"]}],\"annotation\":\"yewnfnzhhhqos\"},\"location\":\"fjkutycyarnroo\",\"tags\":{\"ocnhzqrottjzcfyj\":\"abzoghktdpyczhco\",\"rl\":\"pt\",\"pqinf\":\"h\"},\"id\":\"zpyglqdhmrj\",\"name\":\"ralcxpjbyypsj\",\"type\":\"qcjenkyhf\"}],\"nextLink\":\"vsqxfxjelgcmpzqj\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"yixhafratqxmb\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5949496467486823709,\"routeTargets\":[\"znv\",\"l\"]},{\"action\":\"Permit\",\"sequenceNumber\":5729494135721513095,\"routeTargets\":[\"zgfxonjtpusl\",\"ywpvt\",\"otz\",\"pdbollg\"]},{\"action\":\"Deny\",\"sequenceNumber\":4546081220504848207,\"routeTargets\":[\"uasigr\"]}],\"networkFabricId\":\"socnequygdjboq\",\"lastOperation\":{\"details\":\"tqjkqevad\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"vcmjzkxiidisczsk\",\"tags\":{\"krrcoiisbamnpp\":\"oqiqazugamx\",\"dsbezaxyfu\":\"cekuz\",\"iarxqiubxdukec\":\"zxuizhyhnepkpe\",\"hctmmkosz\":\"xdazv\"},\"id\":\"dblnsntrp\",\"name\":\"aqkiofkb\",\"type\":\"fmhklbnld\"},{\"properties\":{\"annotation\":\"cbhhez\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5160665524020906164,\"routeTargets\":[\"qxutrpbrruyuua\",\"vlm\"]},{\"action\":\"Permit\",\"sequenceNumber\":9171918442354377344,\"routeTargets\":[\"lbmxlbnwtpcpah\"]}],\"networkFabricId\":\"z\",\"lastOperation\":{\"details\":\"hmtfho\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"ngxno\",\"tags\":{\"dwhepfwwtjfdoes\":\"tdisnjevhdlmyd\",\"dbckyo\":\"xhmw\",\"jzrbhtmeplv\":\"kxkxhnegk\"},\"id\":\"kaobrl\",\"name\":\"pgsn\",\"type\":\"agnchjhgemuowaky\"}],\"nextLink\":\"lhjym\"}") .toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("kyojwyvfk", model.value().get(0).location()); - Assertions.assertEquals("suah", model.value().get(0).tags().get("sgxjc")); - Assertions.assertEquals(CommunityActionTypes.DENY, + Assertions.assertEquals("vcmjzkxiidisczsk", model.value().get(0).location()); + Assertions.assertEquals("oqiqazugamx", model.value().get(0).tags().get("krrcoiisbamnpp")); + Assertions.assertEquals("yixhafratqxmb", model.value().get(0).annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1372777057626285328L, + Assertions.assertEquals(5949496467486823709L, model.value().get(0).ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("upeuknijduyye", - model.value().get(0).ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("ymxbulpzealb", model.value().get(0).annotation()); - Assertions.assertEquals("vsqxfxjelgcmpzqj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityListResult model = new IpExtendedCommunityListResult().withValue(Arrays.asList( - new IpExtendedCommunityInner().withLocation("kyojwyvfk") - .withTags(mapOf("sgxjc", "suah")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1372777057626285328L) - .withRouteTargets(Arrays.asList("upeuknijduyye", "pydjfboc", "v")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2704241280285106932L) - .withRouteTargets(Arrays.asList("tywikd", "hl")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(7479528386540707541L) - .withRouteTargets(Arrays.asList("gbhgau", "cdixmx", "f")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8950923037770050787L) - .withRouteTargets(Arrays.asList("qg", "kfnozoeoqbvj", "vefgwbmqjchntas")))) - .withAnnotation("ymxbulpzealb"), - new IpExtendedCommunityInner().withLocation("xhrp") - .withTags( - mapOf("iryr", "mblcouqehbhbcds", "pmbltoormkfql", "ndo", "nbmjksibjgsjjxxa", "xldykalsygaolnjp")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2828569188008254931L) - .withRouteTargets(Arrays.asList("yefoyzbamwineo", "vfkakpold", "vevboclzh", "jknyu")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1613523004175535231L) - .withRouteTargets(Arrays.asList("xpn", "upzaamrdixtre", "ids")))) - .withAnnotation("skbruffgllukkut"), - new IpExtendedCommunityInner().withLocation("fjkutycyarnroo") - .withTags(mapOf("ocnhzqrottjzcfyj", "abzoghktdpyczhco", "rl", "pt", "pqinf", "h")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8159905812934622437L) - .withRouteTargets(Arrays.asList("ijkgqxnhm", "keznjaujvaa", "nggiycwkdtaa", "xw")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1273993162017075597L) - .withRouteTargets(Arrays.asList("mrrqmbzmqkratb", "xwbjs", "dbirkfpksokdgo")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6649960660552995565L) - .withRouteTargets(Arrays.asList("ym", "hbguzo")))) - .withAnnotation("yewnfnzhhhqos"))) - .withNextLink("vsqxfxjelgcmpzqj"); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("kyojwyvfk", model.value().get(0).location()); - Assertions.assertEquals("suah", model.value().get(0).tags().get("sgxjc")); - Assertions.assertEquals(CommunityActionTypes.DENY, - model.value().get(0).ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1372777057626285328L, - model.value().get(0).ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("upeuknijduyye", - model.value().get(0).ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("ymxbulpzealb", model.value().get(0).annotation()); - Assertions.assertEquals("vsqxfxjelgcmpzqj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("znv", model.value().get(0).ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("lhjym", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java index 013f56d5e4c5..377f6bdecef6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,27 +15,28 @@ public final class IpExtendedCommunityPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityPatchProperties model = BinaryData.fromString( - "{\"annotation\":\"weftkwq\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4430853762890090237,\"routeTargets\":[\"s\"]}]}") + "{\"annotation\":\"hcvjdrqc\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":672608780884958099,\"routeTargets\":[\"ukvhd\"]},{\"action\":\"Deny\",\"sequenceNumber\":7983886572640006916,\"routeTargets\":[\"jbfqzdk\"]}]}") .toObject(IpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("hcvjdrqc", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(4430853762890090237L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("s", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("weftkwq", model.annotation()); + Assertions.assertEquals(672608780884958099L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("ukvhd", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityPatchProperties model - = new IpExtendedCommunityPatchProperties() - .withIpExtendedCommunityRules( - Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(4430853762890090237L) - .withRouteTargets(Arrays.asList("s")))) - .withAnnotation("weftkwq"); + IpExtendedCommunityPatchProperties model = new IpExtendedCommunityPatchProperties().withAnnotation("hcvjdrqc") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(672608780884958099L) + .withRouteTargets(Arrays.asList("ukvhd")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(7983886572640006916L) + .withRouteTargets(Arrays.asList("jbfqzdk")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("hcvjdrqc", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(4430853762890090237L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("s", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("weftkwq", model.annotation()); + Assertions.assertEquals(672608780884958099L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("ukvhd", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java index 7b121efe6bfc..f9cdc4fa9eb5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -17,36 +17,31 @@ public final class IpExtendedCommunityPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityPatch model = BinaryData.fromString( - "{\"properties\":{\"annotation\":\"vnynkb\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3587482268659031002,\"routeTargets\":[\"hpsprkzyaupiac\",\"xnafbw\",\"ro\",\"htuov\"]},{\"action\":\"Deny\",\"sequenceNumber\":6160359867810551901,\"routeTargets\":[\"rjtumghih\",\"ve\",\"mslclblyjxlt\"]},{\"action\":\"Deny\",\"sequenceNumber\":8653084665379016179,\"routeTargets\":[\"c\",\"sfxigctmgx\",\"upbezqccydrt\"]}]},\"tags\":{\"eq\":\"kdqkkyihzt\",\"ecfehuwa\":\"gqzgwldoychill\",\"uhicqllizstacsjv\":\"a\"}}") + "{\"properties\":{\"annotation\":\"zmxieqvdsmaklix\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":330622041052177048,\"routeTargets\":[\"alybxawoijpo\",\"tblxpkkwjdjodqhy\",\"incnr\",\"mehllizhceu\"]}]},\"tags\":{\"adywrxwhydt\":\"odkadppyibngq\",\"emlowuowhl\":\"uvvadswzsnu\",\"mouvbl\":\"lnwy\",\"zkltrfowtdvrfmv\":\"mo\"}}") .toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("kdqkkyihzt", model.tags().get("eq")); - Assertions.assertEquals("vnynkb", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3587482268659031002L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("hpsprkzyaupiac", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("odkadppyibngq", model.tags().get("adywrxwhydt")); + Assertions.assertEquals("zmxieqvdsmaklix", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(330622041052177048L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("alybxawoijpo", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpExtendedCommunityPatch model = new IpExtendedCommunityPatch() - .withTags(mapOf("eq", "kdqkkyihzt", "ecfehuwa", "gqzgwldoychill", "uhicqllizstacsjv", "a")) - .withAnnotation("vnynkb") - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3587482268659031002L) - .withRouteTargets(Arrays.asList("hpsprkzyaupiac", "xnafbw", "ro", "htuov")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6160359867810551901L) - .withRouteTargets(Arrays.asList("rjtumghih", "ve", "mslclblyjxlt")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8653084665379016179L) - .withRouteTargets(Arrays.asList("c", "sfxigctmgx", "upbezqccydrt")))); + .withTags(mapOf("adywrxwhydt", "odkadppyibngq", "emlowuowhl", "uvvadswzsnu", "mouvbl", "lnwy", + "zkltrfowtdvrfmv", "mo")) + .withAnnotation("zmxieqvdsmaklix") + .withIpExtendedCommunityRules( + Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(330622041052177048L) + .withRouteTargets(Arrays.asList("alybxawoijpo", "tblxpkkwjdjodqhy", "incnr", "mehllizhceu")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("kdqkkyihzt", model.tags().get("eq")); - Assertions.assertEquals("vnynkb", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3587482268659031002L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("hpsprkzyaupiac", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("odkadppyibngq", model.tags().get("adywrxwhydt")); + Assertions.assertEquals("zmxieqvdsmaklix", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(330622041052177048L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("alybxawoijpo", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.java deleted file mode 100644 index 9bde4d3dc7cf..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityPatchableProperties model = BinaryData.fromString( - "{\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3069608234026742101,\"routeTargets\":[\"k\",\"ctwwgzw\",\"jlmec\"]},{\"action\":\"Permit\",\"sequenceNumber\":6971905808635311445,\"routeTargets\":[\"zyvneezaifghtmo\",\"qtlffhzbk\"]}]}") - .toObject(IpExtendedCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3069608234026742101L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("k", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityPatchableProperties model - = new IpExtendedCommunityPatchableProperties().withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3069608234026742101L) - .withRouteTargets(Arrays.asList("k", "ctwwgzw", "jlmec")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6971905808635311445L) - .withRouteTargets(Arrays.asList("zyvneezaifghtmo", "qtlffhzbk")))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3069608234026742101L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("k", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java index afbaef87ccbd..b07d9823ffe8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,25 +15,28 @@ public final class IpExtendedCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityProperties model = BinaryData.fromString( - "{\"configurationState\":\"Rejected\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2275725598738013501,\"routeTargets\":[\"iexhajl\",\"n\",\"hiqfyuttdiy\",\"b\"]}],\"annotation\":\"n\"}") + "{\"annotation\":\"qswbqerzwx\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":48829511246703614,\"routeTargets\":[\"gukvlbpkt\",\"dstyouam\",\"ewres\",\"moweg\"]},{\"action\":\"Permit\",\"sequenceNumber\":1168634176596881637,\"routeTargets\":[\"yxey\",\"uqi\",\"ijiitns\"]}],\"networkFabricId\":\"lz\",\"lastOperation\":{\"details\":\"ygr\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"}") .toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("n", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(2275725598738013501L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iexhajl", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("qswbqerzwx", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(48829511246703614L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("gukvlbpkt", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityProperties model = new IpExtendedCommunityProperties().withAnnotation("n") - .withIpExtendedCommunityRules( - Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2275725598738013501L) - .withRouteTargets(Arrays.asList("iexhajl", "n", "hiqfyuttdiy", "b")))); + IpExtendedCommunityProperties model = new IpExtendedCommunityProperties().withAnnotation("qswbqerzwx") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(48829511246703614L) + .withRouteTargets(Arrays.asList("gukvlbpkt", "dstyouam", "ewres", "moweg")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(1168634176596881637L) + .withRouteTargets(Arrays.asList("yxey", "uqi", "ijiitns")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("n", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(2275725598738013501L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iexhajl", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("qswbqerzwx", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(48829511246703614L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("gukvlbpkt", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java index d56975ba98be..f1c92c537caf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,21 +14,21 @@ public final class IpExtendedCommunityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityRule model = BinaryData.fromString( - "{\"action\":\"Permit\",\"sequenceNumber\":4121428237576255143,\"routeTargets\":[\"avfqnvhnqoewdogi\",\"etesypvidbztjhqt\"]}") + "{\"action\":\"Permit\",\"sequenceNumber\":606765941095041442,\"routeTargets\":[\"ybfueqfrojsydgr\",\"ydkygywezskieca\"]}") .toObject(IpExtendedCommunityRule.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(4121428237576255143L, model.sequenceNumber()); - Assertions.assertEquals("avfqnvhnqoewdogi", model.routeTargets().get(0)); + Assertions.assertEquals(606765941095041442L, model.sequenceNumber()); + Assertions.assertEquals("ybfueqfrojsydgr", model.routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpExtendedCommunityRule model = new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4121428237576255143L) - .withRouteTargets(Arrays.asList("avfqnvhnqoewdogi", "etesypvidbztjhqt")); + .withSequenceNumber(606765941095041442L) + .withRouteTargets(Arrays.asList("ybfueqfrojsydgr", "ydkygywezskieca")); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityRule.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(4121428237576255143L, model.sequenceNumber()); - Assertions.assertEquals("avfqnvhnqoewdogi", model.routeTargets().get(0)); + Assertions.assertEquals(606765941095041442L, model.sequenceNumber()); + Assertions.assertEquals("ybfueqfrojsydgr", model.routeTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java deleted file mode 100644 index 8502677a1198..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunitySetOperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunitySetOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunitySetOperationProperties model = BinaryData.fromString( - "{\"set\":{\"ipExtendedCommunityIds\":[\"jzhdtrsyfezf\",\"my\",\"jdzyyrwnmwtq\",\"ljknnkynkstdtfwh\"]}}") - .toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("jzhdtrsyfezf", model.set().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunitySetOperationProperties model - = new IpExtendedCommunitySetOperationProperties().withSet(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("jzhdtrsyfezf", "my", "jdzyyrwnmwtq", "ljknnkynkstdtfwh"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("jzhdtrsyfezf", model.set().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..dfaba57afeb4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IpGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpGroupPatchProperties model + = BinaryData.fromString("{\"name\":\"ddei\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"vgkk\"]}") + .toObject(IpGroupPatchProperties.class); + Assertions.assertEquals("ddei", model.name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("vgkk", model.ipPrefixes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpGroupPatchProperties model = new IpGroupPatchProperties().withName("ddei") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("vgkk")); + model = BinaryData.fromObject(model).toObject(IpGroupPatchProperties.class); + Assertions.assertEquals("ddei", model.name()); + Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("vgkk", model.ipPrefixes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java index 4e595c337d71..cef7c1fd7800 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,22 @@ public final class IpGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpGroupProperties model = BinaryData - .fromString("{\"name\":\"lboxqvkjl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dynhdwdigum\"]}") - .toObject(IpGroupProperties.class); - Assertions.assertEquals("lboxqvkjl", model.name()); + IpGroupProperties model + = BinaryData.fromString("{\"name\":\"ajlyjtlvofqzhv\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"fmo\"]}") + .toObject(IpGroupProperties.class); + Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("dynhdwdigum", model.ipPrefixes().get(0)); + Assertions.assertEquals("fmo", model.ipPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpGroupProperties model = new IpGroupProperties().withName("lboxqvkjl") + IpGroupProperties model = new IpGroupProperties().withName("ajlyjtlvofqzhv") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("dynhdwdigum")); + .withIpPrefixes(Arrays.asList("fmo")); model = BinaryData.fromObject(model).toObject(IpGroupProperties.class); - Assertions.assertEquals("lboxqvkjl", model.name()); + Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("dynhdwdigum", model.ipPrefixes().get(0)); + Assertions.assertEquals("fmo", model.ipPrefixes().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java new file mode 100644 index 000000000000..daaceebfe755 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IpMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpMatchConditionPatch model = BinaryData.fromString( + "{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"dqlvhukoveof\",\"zrvjfnmjmvlwyzgi\"],\"ipGroupNames\":[\"ujr\",\"lfojuidjp\",\"uyjucejikzo\"]}") + .toObject(IpMatchConditionPatch.class); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.type()); + Assertions.assertEquals(PrefixType.PREFIX, model.prefixType()); + Assertions.assertEquals("dqlvhukoveof", model.ipPrefixValues().get(0)); + Assertions.assertEquals("ujr", model.ipGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpMatchConditionPatch model = new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("dqlvhukoveof", "zrvjfnmjmvlwyzgi")) + .withIpGroupNames(Arrays.asList("ujr", "lfojuidjp", "uyjucejikzo")); + model = BinaryData.fromObject(model).toObject(IpMatchConditionPatch.class); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.type()); + Assertions.assertEquals(PrefixType.PREFIX, model.prefixType()); + Assertions.assertEquals("dqlvhukoveof", model.ipPrefixValues().get(0)); + Assertions.assertEquals("ujr", model.ipGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java index 222bec93fb38..5cb175cff343 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,24 +15,24 @@ public final class IpMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpMatchCondition model = BinaryData.fromString( - "{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"unnoxyhk\",\"g\",\"ddrihpf\",\"oqcaaewdaomdj\"],\"ipGroupNames\":[\"jxxkzbrmsgei\",\"siykzkdncjdxonbz\"]}") + "{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ilbywdxsm\",\"ccwr\"],\"ipGroupNames\":[\"cj\",\"n\"]}") .toObject(IpMatchCondition.class); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); - Assertions.assertEquals("unnoxyhk", model.ipPrefixValues().get(0)); - Assertions.assertEquals("jxxkzbrmsgei", model.ipGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.type()); + Assertions.assertEquals(PrefixType.PREFIX, model.prefixType()); + Assertions.assertEquals("ilbywdxsm", model.ipPrefixValues().get(0)); + Assertions.assertEquals("cj", model.ipGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpMatchCondition model = new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("unnoxyhk", "g", "ddrihpf", "oqcaaewdaomdj")) - .withIpGroupNames(Arrays.asList("jxxkzbrmsgei", "siykzkdncjdxonbz")); + IpMatchCondition model = new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("ilbywdxsm", "ccwr")) + .withIpGroupNames(Arrays.asList("cj", "n")); model = BinaryData.fromObject(model).toObject(IpMatchCondition.class); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); - Assertions.assertEquals("unnoxyhk", model.ipPrefixValues().get(0)); - Assertions.assertEquals("jxxkzbrmsgei", model.ipGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.type()); + Assertions.assertEquals(PrefixType.PREFIX, model.prefixType()); + Assertions.assertEquals("ilbywdxsm", model.ipPrefixValues().get(0)); + Assertions.assertEquals("cj", model.ipGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java index 1ca569bcdaa3..340b8b9fcb0d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,43 +18,44 @@ public final class IpPrefixInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6992436865522878201,\"networkPrefix\":\"oyvivbsiz\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"zlbscmnlziji\"},{\"action\":\"Permit\",\"sequenceNumber\":3252520713262268196,\"networkPrefix\":\"gmvflnwyvqkx\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"niylyly\"}],\"annotation\":\"xzutgqztwhghmupg\"},\"location\":\"jtcdxabbujftaben\",\"tags\":{\"ucafedd\":\"lqpx\",\"gnhgook\":\"wnlzafwxu\"},\"id\":\"talvnbwgp\",\"name\":\"emeluclv\",\"type\":\"jjukyrdnqodxah\"}") + "{\"properties\":{\"annotation\":\"gqtagd\",\"networkFabricId\":\"lss\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":124055688722357344,\"networkPrefix\":\"evtf\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"bvgjcodkkgj\"},{\"action\":\"Deny\",\"sequenceNumber\":8379585167241352152,\"networkPrefix\":\"s\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"z\"}],\"lastOperation\":{\"details\":\"fqb\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"sorhcekx\",\"tags\":{\"oksqdt\":\"ykmxcpwzvm\",\"chygtvxbyjane\":\"wlwxlboncqbazqic\",\"od\":\"ubdpkxyqvgxi\",\"kxdxuwsaifmcwn\":\"tvo\"},\"id\":\"s\",\"name\":\"zlehgcvkbcknjolg\",\"type\":\"y\"}") .toObject(IpPrefixInner.class); - Assertions.assertEquals("jtcdxabbujftaben", model.location()); - Assertions.assertEquals("lqpx", model.tags().get("ucafedd")); + Assertions.assertEquals("sorhcekx", model.location()); + Assertions.assertEquals("ykmxcpwzvm", model.tags().get("oksqdt")); + Assertions.assertEquals("gqtagd", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6992436865522878201L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("oyvivbsiz", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("zlbscmnlziji", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("xzutgqztwhghmupg", model.annotation()); + Assertions.assertEquals(124055688722357344L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("evtf", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("bvgjcodkkgj", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixInner model = new IpPrefixInner().withLocation("jtcdxabbujftaben") - .withTags(mapOf("ucafedd", "lqpx", "gnhgook", "wnlzafwxu")) + IpPrefixInner model = new IpPrefixInner().withLocation("sorhcekx") + .withTags(mapOf("oksqdt", "ykmxcpwzvm", "chygtvxbyjane", "wlwxlboncqbazqic", "od", "ubdpkxyqvgxi", + "kxdxuwsaifmcwn", "tvo")) + .withAnnotation("gqtagd") .withIpPrefixRules(Arrays.asList( new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6992436865522878201L) - .withNetworkPrefix("oyvivbsiz") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("zlbscmnlziji"), - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3252520713262268196L) - .withNetworkPrefix("gmvflnwyvqkx") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("niylyly"))) - .withAnnotation("xzutgqztwhghmupg"); + .withSequenceNumber(124055688722357344L) + .withNetworkPrefix("evtf") + .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("bvgjcodkkgj"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8379585167241352152L) + .withNetworkPrefix("s") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("z"))); model = BinaryData.fromObject(model).toObject(IpPrefixInner.class); - Assertions.assertEquals("jtcdxabbujftaben", model.location()); - Assertions.assertEquals("lqpx", model.tags().get("ucafedd")); + Assertions.assertEquals("sorhcekx", model.location()); + Assertions.assertEquals("ykmxcpwzvm", model.tags().get("oksqdt")); + Assertions.assertEquals("gqtagd", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6992436865522878201L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("oyvivbsiz", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("zlbscmnlziji", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("xzutgqztwhghmupg", model.annotation()); + Assertions.assertEquals(124055688722357344L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("evtf", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("bvgjcodkkgj", model.ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java index f6a1eaa57f63..538ac93eb577 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,46 +16,46 @@ public final class IpPrefixPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixPatchProperties model = BinaryData.fromString( - "{\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":2543116814718955542,\"networkPrefix\":\"gtywatmqaqkue\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"oeshoygzcbyfq\"},{\"action\":\"Deny\",\"sequenceNumber\":3455942189061392603,\"networkPrefix\":\"oytehqpuvjm\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"dwckygroe\"},{\"action\":\"Permit\",\"sequenceNumber\":3395907540745395486,\"networkPrefix\":\"ljdjuskbrreqy\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"ysfaqegplwrysh\"},{\"action\":\"Deny\",\"sequenceNumber\":736166165406062542,\"networkPrefix\":\"vbxgkqusyb\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"acarvvlf\"}],\"annotation\":\"ymtpo\"}") + "{\"annotation\":\"dei\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1192063808706252824,\"networkPrefix\":\"cfxzirzzih\",\"condition\":\"Range\",\"subnetMaskLength\":\"usuv\"},{\"action\":\"Deny\",\"sequenceNumber\":6732303378803539091,\"networkPrefix\":\"zwci\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"llfryvdmvxadq\"},{\"action\":\"Deny\",\"sequenceNumber\":8838306472043801259,\"networkPrefix\":\"gna\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"gfbktyjmf\"},{\"action\":\"Deny\",\"sequenceNumber\":785803071405478131,\"networkPrefix\":\"syqkfrbzgowox\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"ajcxnyqgxhl\"}]}") .toObject(IpPrefixPatchProperties.class); - Assertions.assertEquals("ymtpo", model.annotation()); + Assertions.assertEquals("dei", model.annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2543116814718955542L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gtywatmqaqkue", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oeshoygzcbyfq", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals(1192063808706252824L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("cfxzirzzih", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("usuv", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixPatchProperties model = new IpPrefixPatchProperties().withAnnotation("ymtpo") + IpPrefixPatchProperties model = new IpPrefixPatchProperties().withAnnotation("dei") .withIpPrefixRules(Arrays.asList( new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2543116814718955542L) - .withNetworkPrefix("gtywatmqaqkue") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("oeshoygzcbyfq"), + .withSequenceNumber(1192063808706252824L) + .withNetworkPrefix("cfxzirzzih") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("usuv"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3455942189061392603L) - .withNetworkPrefix("oytehqpuvjm") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("dwckygroe"), - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3395907540745395486L) - .withNetworkPrefix("ljdjuskbrreqy") + .withSequenceNumber(6732303378803539091L) + .withNetworkPrefix("zwci") .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ysfaqegplwrysh"), + .withSubnetMaskLength("llfryvdmvxadq"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(736166165406062542L) - .withNetworkPrefix("vbxgkqusyb") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("acarvvlf"))); + .withSequenceNumber(8838306472043801259L) + .withNetworkPrefix("gna") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("gfbktyjmf"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(785803071405478131L) + .withNetworkPrefix("syqkfrbzgowox") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("ajcxnyqgxhl"))); model = BinaryData.fromObject(model).toObject(IpPrefixPatchProperties.class); - Assertions.assertEquals("ymtpo", model.annotation()); + Assertions.assertEquals("dei", model.annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2543116814718955542L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gtywatmqaqkue", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oeshoygzcbyfq", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals(1192063808706252824L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("cfxzirzzih", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("usuv", model.ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java index 1f0a221e9bf1..cafdc0a0d59b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,46 +18,42 @@ public final class IpPrefixPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixPatch model = BinaryData.fromString( - "{\"properties\":{\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4852295860770033656,\"networkPrefix\":\"gd\",\"condition\":\"Range\",\"subnetMaskLength\":\"oycblevpmc\"},{\"action\":\"Deny\",\"sequenceNumber\":1739626855088905602,\"networkPrefix\":\"xkyxlzgs\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"zltafhbzffovwm\"},{\"action\":\"Deny\",\"sequenceNumber\":1639207383510022302,\"networkPrefix\":\"qsczpgvdwnapfdqw\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"ptnuwjtkschgc\"}],\"annotation\":\"y\"},\"tags\":{\"kwiswskukjtas\":\"seyqrhvyeldotjv\",\"xkdtxfkndlqvtwkn\":\"vwisp\"}}") + "{\"properties\":{\"annotation\":\"hzzwvywrgyngy\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":926006283647968251,\"networkPrefix\":\"cakiqao\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"kclamgglvlmf\"},{\"action\":\"Permit\",\"sequenceNumber\":5081730758940077511,\"networkPrefix\":\"qey\",\"condition\":\"Range\",\"subnetMaskLength\":\"yg\"}]},\"tags\":{\"ejsxt\":\"fgqka\",\"eatlijjjrtvamcas\":\"gflwfgziiucijj\",\"gno\":\"knxkvccxetyvkunm\",\"jwpindedvabbxbh\":\"ikkgqo\"}}") .toObject(IpPrefixPatch.class); - Assertions.assertEquals("seyqrhvyeldotjv", model.tags().get("kwiswskukjtas")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4852295860770033656L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gd", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oycblevpmc", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("y", model.annotation()); + Assertions.assertEquals("fgqka", model.tags().get("ejsxt")); + Assertions.assertEquals("hzzwvywrgyngy", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(926006283647968251L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("cakiqao", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("kclamgglvlmf", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixPatch model - = new IpPrefixPatch().withTags(mapOf("kwiswskukjtas", "seyqrhvyeldotjv", "xkdtxfkndlqvtwkn", "vwisp")) - .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4852295860770033656L) - .withNetworkPrefix("gd") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("oycblevpmc"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1739626855088905602L) - .withNetworkPrefix("xkyxlzgs") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("zltafhbzffovwm"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1639207383510022302L) - .withNetworkPrefix("qsczpgvdwnapfdqw") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ptnuwjtkschgc"))) - .withAnnotation("y"); + IpPrefixPatch model = new IpPrefixPatch() + .withTags(mapOf("ejsxt", "fgqka", "eatlijjjrtvamcas", "gflwfgziiucijj", "gno", "knxkvccxetyvkunm", + "jwpindedvabbxbh", "ikkgqo")) + .withAnnotation("hzzwvywrgyngy") + .withIpPrefixRules(Arrays.asList( + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(926006283647968251L) + .withNetworkPrefix("cakiqao") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("kclamgglvlmf"), + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(5081730758940077511L) + .withNetworkPrefix("qey") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("yg"))); model = BinaryData.fromObject(model).toObject(IpPrefixPatch.class); - Assertions.assertEquals("seyqrhvyeldotjv", model.tags().get("kwiswskukjtas")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4852295860770033656L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gd", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oycblevpmc", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("y", model.annotation()); + Assertions.assertEquals("fgqka", model.tags().get("ejsxt")); + Assertions.assertEquals("hzzwvywrgyngy", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(926006283647968251L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("cakiqao", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("kclamgglvlmf", model.ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java deleted file mode 100644 index cc1cdfbb9cda..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixPatchableProperties model = BinaryData.fromString( - "{\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6119785955978410906,\"networkPrefix\":\"ravjuq\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"mr\"}]}") - .toObject(IpPrefixPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6119785955978410906L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ravjuq", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mr", model.ipPrefixRules().get(0).subnetMaskLength()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixPatchableProperties model = new IpPrefixPatchableProperties() - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6119785955978410906L) - .withNetworkPrefix("ravjuq") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("mr"))); - model = BinaryData.fromObject(model).toObject(IpPrefixPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6119785955978410906L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ravjuq", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mr", model.ipPrefixRules().get(0).subnetMaskLength()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java index 9bc3bfa05fc3..c3f9f4dda7df 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,46 +16,46 @@ public final class IpPrefixPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixProperties model = BinaryData.fromString( - "{\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5435314181058093460,\"networkPrefix\":\"gyipem\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"v\"},{\"action\":\"Deny\",\"sequenceNumber\":5139152311796566006,\"networkPrefix\":\"ejdtxptl\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"homewjjstliu\"},{\"action\":\"Deny\",\"sequenceNumber\":3810638848978413172,\"networkPrefix\":\"moaiancz\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"rrslblxydkx\"},{\"action\":\"Permit\",\"sequenceNumber\":7966232904898723422,\"networkPrefix\":\"bxiwkgfbqljn\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"chocokulehur\"}],\"annotation\":\"rqffaweyurk\"}") + "{\"annotation\":\"pvelszerqze\",\"networkFabricId\":\"o\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":3527539741753718294,\"networkPrefix\":\"xwaljgl\",\"condition\":\"Range\",\"subnetMaskLength\":\"qwaafrqulhm\"},{\"action\":\"Permit\",\"sequenceNumber\":1237200805001740489,\"networkPrefix\":\"hdvafjrqpjiyrqjc\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"wmzwdfkbnrzorpdl\"},{\"action\":\"Permit\",\"sequenceNumber\":7502311595298203245,\"networkPrefix\":\"tqjfgxxsaet\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"vpyigdaqq\"},{\"action\":\"Deny\",\"sequenceNumber\":5236877755933058202,\"networkPrefix\":\"cduwjoedx\",\"condition\":\"Range\",\"subnetMaskLength\":\"aifpaurwwgil\"}],\"lastOperation\":{\"details\":\"qacdmkxwxdcvjwcy\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(IpPrefixProperties.class); - Assertions.assertEquals("rqffaweyurk", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5435314181058093460L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gyipem", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("v", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("pvelszerqze", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(3527539741753718294L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("xwaljgl", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("qwaafrqulhm", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixProperties model = new IpPrefixProperties().withAnnotation("rqffaweyurk") + IpPrefixProperties model = new IpPrefixProperties().withAnnotation("pvelszerqze") .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5435314181058093460L) - .withNetworkPrefix("gyipem") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("v"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5139152311796566006L) - .withNetworkPrefix("ejdtxptl") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("homewjjstliu"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3810638848978413172L) - .withNetworkPrefix("moaiancz") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("rrslblxydkx"), new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(7966232904898723422L) - .withNetworkPrefix("bxiwkgfbqljn") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("chocokulehur"))); + .withSequenceNumber(3527539741753718294L) + .withNetworkPrefix("xwaljgl") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("qwaafrqulhm"), + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(1237200805001740489L) + .withNetworkPrefix("hdvafjrqpjiyrqjc") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("wmzwdfkbnrzorpdl"), + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(7502311595298203245L) + .withNetworkPrefix("tqjfgxxsaet") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("vpyigdaqq"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(5236877755933058202L) + .withNetworkPrefix("cduwjoedx") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("aifpaurwwgil"))); model = BinaryData.fromObject(model).toObject(IpPrefixProperties.class); - Assertions.assertEquals("rqffaweyurk", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5435314181058093460L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gyipem", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("v", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("pvelszerqze", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(3527539741753718294L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("xwaljgl", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("qwaafrqulhm", model.ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java index 0aec97659aae..74bbcb0becb7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,27 +14,27 @@ public final class IpPrefixRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixRule model = BinaryData.fromString( - "{\"action\":\"Deny\",\"sequenceNumber\":667258597321052143,\"networkPrefix\":\"apx\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"jjk\"}") + "{\"action\":\"Deny\",\"sequenceNumber\":7455281713674658212,\"networkPrefix\":\"xrtuicds\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"m\"}") .toObject(IpPrefixRule.class); Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(667258597321052143L, model.sequenceNumber()); - Assertions.assertEquals("apx", model.networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.condition()); - Assertions.assertEquals("jjk", model.subnetMaskLength()); + Assertions.assertEquals(7455281713674658212L, model.sequenceNumber()); + Assertions.assertEquals("xrtuicds", model.networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.condition()); + Assertions.assertEquals("m", model.subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpPrefixRule model = new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(667258597321052143L) - .withNetworkPrefix("apx") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength("jjk"); + .withSequenceNumber(7455281713674658212L) + .withNetworkPrefix("xrtuicds") + .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("m"); model = BinaryData.fromObject(model).toObject(IpPrefixRule.class); Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(667258597321052143L, model.sequenceNumber()); - Assertions.assertEquals("apx", model.networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.condition()); - Assertions.assertEquals("jjk", model.subnetMaskLength()); + Assertions.assertEquals(7455281713674658212L, model.sequenceNumber()); + Assertions.assertEquals("xrtuicds", model.networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.condition()); + Assertions.assertEquals("m", model.subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java index fa98bc96494a..e3ed389eb03a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -27,37 +27,43 @@ public final class IpPrefixesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4520960034287352179,\"networkPrefix\":\"bdj\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"xotudamkiyao\"}],\"annotation\":\"hulzugifgsp\"},\"location\":\"dlnoc\",\"tags\":{\"wm\":\"gimizlukj\",\"mspppoeszthjt\":\"ksr\"},\"id\":\"yjskdiylg\",\"name\":\"zuqix\",\"type\":\"sybqowgvmxwbo\"}"; + = "{\"properties\":{\"annotation\":\"iohdxyuk\",\"networkFabricId\":\"lfwykrpojenpsff\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":7399253583141122308,\"networkPrefix\":\"ajgblehxp\",\"condition\":\"Range\",\"subnetMaskLength\":\"vxfnzcevfbie\"},{\"action\":\"Permit\",\"sequenceNumber\":3938687823131203074,\"networkPrefix\":\"jdkzfkneckv\",\"condition\":\"Range\",\"subnetMaskLength\":\"szr\"},{\"action\":\"Permit\",\"sequenceNumber\":5134733880986488302,\"networkPrefix\":\"jhyrzzxqtc\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"hzcicitykzyi\"}],\"lastOperation\":{\"details\":\"ingnfunhtzgxsyi\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"jztbw\",\"tags\":{\"hznh\":\"qzqw\"},\"id\":\"zdb\",\"name\":\"lkdsbekvprkwpvx\",\"type\":\"e\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpPrefix response = manager.ipPrefixes() - .define("chmeodhzj") - .withRegion("owqrzvuxn") - .withExistingResourceGroup("zje") - .withTags(mapOf("mjdhypngo", "ohshzultdb", "zukekytkzvt", "bdxvrivptbczsuzg", "inha", "maatvogpyc", - "khwfjudapbq", "hbdxsbypl")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(5837362985759110973L) - .withNetworkPrefix("eqkwqphfvsfts") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("p"))) - .withAnnotation("achdtezgfctu") + .define("lcrzdweb") + .withRegion("erzpggsyeydctjn") + .withExistingResourceGroup("guykrpzpmwz") + .withIpPrefixRules(Arrays.asList( + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(3075134906773649974L) + .withNetworkPrefix("hcfeqjkacu") + .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("ckojqo"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(3305075751206916520L) + .withNetworkPrefix("hvfdosq") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("qbp"))) + .withTags(mapOf("yvjispkgkhvpvbz", "hztlzbw", "hxstxsfztlvsdm", "yo", "yfgtwxmjdbzfiac", "shhcdlsowyhxwh", + "mch", "wmce")) + .withAnnotation("spk") .create(); - Assertions.assertEquals("dlnoc", response.location()); - Assertions.assertEquals("gimizlukj", response.tags().get("wm")); + Assertions.assertEquals("jztbw", response.location()); + Assertions.assertEquals("qzqw", response.tags().get("hznh")); + Assertions.assertEquals("iohdxyuk", response.annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4520960034287352179L, response.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("bdj", response.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, response.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("xotudamkiyao", response.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("hulzugifgsp", response.annotation()); + Assertions.assertEquals(7399253583141122308L, response.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("ajgblehxp", response.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, response.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("vxfnzcevfbie", response.ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java index 449fab878c44..6b241a1a6123 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -23,26 +23,26 @@ public final class IpPrefixesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8148053506381843263,\"networkPrefix\":\"tbltytvnpbgcesfd\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"mowurofof\"},{\"action\":\"Permit\",\"sequenceNumber\":1224957652054116236,\"networkPrefix\":\"zzwweoblb\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"hixcc\"},{\"action\":\"Permit\",\"sequenceNumber\":7690295423276930746,\"networkPrefix\":\"og\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"myqzyqepgbbzdsl\"}],\"annotation\":\"kcevoxdd\"},\"location\":\"wmgwxwukfjv\",\"tags\":{\"gyphheovejkpalec\":\"axseisvv\",\"pu\":\"tlthrt\"},\"id\":\"fssrgrq\",\"name\":\"fnquollouurmuz\",\"type\":\"mbqqiehdhj\"}"; + = "{\"properties\":{\"annotation\":\"wzvdfeyaevzjqfx\",\"networkFabricId\":\"yjzu\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1312800485302260834,\"networkPrefix\":\"vtjmdymdyps\",\"condition\":\"Range\",\"subnetMaskLength\":\"fyevhurklow\"},{\"action\":\"Permit\",\"sequenceNumber\":2362975858933710127,\"networkPrefix\":\"zclilyoixeeiznqi\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"hsmtxjcajhs\"}],\"lastOperation\":{\"details\":\"qtzrnubodg\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"location\":\"gugrjxx\",\"tags\":{\"vumwnbzslm\":\"o\",\"pxtipk\":\"fcttkprx\",\"amdvnc\":\"bebafiqxomevke\",\"tytoainign\":\"tnb\"},\"id\":\"hzqgbaqvqeyla\",\"name\":\"kobkrg\",\"type\":\"yfnbxw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpPrefix response = manager.ipPrefixes() - .getByResourceGroupWithResponse("ure", "vivkiglioklsu", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("jbpzdwhxputka", "l", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wmgwxwukfjv", response.location()); - Assertions.assertEquals("axseisvv", response.tags().get("gyphheovejkpalec")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.ipPrefixRules().get(0).action()); - Assertions.assertEquals(8148053506381843263L, response.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("tbltytvnpbgcesfd", response.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, response.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mowurofof", response.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("kcevoxdd", response.annotation()); + Assertions.assertEquals("gugrjxx", response.location()); + Assertions.assertEquals("o", response.tags().get("vumwnbzslm")); + Assertions.assertEquals("wzvdfeyaevzjqfx", response.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipPrefixRules().get(0).action()); + Assertions.assertEquals(1312800485302260834L, response.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("vtjmdymdyps", response.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.RANGE, response.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("fyevhurklow", response.ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java index 9cc8bb777886..1e5a565155cf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -24,29 +24,27 @@ public final class IpPrefixesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":245835078321548908,\"networkPrefix\":\"u\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"aglyyhrgmabspmlu\"},{\"action\":\"Permit\",\"sequenceNumber\":4123582002679106167,\"networkPrefix\":\"kk\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"tocrbfgqicmdrgcu\"}],\"annotation\":\"m\"},\"location\":\"r\",\"tags\":{\"qjvfio\":\"cqhgcmljzksqimy\",\"szopeuku\":\"hcaqpv\",\"emosq\":\"dswbsskgq\",\"gipdzym\":\"fsjbpwjwz\"},\"id\":\"khxfpz\",\"name\":\"uudqhadxjvvl\",\"type\":\"ibweua\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"zhxothfyifjufzlg\",\"networkFabricId\":\"smt\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":3404549607837020735,\"networkPrefix\":\"zyycqsxy\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"ezpryc\"},{\"action\":\"Deny\",\"sequenceNumber\":7174890691377290019,\"networkPrefix\":\"yamochpwwykfyt\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"dckwqvckh\"},{\"action\":\"Deny\",\"sequenceNumber\":6846764562735599449,\"networkPrefix\":\"mcad\",\"condition\":\"Range\",\"subnetMaskLength\":\"uvmj\"}],\"lastOperation\":{\"details\":\"az\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"ffkg\",\"tags\":{\"jmwaapzrkhp\":\"dl\",\"qeoajnaotav\":\"yhz\"},\"id\":\"m\",\"name\":\"fqtdgdfecjuecyrw\",\"type\":\"oohmcwxbaczypslf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipPrefixes().listByResourceGroup("fywwnax", com.azure.core.util.Context.NONE); + = manager.ipPrefixes().listByResourceGroup("lh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("r", response.iterator().next().location()); - Assertions.assertEquals("cqhgcmljzksqimy", response.iterator().next().tags().get("qjvfio")); + Assertions.assertEquals("ffkg", response.iterator().next().location()); + Assertions.assertEquals("dl", response.iterator().next().tags().get("jmwaapzrkhp")); + Assertions.assertEquals("zhxothfyifjufzlg", response.iterator().next().annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().ipPrefixRules().get(0).action()); - Assertions.assertEquals(245835078321548908L, + Assertions.assertEquals(3404549607837020735L, response.iterator().next().ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("u", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, - response.iterator().next().ipPrefixRules().get(0).condition()); - Assertions.assertEquals("aglyyhrgmabspmlu", - response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("m", response.iterator().next().annotation()); + Assertions.assertEquals("zyycqsxy", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, response.iterator().next().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("ezpryc", response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java index ebb6a3722d27..83ae15093ec8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; @@ -24,27 +24,26 @@ public final class IpPrefixesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5109634825070710854,\"networkPrefix\":\"vytzq\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"jvzmxyrazzstjvc\"},{\"action\":\"Permit\",\"sequenceNumber\":4983579071329982771,\"networkPrefix\":\"brlbozlt\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"cbibtk\"}],\"annotation\":\"ecupmwxdsokr\"},\"location\":\"rpeylfii\",\"tags\":{\"hcxwwwvun\":\"dgiql\",\"atrtcqyfjvifbmo\":\"nsgvxhxrm\"},\"id\":\"tehqyoytrcoufkq\",\"name\":\"bhukdfpknv\",\"type\":\"iv\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"fwonbtgpeizu\",\"networkFabricId\":\"oeo\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4137358365857370833,\"networkPrefix\":\"wgfhdfom\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"cf\"},{\"action\":\"Deny\",\"sequenceNumber\":4334556995770779106,\"networkPrefix\":\"jg\",\"condition\":\"Range\",\"subnetMaskLength\":\"gmeqhtngrx\"}],\"lastOperation\":{\"details\":\"osewfbllegezvwu\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"location\":\"jacmazilqgvm\",\"tags\":{\"ykmdklwbqkmtw\":\"oqpyb\",\"c\":\"aqqqtmpgr\",\"oebo\":\"ltwedllp\"},\"id\":\"hyiohcj\",\"name\":\"gduoggx\",\"type\":\"zmy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipPrefixes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("rpeylfii", response.iterator().next().location()); - Assertions.assertEquals("dgiql", response.iterator().next().tags().get("hcxwwwvun")); + Assertions.assertEquals("jacmazilqgvm", response.iterator().next().location()); + Assertions.assertEquals("oqpyb", response.iterator().next().tags().get("ykmdklwbqkmtw")); + Assertions.assertEquals("fwonbtgpeizu", response.iterator().next().annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().ipPrefixRules().get(0).action()); - Assertions.assertEquals(5109634825070710854L, + Assertions.assertEquals(4137358365857370833L, response.iterator().next().ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("vytzq", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals("wgfhdfom", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, response.iterator().next().ipPrefixRules().get(0).condition()); - Assertions.assertEquals("jvzmxyrazzstjvc", - response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("ecupmwxdsokr", response.iterator().next().annotation()); + Assertions.assertEquals("cf", response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java index 0d59730c8adb..b165c008a667 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java @@ -1,107 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixesListResult; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class IpPrefixesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":932286244659176936,\"networkPrefix\":\"a\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"dnwqapfg\"}],\"annotation\":\"pcvessm\"},\"location\":\"h\",\"tags\":{\"dqq\":\"ip\",\"blhtjq\":\"tekva\"},\"id\":\"qyv\",\"name\":\"eh\",\"type\":\"a\"},{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5431502201952850372,\"networkPrefix\":\"xivzrrry\",\"condition\":\"Range\",\"subnetMaskLength\":\"ipsk\"}],\"annotation\":\"zatvfuzka\"},\"location\":\"jvvruxwigsyei\",\"tags\":{\"kileplkcsmknhwtb\":\"smjtgrqgdg\",\"oygbdgwumgxd\":\"aedorvvmqf\"},\"id\":\"dhp\",\"name\":\"bgd\",\"type\":\"xjd\"},{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6883686834742004480,\"networkPrefix\":\"llcolsrsxapte\",\"condition\":\"Range\",\"subnetMaskLength\":\"cgjokjljnhvlq\"}],\"annotation\":\"ek\"},\"location\":\"eksnbksdqhjvyk\",\"tags\":{\"hhus\":\"sl\"},\"id\":\"cpoq\",\"name\":\"avnwqj\",\"type\":\"g\"},{\"properties\":{\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":424186973430303992,\"networkPrefix\":\"wfd\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"ztensvkzykjtj\"},{\"action\":\"Permit\",\"sequenceNumber\":2113099919480363245,\"networkPrefix\":\"fwushcdpkupn\",\"condition\":\"Range\",\"subnetMaskLength\":\"jfbp\"},{\"action\":\"Deny\",\"sequenceNumber\":8039859701811063701,\"networkPrefix\":\"eoiojfizfavkjzw\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"aykmmf\"}],\"annotation\":\"bfw\"},\"location\":\"zxmdew\",\"tags\":{\"jwwviy\":\"xkrplbjaz\",\"suhbrnn\":\"y\"},\"id\":\"jxsqwjhqkbiwetp\",\"name\":\"zycyqiqyhg\",\"type\":\"se\"}],\"nextLink\":\"lexbsf\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"vxisimjcea\",\"networkFabricId\":\"jqvlsumywz\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2662781090324647591,\"networkPrefix\":\"onoyjf\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"b\"},{\"action\":\"Deny\",\"sequenceNumber\":293197962792845943,\"networkPrefix\":\"lkfk\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"vop\"}],\"lastOperation\":{\"details\":\"uoqujlyeg\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"qqbtny\",\"tags\":{\"baevwjcnkottl\":\"lxdbfvabmvms\"},\"id\":\"uhvajmailfemjjza\",\"name\":\"zwjiqullq\",\"type\":\"bdmvrscmqerndbr\"}],\"nextLink\":\"eof\"}") .toObject(IpPrefixesListResult.class); - Assertions.assertEquals("h", model.value().get(0).location()); - Assertions.assertEquals("ip", model.value().get(0).tags().get("dqq")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipPrefixRules().get(0).action()); - Assertions.assertEquals(932286244659176936L, model.value().get(0).ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("a", model.value().get(0).ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, - model.value().get(0).ipPrefixRules().get(0).condition()); - Assertions.assertEquals("dnwqapfg", model.value().get(0).ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("pcvessm", model.value().get(0).annotation()); - Assertions.assertEquals("lexbsf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixesListResult model = new IpPrefixesListResult().withValue(Arrays.asList( - new IpPrefixInner().withLocation("h") - .withTags(mapOf("dqq", "ip", "blhtjq", "tekva")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(932286244659176936L) - .withNetworkPrefix("a") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("dnwqapfg"))) - .withAnnotation("pcvessm"), - new IpPrefixInner().withLocation("jvvruxwigsyei") - .withTags(mapOf("kileplkcsmknhwtb", "smjtgrqgdg", "oygbdgwumgxd", "aedorvvmqf")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(5431502201952850372L) - .withNetworkPrefix("xivzrrry") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("ipsk"))) - .withAnnotation("zatvfuzka"), - new IpPrefixInner().withLocation("eksnbksdqhjvyk") - .withTags(mapOf("hhus", "sl")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6883686834742004480L) - .withNetworkPrefix("llcolsrsxapte") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("cgjokjljnhvlq"))) - .withAnnotation("ek"), - new IpPrefixInner().withLocation("zxmdew") - .withTags(mapOf("jwwviy", "xkrplbjaz", "suhbrnn", "y")) - .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(424186973430303992L) - .withNetworkPrefix("wfd") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ztensvkzykjtj"), - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2113099919480363245L) - .withNetworkPrefix("fwushcdpkupn") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("jfbp"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8039859701811063701L) - .withNetworkPrefix("eoiojfizfavkjzw") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("aykmmf"))) - .withAnnotation("bfw"))) - .withNextLink("lexbsf"); - model = BinaryData.fromObject(model).toObject(IpPrefixesListResult.class); - Assertions.assertEquals("h", model.value().get(0).location()); - Assertions.assertEquals("ip", model.value().get(0).tags().get("dqq")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipPrefixRules().get(0).action()); - Assertions.assertEquals(932286244659176936L, model.value().get(0).ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("a", model.value().get(0).ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, - model.value().get(0).ipPrefixRules().get(0).condition()); - Assertions.assertEquals("dnwqapfg", model.value().get(0).ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("pcvessm", model.value().get(0).annotation()); - Assertions.assertEquals("lexbsf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("qqbtny", model.value().get(0).location()); + Assertions.assertEquals("lxdbfvabmvms", model.value().get(0).tags().get("baevwjcnkottl")); + Assertions.assertEquals("vxisimjcea", model.value().get(0).annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).ipPrefixRules().get(0).action()); + Assertions.assertEquals(2662781090324647591L, model.value().get(0).ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("onoyjf", model.value().get(0).ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.value().get(0).ipPrefixRules().get(0).condition()); + Assertions.assertEquals("b", model.value().get(0).ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("eof", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java new file mode 100644 index 000000000000..072f4c93cb3c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IsolationDomainPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IsolationDomainPatchProperties model = BinaryData.fromString( + "{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ptb\",\"ponhblqi\",\"cnuqfpzjz\",\"bpcwtwtrchkcmru\"]}") + .toObject(IsolationDomainPatchProperties.class); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("ptb", model.neighborGroupIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IsolationDomainPatchProperties model + = new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("ptb", "ponhblqi", "cnuqfpzjz", "bpcwtwtrchkcmru")); + model = BinaryData.fromObject(model).toObject(IsolationDomainPatchProperties.class); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("ptb", model.neighborGroupIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java index aed85f530ed0..7c3fba4c8df4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,19 @@ public final class IsolationDomainPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IsolationDomainProperties model = BinaryData - .fromString("{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"ysokliiksyb\",\"rrbnhylsbhujcydy\",\"l\"]}") + IsolationDomainProperties model = BinaryData.fromString( + "{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"gykzovstvymdqa\",\"mqm\",\"rnzgubqkfnox\",\"voyjdgfkrq\"]}") .toObject(IsolationDomainProperties.class); - Assertions.assertEquals(Encapsulation.GRE, model.encapsulation()); - Assertions.assertEquals("ysokliiksyb", model.neighborGroupIds().get(0)); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("gykzovstvymdqa", model.neighborGroupIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IsolationDomainProperties model = new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("ysokliiksyb", "rrbnhylsbhujcydy", "l")); + IsolationDomainProperties model = new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("gykzovstvymdqa", "mqm", "rnzgubqkfnox", "voyjdgfkrq")); model = BinaryData.fromObject(model).toObject(IsolationDomainProperties.class); - Assertions.assertEquals(Encapsulation.GRE, model.encapsulation()); - Assertions.assertEquals("ysokliiksyb", model.neighborGroupIds().get(0)); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("gykzovstvymdqa", model.neighborGroupIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java index 28e0df02bb9b..0d24e28222a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java @@ -1,11 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,31 +18,41 @@ public final class L2IsolationDomainInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"e\",\"vlanId\":76777618,\"mtu\":246722999,\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"annotation\":\"bzkkd\"},\"location\":\"hqsycljselp\",\"tags\":{\"by\":\"afvafh\",\"rsofpltdbmairrh\":\"ccbevxrhyzdf\",\"npq\":\"hfnrac\",\"uuj\":\"g\"},\"id\":\"ouhdawsigrb\",\"name\":\"bxsjybvitvqkj\",\"type\":\"az\"}") + "{\"properties\":{\"networkFabricId\":\"tfnnxrk\",\"vlanId\":330841837,\"mtu\":846889023,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"fmu\",\"lastOperation\":{\"details\":\"ri\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"xbbcbrw\"},\"identity\":{\"principalId\":\"tgnjizbeewoiymrv\",\"tenantId\":\"juyrsrziuctixg\",\"type\":\"None\",\"userAssignedIdentities\":{\"syparybjufp\":{\"principalId\":\"frevkaapezkiswqj\",\"clientId\":\"g\"}}},\"location\":\"jczjnciuiyqv\",\"tags\":{\"ppisqqzlgcndhzx\":\"sw\",\"srhkhgsnxuwwkpph\":\"rfc\"},\"id\":\"fsbzxlbzxo\",\"name\":\"eikjclwza\",\"type\":\"nmwpf\"}") .toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("hqsycljselp", model.location()); - Assertions.assertEquals("afvafh", model.tags().get("by")); - Assertions.assertEquals("e", model.networkFabricId()); - Assertions.assertEquals(76777618, model.vlanId()); - Assertions.assertEquals(246722999, model.mtu()); - Assertions.assertEquals("bzkkd", model.annotation()); + Assertions.assertEquals("jczjnciuiyqv", model.location()); + Assertions.assertEquals("sw", model.tags().get("ppisqqzlgcndhzx")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("tfnnxrk", model.networkFabricId()); + Assertions.assertEquals(330841837, model.vlanId()); + Assertions.assertEquals(846889023, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("fmu", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("xbbcbrw", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainInner model = new L2IsolationDomainInner().withLocation("hqsycljselp") - .withTags(mapOf("by", "afvafh", "rsofpltdbmairrh", "ccbevxrhyzdf", "npq", "hfnrac", "uuj", "g")) - .withNetworkFabricId("e") - .withVlanId(76777618) - .withMtu(246722999) - .withAnnotation("bzkkd"); + L2IsolationDomainInner model = new L2IsolationDomainInner().withLocation("jczjnciuiyqv") + .withTags(mapOf("ppisqqzlgcndhzx", "sw", "srhkhgsnxuwwkpph", "rfc")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("syparybjufp", new UserAssignedIdentity()))) + .withNetworkFabricId("tfnnxrk") + .withVlanId(330841837) + .withMtu(846889023) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("fmu") + .withAnnotation("xbbcbrw"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("hqsycljselp", model.location()); - Assertions.assertEquals("afvafh", model.tags().get("by")); - Assertions.assertEquals("e", model.networkFabricId()); - Assertions.assertEquals(76777618, model.vlanId()); - Assertions.assertEquals(246722999, model.mtu()); - Assertions.assertEquals("bzkkd", model.annotation()); + Assertions.assertEquals("jczjnciuiyqv", model.location()); + Assertions.assertEquals("sw", model.tags().get("ppisqqzlgcndhzx")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("tfnnxrk", model.networkFabricId()); + Assertions.assertEquals(330841837, model.vlanId()); + Assertions.assertEquals(846889023, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("fmu", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("xbbcbrw", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java index 97679d0c62b3..c53c8329ed77 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java @@ -1,28 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import org.junit.jupiter.api.Assertions; public final class L2IsolationDomainPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - L2IsolationDomainPatchProperties model = BinaryData.fromString("{\"mtu\":947905115,\"annotation\":\"fijd\"}") + L2IsolationDomainPatchProperties model = BinaryData.fromString( + "{\"mtu\":1378278521,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"crraueekcsu\",\"annotation\":\"ogd\"}") .toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("fijd", model.annotation()); - Assertions.assertEquals(947905115, model.mtu()); + Assertions.assertEquals("ogd", model.annotation()); + Assertions.assertEquals(1378278521, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("crraueekcsu", model.networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainPatchProperties model - = new L2IsolationDomainPatchProperties().withAnnotation("fijd").withMtu(947905115); + L2IsolationDomainPatchProperties model = new L2IsolationDomainPatchProperties().withAnnotation("ogd") + .withMtu(1378278521) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("crraueekcsu"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("fijd", model.annotation()); - Assertions.assertEquals(947905115, model.mtu()); + Assertions.assertEquals("ogd", model.annotation()); + Assertions.assertEquals(1378278521, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("crraueekcsu", model.networkToNetworkInterconnectId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java index 15075c981b96..12b8e605d2ec 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java @@ -1,11 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,24 +18,35 @@ public final class L2IsolationDomainPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainPatch model = BinaryData.fromString( - "{\"properties\":{\"mtu\":542364624,\"annotation\":\"ykwphvxzcwxhmpe\"},\"tags\":{\"aonwivkcqhrxh\":\"ke\",\"jubyqjfkakfq\":\"knlccrmmkyup\",\"yildudxjascow\":\"rke\",\"jkpdxphlkksnm\":\"f\"}}") + "{\"properties\":{\"mtu\":1778225754,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"ajsvk\",\"annotation\":\"mqozzkivy\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"qlmgnlqxsjxt\":{\"principalId\":\"jixlqfhefkwabs\",\"clientId\":\"ron\"},\"nndtsnxa\":{\"principalId\":\"exhvuqbozoolz\",\"clientId\":\"carkuzlb\"}}},\"tags\":{\"yzm\":\"tllh\",\"nxakckyw\":\"ckze\",\"zvkiwrsiwdy\":\"mxgaabjkdtfohfao\"}}") .toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("ke", model.tags().get("aonwivkcqhrxh")); - Assertions.assertEquals(542364624, model.mtu()); - Assertions.assertEquals("ykwphvxzcwxhmpe", model.annotation()); + Assertions.assertEquals("tllh", model.tags().get("yzm")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals(1778225754, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("ajsvk", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("mqozzkivy", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L2IsolationDomainPatch model = new L2IsolationDomainPatch() - .withTags(mapOf("aonwivkcqhrxh", "ke", "jubyqjfkakfq", "knlccrmmkyup", "yildudxjascow", "rke", - "jkpdxphlkksnm", "f")) - .withMtu(542364624) - .withAnnotation("ykwphvxzcwxhmpe"); + .withTags(mapOf("yzm", "tllh", "nxakckyw", "ckze", "zvkiwrsiwdy", "mxgaabjkdtfohfao")) + .withIdentity( + new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("qlmgnlqxsjxt", new UserAssignedIdentity(), "nndtsnxa", new UserAssignedIdentity()))) + .withMtu(1778225754) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("ajsvk") + .withAnnotation("mqozzkivy"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("ke", model.tags().get("aonwivkcqhrxh")); - Assertions.assertEquals(542364624, model.mtu()); - Assertions.assertEquals("ykwphvxzcwxhmpe", model.annotation()); + Assertions.assertEquals("tllh", model.tags().get("yzm")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals(1778225754, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("ajsvk", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("mqozzkivy", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java index e3a0ac2decef..8d204f6e5ca1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java @@ -1,35 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import org.junit.jupiter.api.Assertions; public final class L2IsolationDomainPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"umtggmuwdchozfn\",\"vlanId\":820610981,\"mtu\":418227301,\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"annotation\":\"izvoaiknaqlnuwi\"}") + "{\"networkFabricId\":\"uqtaazyqbxyxoyf\",\"vlanId\":634077919,\"mtu\":495775469,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"zxlhdjzqdcadwv\",\"lastOperation\":{\"details\":\"zjiihjr\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Updating\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"pnx\"}") .toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("izvoaiknaqlnuwi", model.annotation()); - Assertions.assertEquals("umtggmuwdchozfn", model.networkFabricId()); - Assertions.assertEquals(820610981, model.vlanId()); - Assertions.assertEquals(418227301, model.mtu()); + Assertions.assertEquals("pnx", model.annotation()); + Assertions.assertEquals("uqtaazyqbxyxoyf", model.networkFabricId()); + Assertions.assertEquals(634077919, model.vlanId()); + Assertions.assertEquals(495775469, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("zxlhdjzqdcadwv", model.networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainProperties model = new L2IsolationDomainProperties().withAnnotation("izvoaiknaqlnuwi") - .withNetworkFabricId("umtggmuwdchozfn") - .withVlanId(820610981) - .withMtu(418227301); + L2IsolationDomainProperties model = new L2IsolationDomainProperties().withAnnotation("pnx") + .withNetworkFabricId("uqtaazyqbxyxoyf") + .withVlanId(634077919) + .withMtu(495775469) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("zxlhdjzqdcadwv"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("izvoaiknaqlnuwi", model.annotation()); - Assertions.assertEquals("umtggmuwdchozfn", model.networkFabricId()); - Assertions.assertEquals(820610981, model.vlanId()); - Assertions.assertEquals(418227301, model.mtu()); + Assertions.assertEquals("pnx", model.annotation()); + Assertions.assertEquals("uqtaazyqbxyxoyf", model.networkFabricId()); + Assertions.assertEquals(634077919, model.vlanId()); + Assertions.assertEquals(495775469, model.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.extendedVlan()); + Assertions.assertEquals("zxlhdjzqdcadwv", model.networkToNetworkInterconnectId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java index c29469f25996..0f777ac16dce 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java @@ -1,16 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -23,32 +27,41 @@ public final class L2IsolationDomainsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"haezcldkc\",\"vlanId\":2146258576,\"mtu\":113095323,\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"jstfs\"},\"location\":\"cjakgkqwx\",\"tags\":{\"wdjox\":\"oqzh\"},\"id\":\"kbd\",\"name\":\"sobvcnsb\",\"type\":\"oeznl\"}"; + = "{\"properties\":{\"networkFabricId\":\"vqyi\",\"vlanId\":1378450823,\"mtu\":1120818770,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"vmxnavxzpyaptex\",\"lastOperation\":{\"details\":\"qhewhcchexczrmyn\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"wolfmfazxwcaic\"},\"identity\":{\"principalId\":\"ttzfswohddlii\",\"tenantId\":\"osqpli\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"crzbtlrbzqt\":{\"principalId\":\"nb\",\"clientId\":\"vuukydiks\"},\"hyujqxyfbkaz\":{\"principalId\":\"gajfa\",\"clientId\":\"tohdlpcixpxxnyhi\"}}},\"location\":\"ayabrdnovuduww\",\"tags\":{\"kmci\":\"gcn\"},\"id\":\"hwwhyejhwbdf\",\"name\":\"f\",\"type\":\"zwkmrjfsqbc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2IsolationDomain response = manager.l2IsolationDomains() - .define("jnzpqhqqsa") - .withRegion("cv") - .withExistingResourceGroup("rvqrwwbdrwroqk") - .withNetworkFabricId("kyu") - .withVlanId(2097989242) - .withTags(mapOf("jocrhnxzmfvmw", "suowtolkyqf", "rawwhyxf", "nrtc")) - .withMtu(696018233) - .withAnnotation("nhekzazvgeytlpls") + .define("oxohgkdnhb") + .withRegion("ugwhkw") + .withExistingResourceGroup("fijpjiudnustb") + .withNetworkFabricId("uepuv") + .withVlanId(239779991) + .withTags(mapOf("crkm", "qnxpo", "egsbuqdpzhq", "ajy", "xrexbargbmemopyp", "czzutxtid", "nnowpvxuuvhwsr", + "uomowucj")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("bzjyzajdpbnbpzxn", new UserAssignedIdentity(), "xi", + new UserAssignedIdentity(), "mipfudzntb", new UserAssignedIdentity()))) + .withMtu(1735632778) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("vfrhyxlw") + .withAnnotation("mkyouwmjxhmkch") .create(); - Assertions.assertEquals("cjakgkqwx", response.location()); - Assertions.assertEquals("oqzh", response.tags().get("wdjox")); - Assertions.assertEquals("haezcldkc", response.networkFabricId()); - Assertions.assertEquals(2146258576, response.vlanId()); - Assertions.assertEquals(113095323, response.mtu()); - Assertions.assertEquals("jstfs", response.annotation()); + Assertions.assertEquals("ayabrdnovuduww", response.location()); + Assertions.assertEquals("gcn", response.tags().get("kmci")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("vqyi", response.networkFabricId()); + Assertions.assertEquals(1378450823, response.vlanId()); + Assertions.assertEquals(1120818770, response.mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, response.extendedVlan()); + Assertions.assertEquals("vmxnavxzpyaptex", response.networkToNetworkInterconnectId()); + Assertions.assertEquals("wolfmfazxwcaic", response.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java index 2cc30afa8809..c7df6699a77a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,24 +23,27 @@ public final class L2IsolationDomainsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"umqeu\",\"vlanId\":1939344941,\"mtu\":1221835156,\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"annotation\":\"vjqutxrbgbzgfhzd\"},\"location\":\"hk\",\"tags\":{\"jwhz\":\"cbicfecthotb\",\"jdpayx\":\"pxjvtwk\",\"qztjfkgb\":\"pqiwuzr\",\"en\":\"qqjobsyn\"},\"id\":\"onjqhdheosx\",\"name\":\"wfudmpf\",\"type\":\"wypphtjtntcwgpd\"}"; + = "{\"properties\":{\"networkFabricId\":\"pgrmwdwlraeplpf\",\"vlanId\":1919071191,\"mtu\":1182594900,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"aba\",\"lastOperation\":{\"details\":\"sizao\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"dxsjsox\"},\"identity\":{\"principalId\":\"uungdv\",\"tenantId\":\"drcpqu\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"mitmtkcqixgqxs\":{\"principalId\":\"ttvo\",\"clientId\":\"rpeli\"},\"umecqyia\":{\"principalId\":\"ev\",\"clientId\":\"uvupdsafqaghw\"},\"mtbpnhjo\":{\"principalId\":\"mvvkodkqffhu\",\"clientId\":\"xqtgzvzcfmwfogjr\"}}},\"location\":\"vfz\",\"tags\":{\"apyq\":\"rmp\",\"lmw\":\"esginpixhulf\",\"kwrvtflotjizvi\":\"vj\"},\"id\":\"wixlvnwznfxap\",\"name\":\"lsl\",\"type\":\"bdtrwkpely\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2IsolationDomain response = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("xdhkoex", "rhgnakajwscmneev", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("cnvgzshfafbeh", "aeiuex", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hk", response.location()); - Assertions.assertEquals("cbicfecthotb", response.tags().get("jwhz")); - Assertions.assertEquals("umqeu", response.networkFabricId()); - Assertions.assertEquals(1939344941, response.vlanId()); - Assertions.assertEquals(1221835156, response.mtu()); - Assertions.assertEquals("vjqutxrbgbzgfhzd", response.annotation()); + Assertions.assertEquals("vfz", response.location()); + Assertions.assertEquals("rmp", response.tags().get("apyq")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("pgrmwdwlraeplpf", response.networkFabricId()); + Assertions.assertEquals(1919071191, response.vlanId()); + Assertions.assertEquals(1182594900, response.mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, response.extendedVlan()); + Assertions.assertEquals("aba", response.networkToNetworkInterconnectId()); + Assertions.assertEquals("dxsjsox", response.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java index f79966c2a406..249010ee841f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,23 +24,27 @@ public final class L2IsolationDomainsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"szhh\",\"vlanId\":1061055925,\"mtu\":2093232505,\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"lffqgdodn\"},\"location\":\"yipgkmjt\",\"tags\":{\"tgdrfzj\":\"mdzesime\",\"gvd\":\"flz\",\"rzbidaebez\":\"vabxiefc\"},\"id\":\"icew\",\"name\":\"fajw\",\"type\":\"ylciobb\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"a\",\"vlanId\":1903487234,\"mtu\":1935035671,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"hwnithxnainssvrk\",\"lastOperation\":{\"details\":\"ylioguwshrmcpbm\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"bblwkqztqrnreyjf\"},\"identity\":{\"principalId\":\"weevtunjdclu\",\"tenantId\":\"sjfpsyq\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"xz\":{\"principalId\":\"mfkexhiwmkl\",\"clientId\":\"kgxcewzg\"},\"efilncyqnkp\":{\"principalId\":\"tcrccttedzyz\",\"clientId\":\"sjuthsy\"},\"tm\":{\"principalId\":\"fmpz\",\"clientId\":\"erjckzxdlupgt\"},\"yzgrrllzxx\":{\"principalId\":\"zbfoiavpglntnsi\",\"clientId\":\"yitjwsd\"}}},\"location\":\"mhenqn\",\"tags\":{\"bxvexusjfjuphjju\":\"mk\",\"atl\":\"ksvjtgpy\",\"xqmmxjdk\":\"si\"},\"id\":\"yzil\",\"name\":\"lfgow\",\"type\":\"vx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.l2IsolationDomains().listByResourceGroup("o", com.azure.core.util.Context.NONE); + = manager.l2IsolationDomains().listByResourceGroup("lfwmajl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yipgkmjt", response.iterator().next().location()); - Assertions.assertEquals("mdzesime", response.iterator().next().tags().get("tgdrfzj")); - Assertions.assertEquals("szhh", response.iterator().next().networkFabricId()); - Assertions.assertEquals(1061055925, response.iterator().next().vlanId()); - Assertions.assertEquals(2093232505, response.iterator().next().mtu()); - Assertions.assertEquals("lffqgdodn", response.iterator().next().annotation()); + Assertions.assertEquals("mhenqn", response.iterator().next().location()); + Assertions.assertEquals("mk", response.iterator().next().tags().get("bxvexusjfjuphjju")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("a", response.iterator().next().networkFabricId()); + Assertions.assertEquals(1903487234, response.iterator().next().vlanId()); + Assertions.assertEquals(1935035671, response.iterator().next().mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, response.iterator().next().extendedVlan()); + Assertions.assertEquals("hwnithxnainssvrk", response.iterator().next().networkToNetworkInterconnectId()); + Assertions.assertEquals("bblwkqztqrnreyjf", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java index 80211044f3cf..e8038f39526a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,22 +24,26 @@ public final class L2IsolationDomainsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"wwsr\",\"vlanId\":703090542,\"mtu\":2082392760,\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"annotation\":\"xs\"},\"location\":\"teevfgaxfez\",\"tags\":{\"kyrxgmzzeglwd\":\"sddkodkgxq\",\"kkraj\":\"fsspfegaoksd\"},\"id\":\"yuklxkel\",\"name\":\"zpyqbwhuecx\",\"type\":\"gsingmhpavsfg\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"qruskmbqyfecns\",\"vlanId\":338404464,\"mtu\":969808172,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"gmkc\",\"lastOperation\":{\"details\":\"zibhwybwmeb\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"x\"},\"identity\":{\"principalId\":\"p\",\"tenantId\":\"ksixhornvydx\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"hbwhr\":{\"principalId\":\"eayjd\",\"clientId\":\"tiqwixsdxxflwfv\"},\"ciwxlggrtpay\":{\"principalId\":\"qetvbqhysz\",\"clientId\":\"zjz\"},\"qznvkhjtrashnf\":{\"principalId\":\"l\",\"clientId\":\"shbkdptcm\"},\"af\":{\"principalId\":\"iykloeqxccpqbo\",\"clientId\":\"ehzipy\"}}},\"location\":\"uvoqqseoinxko\",\"tags\":{\"dczzkz\":\"nlgnwwjikgp\",\"hhiofcnyzqznld\":\"bpj\",\"gs\":\"ngqwmllegucem\"},\"id\":\"ljwwpzqhphl\",\"name\":\"jmi\",\"type\":\"qvn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("teevfgaxfez", response.iterator().next().location()); - Assertions.assertEquals("sddkodkgxq", response.iterator().next().tags().get("kyrxgmzzeglwd")); - Assertions.assertEquals("wwsr", response.iterator().next().networkFabricId()); - Assertions.assertEquals(703090542, response.iterator().next().vlanId()); - Assertions.assertEquals(2082392760, response.iterator().next().mtu()); - Assertions.assertEquals("xs", response.iterator().next().annotation()); + Assertions.assertEquals("uvoqqseoinxko", response.iterator().next().location()); + Assertions.assertEquals("nlgnwwjikgp", response.iterator().next().tags().get("dczzkz")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("qruskmbqyfecns", response.iterator().next().networkFabricId()); + Assertions.assertEquals(338404464, response.iterator().next().vlanId()); + Assertions.assertEquals(969808172, response.iterator().next().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, response.iterator().next().extendedVlan()); + Assertions.assertEquals("gmkc", response.iterator().next().networkToNetworkInterconnectId()); + Assertions.assertEquals("x", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java index 6b835a8ff347..54d43dec0818 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java @@ -1,67 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class L2IsolationDomainsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"lmdgglmepjp\",\"vlanId\":188221031,\"mtu\":978481957,\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"szngafpgyl\"},\"location\":\"ecjujcng\",\"tags\":{\"oknub\":\"yedmzrgj\",\"coqra\":\"oitpkpztrgdgx\",\"qi\":\"wugyx\"},\"id\":\"we\",\"name\":\"alwvskbu\",\"type\":\"z\"},{\"properties\":{\"networkFabricId\":\"caqt\",\"vlanId\":1536605508,\"mtu\":324493870,\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"sxzakuejkm\"},\"location\":\"iztjof\",\"tags\":{\"yeji\":\"ovjufycsjmlbe\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\",\"ialwc\":\"nhii\"},\"id\":\"gckbb\",\"name\":\"ccgzpraoxnyu\",\"type\":\"fa\"}],\"nextLink\":\"gftipwc\"}") + "{\"value\":[{\"properties\":{\"networkFabricId\":\"gl\",\"vlanId\":587916896,\"mtu\":774422918,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"ywhsbrcarycs\",\"lastOperation\":{\"details\":\"yvoaqajuvehzp\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"annotation\":\"mpfu\"},\"identity\":{\"principalId\":\"efgybpmfbfununmp\",\"tenantId\":\"rvfyifkdsch\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"fp\":{\"principalId\":\"ctnkjjwgcwnph\",\"clientId\":\"gfyrtogmhmjpjsc\"}}},\"location\":\"wtyg\",\"tags\":{\"x\":\"wmseharxifvqn\",\"sidqpxlbtpakft\":\"mbpjptnvwjh\",\"rymdwmf\":\"gatwmykyu\"},\"id\":\"hpycvjqdvdwkq\",\"name\":\"ldrlefgnaavua\",\"type\":\"n\"},{\"properties\":{\"networkFabricId\":\"etaoutnpdc\",\"vlanId\":1340286391,\"mtu\":2065842575,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"fyihduyeuyldp\",\"lastOperation\":{\"details\":\"ybkcgsuthhllnmwy\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"ciatxtjrrl\"},\"identity\":{\"principalId\":\"skjh\",\"tenantId\":\"dl\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ttcslojfkqi\":{\"principalId\":\"cxscvslxlh\",\"clientId\":\"vkrmukmyjmkx\"},\"l\":{\"principalId\":\"qtoqxjhqxcsq\",\"clientId\":\"kbtn\"},\"muqqoajxei\":{\"principalId\":\"gldmbiipsnaww\",\"clientId\":\"kznxhhllxricctk\"}}},\"location\":\"lesrwva\",\"tags\":{\"dmljzacvumepjp\":\"dctrceqnkbrupobe\",\"hep\":\"ibnzp\",\"cgxvrpj\":\"fexleqirccjcly\"},\"id\":\"vczuodacpune\",\"name\":\"tepdjxqes\",\"type\":\"oy\"}],\"nextLink\":\"iylpck\"}") .toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("ecjujcng", model.value().get(0).location()); - Assertions.assertEquals("yedmzrgj", model.value().get(0).tags().get("oknub")); - Assertions.assertEquals("lmdgglmepjp", model.value().get(0).networkFabricId()); - Assertions.assertEquals(188221031, model.value().get(0).vlanId()); - Assertions.assertEquals(978481957, model.value().get(0).mtu()); - Assertions.assertEquals("szngafpgyl", model.value().get(0).annotation()); - Assertions.assertEquals("gftipwc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainsListResult model = new L2IsolationDomainsListResult().withValue(Arrays.asList( - new L2IsolationDomainInner().withLocation("ecjujcng") - .withTags(mapOf("oknub", "yedmzrgj", "coqra", "oitpkpztrgdgx", "qi", "wugyx")) - .withNetworkFabricId("lmdgglmepjp") - .withVlanId(188221031) - .withMtu(978481957) - .withAnnotation("szngafpgyl"), - new L2IsolationDomainInner().withLocation("iztjof") - .withTags(mapOf("yeji", "ovjufycsjmlbe", "rtudawlpjfel", "iuxegth", "bgqnz", "erppt", "ialwc", "nhii")) - .withNetworkFabricId("caqt") - .withVlanId(1536605508) - .withMtu(324493870) - .withAnnotation("sxzakuejkm"))) - .withNextLink("gftipwc"); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("ecjujcng", model.value().get(0).location()); - Assertions.assertEquals("yedmzrgj", model.value().get(0).tags().get("oknub")); - Assertions.assertEquals("lmdgglmepjp", model.value().get(0).networkFabricId()); - Assertions.assertEquals(188221031, model.value().get(0).vlanId()); - Assertions.assertEquals(978481957, model.value().get(0).mtu()); - Assertions.assertEquals("szngafpgyl", model.value().get(0).annotation()); - Assertions.assertEquals("gftipwc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("wtyg", model.value().get(0).location()); + Assertions.assertEquals("wmseharxifvqn", model.value().get(0).tags().get("x")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("gl", model.value().get(0).networkFabricId()); + Assertions.assertEquals(587916896, model.value().get(0).vlanId()); + Assertions.assertEquals(774422918, model.value().get(0).mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.value().get(0).extendedVlan()); + Assertions.assertEquals("ywhsbrcarycs", model.value().get(0).networkToNetworkInterconnectId()); + Assertions.assertEquals("mpfu", model.value().get(0).annotation()); + Assertions.assertEquals("iylpck", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..f8c865e8c2a2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class L3ExportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3ExportRoutePolicyPatch model + = BinaryData.fromString("{\"exportIpv4RoutePolicyId\":\"eukyaw\",\"exportIpv6RoutePolicyId\":\"pmwhqnuc\"}") + .toObject(L3ExportRoutePolicyPatch.class); + Assertions.assertEquals("eukyaw", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("pmwhqnuc", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3ExportRoutePolicyPatch model = new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("eukyaw") + .withExportIpv6RoutePolicyId("pmwhqnuc"); + model = BinaryData.fromObject(model).toObject(L3ExportRoutePolicyPatch.class); + Assertions.assertEquals("eukyaw", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("pmwhqnuc", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java index 759ce44f7e40..bd710c9c1c14 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,19 @@ public final class L3ExportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3ExportRoutePolicy model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"ipxgzdy\",\"exportIpv6RoutePolicyId\":\"sfayorpravkjoges\"}") + .fromString( + "{\"exportIpv4RoutePolicyId\":\"lwkzpgajsqjcem\",\"exportIpv6RoutePolicyId\":\"mfuvqarwzxuqr\"}") .toObject(L3ExportRoutePolicy.class); - Assertions.assertEquals("ipxgzdy", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("sfayorpravkjoges", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("lwkzpgajsqjcem", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("mfuvqarwzxuqr", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3ExportRoutePolicy model = new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("ipxgzdy") - .withExportIpv6RoutePolicyId("sfayorpravkjoges"); + L3ExportRoutePolicy model = new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("lwkzpgajsqjcem") + .withExportIpv6RoutePolicyId("mfuvqarwzxuqr"); model = BinaryData.fromObject(model).toObject(L3ExportRoutePolicy.class); - Assertions.assertEquals("ipxgzdy", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("sfayorpravkjoges", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("lwkzpgajsqjcem", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("mfuvqarwzxuqr", model.exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java index 02e3136bc9e3..a5e3f5a1c44e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,10 +8,18 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,54 +29,83 @@ public final class L3IsolationDomainInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"byubhiqdxyurnpn\",\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"yl\"}],\"ipv6Routes\":[{\"prefix\":\"gvxvatv\"},{\"prefix\":\"rkdlb\"},{\"prefix\":\"bqxvhcsyhzlwxae\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ur\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ndsbdw\",\"exportIpv6RoutePolicyId\":\"derzmwnto\"}},\"annotation\":\"gttmvmmagoaqyl\"},\"location\":\"ztj\",\"tags\":{\"xitp\":\"zjcg\",\"tbdrvcqgue\":\"inzcpdltkrlgj\",\"eqdurelyujlfyoum\":\"zhomp\",\"brzmqxucycijoclx\":\"ckyeclcdigpta\"},\"id\":\"utgjcyz\",\"name\":\"zjd\",\"type\":\"r\"}") + "{\"properties\":{\"annotation\":\"wsedvesk\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"gfnzh\"},{\"prefix\":\"tmjtsghp\"}],\"ipv6Routes\":[{\"prefix\":\"cp\"},{\"prefix\":\"arpzeqacdldtzm\"},{\"prefix\":\"ypefcpczshnuqnda\"},{\"prefix\":\"zupfkhuytuszxhm\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"egw\",\"exportIpv6RoutePolicyId\":\"ukvzwydwttha\"}},\"networkFabricId\":\"kgkskjivbsshaj\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"peexpgeumilhwuit\",\"exportIpv6RoutePolicyId\":\"exyionofninbd\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"cw\",\"qrs\",\"pcbbprtugav\"]},\"v4routePrefixLimit\":{\"hardLimit\":45512614,\"threshold\":439270672},\"v6routePrefixLimit\":{\"hardLimit\":357896673,\"threshold\":284686585},\"lastOperation\":{\"details\":\"dr\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"LocalRib\",\"All\"]},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"identity\":{\"principalId\":\"xsgm\",\"tenantId\":\"wvif\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"funlcpxxvi\":{\"principalId\":\"if\",\"clientId\":\"cjxwkloozrvtxvcm\"}}},\"location\":\"eyngjg\",\"tags\":{\"gglpmcrdcuelj\":\"uvp\"},\"id\":\"iahxmfqryarvs\",\"name\":\"zqbglcjkays\",\"type\":\"thzodubtlmjtgbl\"}") .toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("ztj", model.location()); - Assertions.assertEquals("zjcg", model.tags().get("xitp")); - Assertions.assertEquals("byubhiqdxyurnpn", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals("eyngjg", model.location()); + Assertions.assertEquals("uvp", model.tags().get("gglpmcrdcuelj")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("wsedvesk", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gvxvatv", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ur", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ndsbdw", + Assertions.assertEquals("gfnzh", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("cp", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("egw", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("derzmwnto", + Assertions.assertEquals("ukvzwydwttha", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("gttmvmmagoaqyl", model.annotation()); + Assertions.assertEquals("kgkskjivbsshaj", model.networkFabricId()); + Assertions.assertEquals("peexpgeumilhwuit", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("exyionofninbd", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(45512614, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(439270672, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(357896673, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(284686585, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicyConfiguration().exportPolicies().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainInner model - = new L3IsolationDomainInner().withLocation("ztj") - .withTags(mapOf("xitp", "zjcg", "tbdrvcqgue", "inzcpdltkrlgj", "eqdurelyujlfyoum", "zhomp", - "brzmqxucycijoclx", "ckyeclcdigpta")) - .withNetworkFabricId("byubhiqdxyurnpn") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("yl"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("gvxvatv"), - new AggregateRoute().withPrefix("rkdlb"), new AggregateRoute().withPrefix("bqxvhcsyhzlwxae")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ur") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("ndsbdw") - .withExportIpv6RoutePolicyId("derzmwnto"))) - .withAnnotation("gttmvmmagoaqyl"); + L3IsolationDomainInner model = new L3IsolationDomainInner().withLocation("eyngjg") + .withTags(mapOf("gglpmcrdcuelj", "uvp")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("funlcpxxvi", new UserAssignedIdentity()))) + .withAnnotation("wsedvesk") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .withAggregateRouteConfiguration(new AggregateRouteConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("gfnzh"), + new AggregateRoute().withPrefix("tmjtsghp"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("cp"), + new AggregateRoute().withPrefix("arpzeqacdldtzm"), + new AggregateRoute().withPrefix("ypefcpczshnuqnda"), + new AggregateRoute().withPrefix("zupfkhuytuszxhm")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("egw") + .withExportIpv6RoutePolicyId("ukvzwydwttha"))) + .withNetworkFabricId("kgkskjivbsshaj") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("peexpgeumilhwuit") + .withExportIpv6RoutePolicyId("exyionofninbd"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withV4routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(45512614).withThreshold(439270672)) + .withV6routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(357896673).withThreshold(284686585)) + .withExportPolicyConfiguration(new BmpExportPolicyProperties().withExportPolicies( + Arrays.asList(BmpExportPolicy.LOCAL_RIB, BmpExportPolicy.LOCAL_RIB, BmpExportPolicy.ALL))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("ztj", model.location()); - Assertions.assertEquals("zjcg", model.tags().get("xitp")); - Assertions.assertEquals("byubhiqdxyurnpn", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals("eyngjg", model.location()); + Assertions.assertEquals("uvp", model.tags().get("gglpmcrdcuelj")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("wsedvesk", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gvxvatv", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ur", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ndsbdw", + Assertions.assertEquals("gfnzh", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("cp", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("egw", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("derzmwnto", + Assertions.assertEquals("ukvzwydwttha", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("gttmvmmagoaqyl", model.annotation()); + Assertions.assertEquals("kgkskjivbsshaj", model.networkFabricId()); + Assertions.assertEquals("peexpgeumilhwuit", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("exyionofninbd", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(45512614, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(439270672, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(357896673, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(284686585, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicyConfiguration().exportPolicies().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java index f1f93670a1cf..255a6cfe8350 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java @@ -1,17 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,44 +23,66 @@ public final class L3IsolationDomainPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainPatchProperties model = BinaryData.fromString( - "{\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"wkd\"}],\"ipv6Routes\":[{\"prefix\":\"rucpcunnuz\"},{\"prefix\":\"qumoeno\"},{\"prefix\":\"naie\"},{\"prefix\":\"hqhsknd\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"qkaadlknw\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"nniyopetxi\",\"exportIpv6RoutePolicyId\":\"nrlyxnuc\"}},\"annotation\":\"p\"}") + "{\"annotation\":\"u\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"vvoqsbpkf\"},{\"prefix\":\"anfkgxsyaowuzow\"},{\"prefix\":\"uohdkcprgukxr\"},{\"prefix\":\"tiochlutixmqr\"}],\"ipv6Routes\":[{\"prefix\":\"izcbfzmcrunfhiuc\"},{\"prefix\":\"mfbcpaqktkrum\"},{\"prefix\":\"u\"},{\"prefix\":\"dkyzbfvxov\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"uxqggvqrnhyhl\",\"exportIpv6RoutePolicyId\":\"j\"}},\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jhffbxrqrkij\",\"exportIpv6RoutePolicyId\":\"uqlsdx\"}},\"v4routePrefixLimit\":{\"hardLimit\":1926210807,\"threshold\":219641959},\"v6routePrefixLimit\":{\"hardLimit\":1260182845,\"threshold\":1828893529},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"Pre-Policy\"]}}") .toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals("p", model.annotation()); + Assertions.assertEquals("u", model.annotation()); Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("wkd", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rucpcunnuz", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qkaadlknw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("nniyopetxi", + Assertions.assertEquals("vvoqsbpkf", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("izcbfzmcrunfhiuc", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("uxqggvqrnhyhl", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("nrlyxnuc", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("j", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("jhffbxrqrkij", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("uqlsdx", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1926210807, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(219641959, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(1260182845, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1828893529, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainPatchProperties model - = new L3IsolationDomainPatchProperties().withAnnotation("p") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("wkd"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("rucpcunnuz"), - new AggregateRoute().withPrefix("qumoeno"), new AggregateRoute().withPrefix("naie"), - new AggregateRoute().withPrefix("hqhsknd")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("qkaadlknw") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("nniyopetxi") - .withExportIpv6RoutePolicyId("nrlyxnuc"))); + L3IsolationDomainPatchProperties model = new L3IsolationDomainPatchProperties().withAnnotation("u") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("vvoqsbpkf"), + new AggregateRoute().withPrefix("anfkgxsyaowuzow"), + new AggregateRoute().withPrefix("uohdkcprgukxr"), new AggregateRoute().withPrefix("tiochlutixmqr"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("izcbfzmcrunfhiuc"), + new AggregateRoute().withPrefix("mfbcpaqktkrum"), new AggregateRoute().withPrefix("u"), + new AggregateRoute().withPrefix("dkyzbfvxov")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("uxqggvqrnhyhl") + .withExportIpv6RoutePolicyId("j"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("jhffbxrqrkij") + .withExportIpv6RoutePolicyId("uqlsdx"))) + .withV4routePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(1926210807).withThreshold(219641959)) + .withV6routePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(1260182845).withThreshold(1828893529)) + .withExportPolicyConfiguration(new BmpExportPolicyPatchProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY, BmpExportPolicy.PRE_POLICY))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals("p", model.annotation()); + Assertions.assertEquals("u", model.annotation()); Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("wkd", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rucpcunnuz", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qkaadlknw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("nniyopetxi", + Assertions.assertEquals("vvoqsbpkf", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("izcbfzmcrunfhiuc", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("uxqggvqrnhyhl", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("nrlyxnuc", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("j", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("jhffbxrqrkij", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("uqlsdx", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1926210807, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(219641959, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(1260182845, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1828893529, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.exportPolicyConfiguration().exportPolicies().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java index 343ea287f051..42bd3822492d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java @@ -1,17 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,47 +28,81 @@ public final class L3IsolationDomainPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainPatch model = BinaryData.fromString( - "{\"properties\":{\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ynq\"},{\"prefix\":\"aekqsykvwj\"},{\"prefix\":\"qpkevmyltjc\"},{\"prefix\":\"spxklu\"}],\"ipv6Routes\":[{\"prefix\":\"lfg\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"n\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"t\",\"exportIpv6RoutePolicyId\":\"osewxi\"}},\"annotation\":\"xvkqm\"},\"tags\":{\"f\":\"xvpif\",\"yzeyuubeid\":\"ify\",\"gygvfltgvdiho\":\"zlfytoit\"}}") + "{\"properties\":{\"annotation\":\"bavly\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"rkeb\"},{\"prefix\":\"mhpdu\"},{\"prefix\":\"dig\"}],\"ipv6Routes\":[{\"prefix\":\"lekscbctnanqi\"},{\"prefix\":\"wbzxpdcldpkawn\"},{\"prefix\":\"nlaimouxwksqmudm\"},{\"prefix\":\"coibicziuswswjrk\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"hbtqqvyfscyrfwb\",\"exportIpv6RoutePolicyId\":\"qvogfuyz\"}},\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"limbyqecroodlik\",\"exportIpv6RoutePolicyId\":\"rdaasaxxo\"}},\"v4routePrefixLimit\":{\"hardLimit\":1865082101,\"threshold\":11688973},\"v6routePrefixLimit\":{\"hardLimit\":182713593,\"threshold\":1018773486},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\",\"Pre-Policy\",\"Post-Policy\",\"Pre-Policy\"]}},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vym\":{\"principalId\":\"n\",\"clientId\":\"ywsxvjabjqqaxu\"},\"nsqxtltc\":{\"principalId\":\"udndoabhjxw\",\"clientId\":\"weuipmpvksmi\"},\"rcwfcmfcnrjajq\":{\"principalId\":\"rdpqgfhy\",\"clientId\":\"rakkld\"}}},\"tags\":{\"bbmtlpqagynoip\":\"xjtielnzqgxxg\",\"calincryqxz\":\"n\",\"mqimiymqru\":\"aqzi\"}}") .toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xvpif", model.tags().get("f")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ynq", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lfg", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("t", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("osewxi", + Assertions.assertEquals("xjtielnzqgxxg", model.tags().get("bbmtlpqagynoip")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("bavly", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("rkeb", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("lekscbctnanqi", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hbtqqvyfscyrfwb", + model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qvogfuyz", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xvkqm", model.annotation()); + Assertions.assertEquals("limbyqecroodlik", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rdaasaxxo", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1865082101, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(11688973, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(182713593, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1018773486, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicyConfiguration().exportPolicies().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L3IsolationDomainPatch model = new L3IsolationDomainPatch() - .withTags(mapOf("f", "xvpif", "yzeyuubeid", "ify", "gygvfltgvdiho", "zlfytoit")) - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes( - Arrays.asList(new AggregateRoute().withPrefix("ynq"), new AggregateRoute().withPrefix("aekqsykvwj"), - new AggregateRoute().withPrefix("qpkevmyltjc"), new AggregateRoute().withPrefix("spxklu"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("lfg")))) - .withConnectedSubnetRoutePolicy( - new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("n") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("t") - .withExportIpv6RoutePolicyId("osewxi"))) - .withAnnotation("xvkqm"); + .withTags(mapOf("bbmtlpqagynoip", "xjtielnzqgxxg", "calincryqxz", "n", "mqimiymqru", "aqzi")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("vym", new UserAssignedIdentity(), "nsqxtltc", + new UserAssignedIdentity(), "rcwfcmfcnrjajq", new UserAssignedIdentity()))) + .withAnnotation("bavly") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("rkeb"), + new AggregateRoute().withPrefix("mhpdu"), new AggregateRoute().withPrefix("dig"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("lekscbctnanqi"), + new AggregateRoute().withPrefix("wbzxpdcldpkawn"), + new AggregateRoute().withPrefix("nlaimouxwksqmudm"), + new AggregateRoute().withPrefix("coibicziuswswjrk")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("hbtqqvyfscyrfwb") + .withExportIpv6RoutePolicyId("qvogfuyz"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("limbyqecroodlik") + .withExportIpv6RoutePolicyId("rdaasaxxo"))) + .withV4routePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(1865082101).withThreshold(11688973)) + .withV6routePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(182713593).withThreshold(1018773486)) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.ALL, + BmpExportPolicy.PRE_POLICY, BmpExportPolicy.POST_POLICY, BmpExportPolicy.PRE_POLICY))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xvpif", model.tags().get("f")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ynq", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lfg", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("t", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("osewxi", + Assertions.assertEquals("xjtielnzqgxxg", model.tags().get("bbmtlpqagynoip")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("bavly", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("rkeb", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("lekscbctnanqi", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hbtqqvyfscyrfwb", + model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qvogfuyz", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xvkqm", model.annotation()); + Assertions.assertEquals("limbyqecroodlik", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rdaasaxxo", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1865082101, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(11688973, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(182713593, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1018773486, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicyConfiguration().exportPolicies().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.java deleted file mode 100644 index 9aef3875d48e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainPatchableProperties model = BinaryData.fromString( - "{\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"oiqtamtyvskn\"},{\"prefix\":\"rwzawnvs\"}],\"ipv6Routes\":[{\"prefix\":\"hzagxnvhycvdimw\"},{\"prefix\":\"zregzgyufutrwpw\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ekzkdhmeottaw\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"sxwwhnhjtf\",\"exportIpv6RoutePolicyId\":\"n\"}}}") - .toObject(L3IsolationDomainPatchableProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("oiqtamtyvskn", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hzagxnvhycvdimw", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ekzkdhmeottaw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("sxwwhnhjtf", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainPatchableProperties model = new L3IsolationDomainPatchableProperties() - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("oiqtamtyvskn"), - new AggregateRoute().withPrefix("rwzawnvs"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("hzagxnvhycvdimw"), - new AggregateRoute().withPrefix("zregzgyufutrwpw")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ekzkdhmeottaw") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("sxwwhnhjtf") - .withExportIpv6RoutePolicyId("n"))); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchableProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("oiqtamtyvskn", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hzagxnvhycvdimw", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ekzkdhmeottaw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("sxwwhnhjtf", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java index 17979bd942de..09d5d12a3450 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,10 +8,15 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainProperties; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,45 +24,69 @@ public final class L3IsolationDomainPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"jb\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"fwwvuatbwbqam\"}],\"ipv6Routes\":[{\"prefix\":\"liys\"},{\"prefix\":\"pkcvmwf\"},{\"prefix\":\"uxx\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ywbo\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qmiciijqp\",\"exportIpv6RoutePolicyId\":\"fbojxjmcsmyqwix\"}},\"annotation\":\"pwnkwywzwo\"}") + "{\"annotation\":\"skkfmk\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"bkkqvjcte\"},{\"prefix\":\"edlrslskkzpxvj\"},{\"prefix\":\"zdpv\"},{\"prefix\":\"cojhpcnabx\"}],\"ipv6Routes\":[{\"prefix\":\"nggy\"},{\"prefix\":\"e\"},{\"prefix\":\"vzilmhiv\"},{\"prefix\":\"kwwwnckn\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jlskzptjxulweu\",\"exportIpv6RoutePolicyId\":\"rthxqlehmcg\"}},\"networkFabricId\":\"jei\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"oka\",\"exportIpv6RoutePolicyId\":\"fejvqn\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"q\"]},\"v4routePrefixLimit\":{\"hardLimit\":2120944830,\"threshold\":1689217282},\"v6routePrefixLimit\":{\"hardLimit\":955211490,\"threshold\":1634987972},\"lastOperation\":{\"details\":\"thhzagjfw\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"Pre-Policy\",\"Post-Policy\",\"All\"]},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("pwnkwywzwo", model.annotation()); - Assertions.assertEquals("jb", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("fwwvuatbwbqam", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("liys", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ywbo", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("qmiciijqp", + Assertions.assertEquals("skkfmk", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("bkkqvjcte", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nggy", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jlskzptjxulweu", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fbojxjmcsmyqwix", + Assertions.assertEquals("rthxqlehmcg", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("jei", model.networkFabricId()); + Assertions.assertEquals("oka", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("fejvqn", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(2120944830, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1689217282, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(955211490, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1634987972, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicyConfiguration().exportPolicies().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainProperties model = new L3IsolationDomainProperties().withAnnotation("pwnkwywzwo") - .withNetworkFabricId("jb") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + L3IsolationDomainProperties model = new L3IsolationDomainProperties().withAnnotation("skkfmk") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("fwwvuatbwbqam"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("liys"), - new AggregateRoute().withPrefix("pkcvmwf"), new AggregateRoute().withPrefix("uxx")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ywbo") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("qmiciijqp") - .withExportIpv6RoutePolicyId("fbojxjmcsmyqwix"))); + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("bkkqvjcte"), + new AggregateRoute().withPrefix("edlrslskkzpxvj"), new AggregateRoute().withPrefix("zdpv"), + new AggregateRoute().withPrefix("cojhpcnabx"))) + .withIpv6Routes( + Arrays.asList(new AggregateRoute().withPrefix("nggy"), new AggregateRoute().withPrefix("e"), + new AggregateRoute().withPrefix("vzilmhiv"), new AggregateRoute().withPrefix("kwwwnckn")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("jlskzptjxulweu") + .withExportIpv6RoutePolicyId("rthxqlehmcg"))) + .withNetworkFabricId("jei") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy().withExportRoutePolicy( + new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("oka").withExportIpv6RoutePolicyId("fejvqn"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withV4routePrefixLimit( + new RoutePrefixLimitProperties().withHardLimit(2120944830).withThreshold(1689217282)) + .withV6routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(955211490).withThreshold(1634987972)) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.LOCAL_RIB, + BmpExportPolicy.PRE_POLICY, BmpExportPolicy.POST_POLICY, BmpExportPolicy.ALL))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("pwnkwywzwo", model.annotation()); - Assertions.assertEquals("jb", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("fwwvuatbwbqam", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("liys", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ywbo", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("qmiciijqp", + Assertions.assertEquals("skkfmk", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("bkkqvjcte", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nggy", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jlskzptjxulweu", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fbojxjmcsmyqwix", + Assertions.assertEquals("rthxqlehmcg", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("jei", model.networkFabricId()); + Assertions.assertEquals("oka", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("fejvqn", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(2120944830, model.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1689217282, model.v4routePrefixLimit().threshold()); + Assertions.assertEquals(955211490, model.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1634987972, model.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.exportPolicyConfiguration().exportPolicies().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java index e23c1e16e618..b65d95990984 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java @@ -1,22 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -30,49 +38,69 @@ public final class L3IsolationDomainsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"qr\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"lcrqaxlmbr\"}],\"ipv6Routes\":[{\"prefix\":\"golmlplg\"},{\"prefix\":\"layyxhxjvoys\"},{\"prefix\":\"aqqjh\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"faob\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"csbozvcdqw\",\"exportIpv6RoutePolicyId\":\"ydvwr\"}},\"annotation\":\"ivywotjnjuvtzijr\"},\"location\":\"xbaeyocpkvlt\",\"tags\":{\"oztnhvd\":\"zfmnpbdrcibjxnn\"},\"id\":\"u\",\"name\":\"amqobqehs\",\"type\":\"sht\"}"; + = "{\"properties\":{\"annotation\":\"zcjmsrorjby\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"bysxtjivw\"}],\"ipv6Routes\":[{\"prefix\":\"gicyctak\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"holsmahbj\",\"exportIpv6RoutePolicyId\":\"vskqxgb\"}},\"networkFabricId\":\"gozr\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"aurlysseocppgsfj\",\"exportIpv6RoutePolicyId\":\"gmogmcjn\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"bwyp\"]},\"v4routePrefixLimit\":{\"hardLimit\":542664884,\"threshold\":1654178759},\"v6routePrefixLimit\":{\"hardLimit\":130607440,\"threshold\":1142591124},\"lastOperation\":{\"details\":\"zflwlko\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\"]},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"identity\":{\"principalId\":\"wpmrlgjjqsxfptv\",\"tenantId\":\"vrejkvc\",\"type\":\"None\",\"userAssignedIdentities\":{\"vgotbjnxozi\":{\"principalId\":\"d\",\"clientId\":\"hhwtgcgefayc\"},\"vms\":{\"principalId\":\"xnpov\",\"clientId\":\"xl\"},\"eahgsibldxyaqdaa\":{\"principalId\":\"isupnxthuozdvo\",\"clientId\":\"uyhhrdikdb\"}}},\"location\":\"zaxzfhhh\",\"tags\":{\"kf\":\"kgnrya\",\"dhkdwyehqn\":\"xauihnb\",\"fgjynmin\":\"u\",\"p\":\"vdkqigppdqsqs\"},\"id\":\"eaxthuhuruouqy\",\"name\":\"tapstkdbnqjpcuz\",\"type\":\"xoymfkumbysgsqz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - L3IsolationDomain response - = manager.l3IsolationDomains() - .define("paptgvnaqyjuk") - .withRegion("ktthbmrrmtrx") - .withExistingResourceGroup("itn") - .withNetworkFabricId("ajnnewltonop") - .withTags(mapOf("zwawpewajc", "pdvr", "guzprpxhhboigzxk", "sdjuzmuijtickzo", "va", "pqlrzhtocjzfppex")) - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("hzbfcdikqn"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("gzfo"), - new AggregateRoute().withPrefix("qz"), new AggregateRoute().withPrefix("uspaywvs"), - new AggregateRoute().withPrefix("qeron")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("fkxfmuwdbv") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("avouymkd") - .withExportIpv6RoutePolicyId("qxlv"))) - .withAnnotation("fdkaxgbiwpgop") - .create(); + L3IsolationDomain response = manager.l3IsolationDomains() + .define("behv") + .withRegion("jxxcruleimswxoig") + .withExistingResourceGroup("lbbhtleiwfi") + .withNetworkFabricId("jbcbrtiqpj") + .withTags(mapOf("ijpmeptn", "mjmpgzetuvfp", "eeolmobaqo", "snpafksprrvjw")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf("oxe", new UserAssignedIdentity(), "mqjhg", new UserAssignedIdentity(), "gvudym", + new UserAssignedIdentity(), "slqbaf", new UserAssignedIdentity()))) + .withAnnotation("ghltndsazg") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration(new AggregateRouteConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("agnbhzteninafyag"), + new AggregateRoute().withPrefix("ocvetzkcolbclspq"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("icurufngpbvdl"), + new AggregateRoute().withPrefix("p"), new AggregateRoute().withPrefix("dkiywwenvxu")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("ranbtqejfqgh") + .withExportIpv6RoutePolicyId("drvxbcyeh"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("mhdqlui") + .withExportIpv6RoutePolicyId("qxqjzmosmlh"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withV4routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1371951338).withThreshold(207824970)) + .withV6routePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1106854405).withThreshold(61554079)) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.ALL, BmpExportPolicy.ALL))) + .create(); - Assertions.assertEquals("xbaeyocpkvlt", response.location()); - Assertions.assertEquals("zfmnpbdrcibjxnn", response.tags().get("oztnhvd")); - Assertions.assertEquals("qr", response.networkFabricId()); + Assertions.assertEquals("zaxzfhhh", response.location()); + Assertions.assertEquals("kgnrya", response.tags().get("kf")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("zcjmsrorjby", response.annotation()); Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.redistributeStaticRoutes()); - Assertions.assertEquals("lcrqaxlmbr", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("golmlplg", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("faob", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("csbozvcdqw", + Assertions.assertEquals("bysxtjivw", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gicyctak", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("holsmahbj", response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ydvwr", + Assertions.assertEquals("vskqxgb", response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ivywotjnjuvtzijr", response.annotation()); + Assertions.assertEquals("gozr", response.networkFabricId()); + Assertions.assertEquals("aurlysseocppgsfj", + response.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("gmogmcjn", + response.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(542664884, response.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1654178759, response.v4routePrefixLimit().threshold()); + Assertions.assertEquals(130607440, response.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1142591124, response.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + response.exportPolicyConfiguration().exportPolicies().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java index cb0e69cf6b3f..8e90ac8e2f11 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import java.nio.charset.StandardCharsets; @@ -23,31 +25,41 @@ public final class L3IsolationDomainsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"t\",\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"tnlrlcmwbejyw\"}],\"ipv6Routes\":[{\"prefix\":\"nhw\"},{\"prefix\":\"krmqevrhhafqf\"},{\"prefix\":\"dfyziruqvgnjxi\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"yjmzbmxgikyl\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gmbrdcvolo\",\"exportIpv6RoutePolicyId\":\"vqcbnryh\"}},\"annotation\":\"glvnbenkpsvokky\"},\"location\":\"kxvcptfgfbhnkxas\",\"tags\":{\"a\":\"fe\",\"rdxpcpautfzptr\":\"h\",\"dxcyuwen\":\"dzytrtffvp\"},\"id\":\"qvp\",\"name\":\"awvoqatdjkal\",\"type\":\"pmecsmxfzynf\"}"; + = "{\"properties\":{\"annotation\":\"dow\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"pbieehp\"}],\"ipv6Routes\":[{\"prefix\":\"i\"},{\"prefix\":\"rrjprygjgyovc\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"isma\",\"exportIpv6RoutePolicyId\":\"ktcoykr\"}},\"networkFabricId\":\"kkcxc\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"onxmtrhww\",\"exportIpv6RoutePolicyId\":\"ncqu\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"hzlvkmirnvdbza\",\"mepbmogtfpksk\",\"syoh\",\"rlyynkgnychu\"]},\"v4routePrefixLimit\":{\"hardLimit\":1604188770,\"threshold\":1589362548},\"v6routePrefixLimit\":{\"hardLimit\":803613526,\"threshold\":414573941},\"lastOperation\":{\"details\":\"oeodgnu\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\"]},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"},\"identity\":{\"principalId\":\"yavvexjqd\",\"tenantId\":\"o\",\"type\":\"None\",\"userAssignedIdentities\":{\"awhkdkvaqspbds\":{\"principalId\":\"wxj\",\"clientId\":\"rppmvnoqtwqci\"},\"h\":{\"principalId\":\"tidikxmtmj\",\"clientId\":\"mrjngrjsqtirhab\"},\"thfqcyycx\":{\"principalId\":\"vsdyjmbydrgxvnmt\",\"clientId\":\"uxrdmudwruog\"}}},\"location\":\"lkfjgjlwfssg\",\"tags\":{\"lamd\":\"qvuscmcegyiwzou\",\"o\":\"ffvxnis\",\"zzcdrgtu\":\"wfdtjpsjwlpcxl\"},\"id\":\"oouocafaxvhjrpb\",\"name\":\"rolge\",\"type\":\"sgn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L3IsolationDomain response = manager.l3IsolationDomains() - .getByResourceGroupWithResponse("hn", "z", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("qaqoveqowqodisp", "sxwiicfsbjhha", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kxvcptfgfbhnkxas", response.location()); - Assertions.assertEquals("fe", response.tags().get("a")); - Assertions.assertEquals("t", response.networkFabricId()); + Assertions.assertEquals("lkfjgjlwfssg", response.location()); + Assertions.assertEquals("qvuscmcegyiwzou", response.tags().get("lamd")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("dow", response.annotation()); Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.redistributeStaticRoutes()); - Assertions.assertEquals("tnlrlcmwbejyw", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("nhw", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("yjmzbmxgikyl", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("gmbrdcvolo", + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.redistributeStaticRoutes()); + Assertions.assertEquals("pbieehp", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("i", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("isma", response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("vqcbnryh", + Assertions.assertEquals("ktcoykr", response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("glvnbenkpsvokky", response.annotation()); + Assertions.assertEquals("kkcxc", response.networkFabricId()); + Assertions.assertEquals("onxmtrhww", + response.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ncqu", + response.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1604188770, response.v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1589362548, response.v4routePrefixLimit().threshold()); + Assertions.assertEquals(803613526, response.v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(414573941, response.v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + response.exportPolicyConfiguration().exportPolicies().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java index 88a7c1cf6e08..a884dffe7026 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import java.nio.charset.StandardCharsets; @@ -24,34 +26,43 @@ public final class L3IsolationDomainsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"yqkkpgwgss\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"dsqx\"},{\"prefix\":\"jwdzpvirzyudrqu\"},{\"prefix\":\"rxhxmlfouqpskv\"}],\"ipv6Routes\":[{\"prefix\":\"bpmr\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"jxcqcaczzvwaeztt\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yfydqlyyslgyfyb\",\"exportIpv6RoutePolicyId\":\"vk\"}},\"annotation\":\"rzhshhkbchcazkg\"},\"location\":\"thprgfwhfzhhr\",\"tags\":{\"dcuqddldaoy\":\"rfyyqjcnibzqrs\"},\"id\":\"fztqewq\",\"name\":\"ojesxjhtyzzwqocy\",\"type\":\"oyineuaxpmezit\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"yjahbzbtlmacbwm\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"celrlazcgwnibnd\"}],\"ipv6Routes\":[{\"prefix\":\"jibrxxiaocrwuhu\"},{\"prefix\":\"gwspugnvhtgwad\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"oxqbozezxzwinr\",\"exportIpv6RoutePolicyId\":\"kqobovqlltql\"}},\"networkFabricId\":\"ufkr\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jkcol\",\"exportIpv6RoutePolicyId\":\"qlyputawdmd\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"zq\",\"vkujzofyl\"]},\"v4routePrefixLimit\":{\"hardLimit\":968417237,\"threshold\":1432122734},\"v6routePrefixLimit\":{\"hardLimit\":1623267285,\"threshold\":426196765},\"lastOperation\":{\"details\":\"peb\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"Pre-Policy\",\"All\",\"All\"]},\"configurationState\":\"Accepted\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"identity\":{\"principalId\":\"ldbdnmgui\",\"tenantId\":\"jtoxzxbljpzauugd\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bgmjrvrsqrjco\":{\"principalId\":\"itj\",\"clientId\":\"ismokfdybvy\"},\"xoqaaqjblwqw\":{\"principalId\":\"wrylc\",\"clientId\":\"vxkxgffpvvqwvv\"}}},\"location\":\"evfeugcwt\",\"tags\":{\"swvfrymqqfks\":\"x\",\"dgkbaxygwvtkr\":\"fcxdleohy\",\"sjjqzt\":\"iyuq\",\"meipfotaaqy\":\"p\"},\"id\":\"k\",\"name\":\"oabcoxqaavjkre\",\"type\":\"q\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.l3IsolationDomains().listByResourceGroup("m", com.azure.core.util.Context.NONE); + = manager.l3IsolationDomains().listByResourceGroup("njtxuuwdmrqah", com.azure.core.util.Context.NONE); - Assertions.assertEquals("thprgfwhfzhhr", response.iterator().next().location()); - Assertions.assertEquals("rfyyqjcnibzqrs", response.iterator().next().tags().get("dcuqddldaoy")); - Assertions.assertEquals("yqkkpgwgss", response.iterator().next().networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, + Assertions.assertEquals("evfeugcwt", response.iterator().next().location()); + Assertions.assertEquals("x", response.iterator().next().tags().get("swvfrymqqfks")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("yjahbzbtlmacbwm", response.iterator().next().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("dsqx", + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.iterator().next().redistributeStaticRoutes()); + Assertions.assertEquals("celrlazcgwnibnd", response.iterator().next().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bpmr", + Assertions.assertEquals("jibrxxiaocrwuhu", response.iterator().next().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jxcqcaczzvwaeztt", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("yfydqlyyslgyfyb", + Assertions.assertEquals("oxqbozezxzwinr", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("vk", + Assertions.assertEquals("kqobovqlltql", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("rzhshhkbchcazkg", response.iterator().next().annotation()); + Assertions.assertEquals("ufkr", response.iterator().next().networkFabricId()); + Assertions.assertEquals("jkcol", + response.iterator().next().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qlyputawdmd", + response.iterator().next().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(968417237, response.iterator().next().v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1432122734, response.iterator().next().v4routePrefixLimit().threshold()); + Assertions.assertEquals(1623267285, response.iterator().next().v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(426196765, response.iterator().next().v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + response.iterator().next().exportPolicyConfiguration().exportPolicies().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java index f31e4307c800..539aaed95e86 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import java.nio.charset.StandardCharsets; @@ -24,32 +26,42 @@ public final class L3IsolationDomainsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"guzlweoyxfoaf\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"hlbpjuajzq\"},{\"prefix\":\"avmitnwlyhbuj\"},{\"prefix\":\"svdtyydd\"}],\"ipv6Routes\":[{\"prefix\":\"tmabtpgn\"},{\"prefix\":\"tjtnnrjewih\"},{\"prefix\":\"igaahm\"},{\"prefix\":\"fspkdnx\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"xtert\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"rwscic\",\"exportIpv6RoutePolicyId\":\"dwienv\"}},\"annotation\":\"lzj\"},\"location\":\"kr\",\"tags\":{\"qw\":\"ghaknklt\",\"bmwrvpvdrohul\":\"pvi\",\"nirnygtixk\":\"bkabhvxjuaivx\",\"kphvdlo\":\"yob\"},\"id\":\"xzpqditudcltf\",\"name\":\"ieileemw\",\"type\":\"kehldopjsxvbbwsg\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"viysbvoliviankl\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ouxpdnlbp\"},{\"prefix\":\"bc\"}],\"ipv6Routes\":[{\"prefix\":\"nroaqzekggurwxf\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"hwfiyuofegrzfs\",\"exportIpv6RoutePolicyId\":\"lookwnz\"}},\"networkFabricId\":\"tjbvhui\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"cqsylkkq\",\"exportIpv6RoutePolicyId\":\"mmweljc\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"ymcmnsm\",\"jitxughl\"]},\"v4routePrefixLimit\":{\"hardLimit\":2096389103,\"threshold\":1989013161},\"v6routePrefixLimit\":{\"hardLimit\":1392573672,\"threshold\":881560479},\"lastOperation\":{\"details\":\"kioec\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"All\"]},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\"},\"identity\":{\"principalId\":\"xuqpddebokzdshh\",\"tenantId\":\"ixnzapzibms\",\"type\":\"None\",\"userAssignedIdentities\":{\"tsrvsbkn\":{\"principalId\":\"zvfywspajakj\",\"clientId\":\"pktbnmhxtmzzpa\"},\"j\":{\"principalId\":\"uytsaj\",\"clientId\":\"vusnwic\"},\"eyaoyzjfgvxau\":{\"principalId\":\"ctlsohrtgpvvcb\",\"clientId\":\"giwc\"}}},\"location\":\"nabgrsnfzmth\",\"tags\":{\"p\":\"uflazfot\"},\"id\":\"umamdorgl\",\"name\":\"ekh\",\"type\":\"sfgjbeybdukbgl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("kr", response.iterator().next().location()); - Assertions.assertEquals("ghaknklt", response.iterator().next().tags().get("qw")); - Assertions.assertEquals("guzlweoyxfoaf", response.iterator().next().networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, + Assertions.assertEquals("nabgrsnfzmth", response.iterator().next().location()); + Assertions.assertEquals("uflazfot", response.iterator().next().tags().get("p")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("viysbvoliviankl", response.iterator().next().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("hlbpjuajzq", + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.iterator().next().redistributeStaticRoutes()); + Assertions.assertEquals("ouxpdnlbp", response.iterator().next().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("tmabtpgn", + Assertions.assertEquals("nroaqzekggurwxf", response.iterator().next().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("xtert", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("rwscic", + Assertions.assertEquals("hwfiyuofegrzfs", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dwienv", + Assertions.assertEquals("lookwnz", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("lzj", response.iterator().next().annotation()); + Assertions.assertEquals("tjbvhui", response.iterator().next().networkFabricId()); + Assertions.assertEquals("cqsylkkq", + response.iterator().next().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("mmweljc", + response.iterator().next().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(2096389103, response.iterator().next().v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(1989013161, response.iterator().next().v4routePrefixLimit().threshold()); + Assertions.assertEquals(1392573672, response.iterator().next().v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(881560479, response.iterator().next().v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + response.iterator().next().exportPolicyConfiguration().exportPolicies().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java index 0cac7fe5cc44..4c025b156552 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java @@ -1,94 +1,48 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainsListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class L3IsolationDomainsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"kwqpat\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"uzqymtuowog\"},{\"prefix\":\"gitsqh\"}],\"ipv6Routes\":[{\"prefix\":\"rzcdbanf\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"scxmxeat\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mwnrdj\",\"exportIpv6RoutePolicyId\":\"bqbnaomhjrmkuh\"}},\"annotation\":\"xljalfihc\"},\"location\":\"obcancdexxqcw\",\"tags\":{\"zrltixldzyyf\":\"fgvaknokzwj\"},\"id\":\"tpq\",\"name\":\"ixymmpujivyql\",\"type\":\"juvsmbmslzoyovw\"}],\"nextLink\":\"bpqvybefg\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"syekrdrenxol\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"iv\"},{\"prefix\":\"lhydwbdbfgrlpu\"}],\"ipv6Routes\":[{\"prefix\":\"jlkesmmpath\"},{\"prefix\":\"btahdeanii\"},{\"prefix\":\"llbvgwzsfftedous\"},{\"prefix\":\"ktjtgra\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gfkbebauzlqbtxx\",\"exportIpv6RoutePolicyId\":\"f\"}},\"networkFabricId\":\"njzudr\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gmeboywhczz\",\"exportIpv6RoutePolicyId\":\"hmngqb\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"isrz\"]},\"v4routePrefixLimit\":{\"hardLimit\":1585605889,\"threshold\":504390179},\"v6routePrefixLimit\":{\"hardLimit\":546507122,\"threshold\":1141293702},\"lastOperation\":{\"details\":\"pwctofl\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"Post-Policy\",\"All\"]},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\"},\"identity\":{\"principalId\":\"drwjiy\",\"tenantId\":\"hfjsrwqrxetf\",\"type\":\"None\",\"userAssignedIdentities\":{\"cnawth\":{\"principalId\":\"r\",\"clientId\":\"qnt\"},\"eamc\":{\"principalId\":\"ax\",\"clientId\":\"u\"},\"pqtwloesqrggvrb\":{\"principalId\":\"udf\",\"clientId\":\"cehokw\"}}},\"location\":\"rukoi\",\"tags\":{\"leipjl\":\"iduw\",\"kkwhbgxvellvulnx\":\"wyxpzruzyth\"},\"id\":\"mnitmujd\",\"name\":\"vm\",\"type\":\"lyymffhmjpddny\"},{\"properties\":{\"annotation\":\"zuvrzmzqmz\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"mdyfoebojtj\"},{\"prefix\":\"pglaoh\"},{\"prefix\":\"qk\"}],\"ipv6Routes\":[{\"prefix\":\"nqjilaywk\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qsyrilmhxdqao\",\"exportIpv6RoutePolicyId\":\"ylnkkbjpjvlywltm\"}},\"networkFabricId\":\"wob\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lwyjfnqzocrdz\",\"exportIpv6RoutePolicyId\":\"zeunt\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"ca\",\"ttie\",\"oifuvnyttzgixgy\",\"ihlgm\"]},\"v4routePrefixLimit\":{\"hardLimit\":772601164,\"threshold\":1712593947},\"v6routePrefixLimit\":{\"hardLimit\":1073702887,\"threshold\":929511267},\"lastOperation\":{\"details\":\"ndrndpgf\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"LocalRib\",\"Post-Policy\",\"LocalRib\"]},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"identity\":{\"principalId\":\"gsabvcipowzafc\",\"tenantId\":\"umljcirvpef\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qvmvuaytuadxkxe\":{\"principalId\":\"ititjnsxza\",\"clientId\":\"nsjhwjuyxxb\"},\"u\":{\"principalId\":\"wp\",\"clientId\":\"ghyksarcdrnxs\"}}},\"location\":\"zladltxkpbq\",\"tags\":{\"isgglmvokat\":\"dqqjwkrhwzdano\",\"xsmzygdf\":\"ztjctibpvbkae\",\"eivmak\":\"akw\"},\"id\":\"hysowljuxlkbect\",\"name\":\"tfjmskdchmaiub\",\"type\":\"vlzw\"},{\"properties\":{\"annotation\":\"gmfalkzazmgoked\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"rokzrthqetwpq\"},{\"prefix\":\"tvaoznqn\"},{\"prefix\":\"xiezeagmceit\"},{\"prefix\":\"ugedh\"}],\"ipv6Routes\":[{\"prefix\":\"stlzm\"},{\"prefix\":\"lsyj\"},{\"prefix\":\"eolctaebf\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"edjc\",\"exportIpv6RoutePolicyId\":\"tb\"}},\"networkFabricId\":\"tqi\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vsgeafgf\",\"exportIpv6RoutePolicyId\":\"ehxlzsxezppk\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"es\",\"yfjlpzeqto\"]},\"v4routePrefixLimit\":{\"hardLimit\":1166008227,\"threshold\":822312468},\"v6routePrefixLimit\":{\"hardLimit\":1803184216,\"threshold\":951853917},\"lastOperation\":{\"details\":\"quevham\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\"]},\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"},\"identity\":{\"principalId\":\"kzwaqxofq\",\"tenantId\":\"chiqbplvfid\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hrdicxdwyjfo\":{\"principalId\":\"kxbyjg\",\"clientId\":\"fepxyihpqadag\"},\"gbipcukdveks\":{\"principalId\":\"wyov\",\"clientId\":\"j\"},\"yszekbhwlka\":{\"principalId\":\"hoduchvlscrd\",\"clientId\":\"bfdyjduss\"}}},\"location\":\"gkrehbf\",\"tags\":{\"jfiimreoa\":\"ybff\",\"sqwudohzilfmnli\":\"sqtaadusrexxfa\",\"ypofqpmbhyqgs\":\"psimsf\"},\"id\":\"rmmttjxop\",\"name\":\"gerhsmvg\",\"type\":\"htwzmqilr\"},{\"properties\":{\"annotation\":\"ysfn\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"mhkruwaedrympm\"},{\"prefix\":\"q\"},{\"prefix\":\"in\"},{\"prefix\":\"zduewihapfjii\"}],\"ipv6Routes\":[{\"prefix\":\"diqfliejhpclbi\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"bwceivbvzip\",\"exportIpv6RoutePolicyId\":\"xgoooxzprad\"}},\"networkFabricId\":\"s\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pdgzigjsugswhg\",\"exportIpv6RoutePolicyId\":\"odkwwnbafocto\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"quvwsxbgn\",\"kerv\",\"choadhrsxqv\",\"vspabdsrgfajgl\"]},\"v4routePrefixLimit\":{\"hardLimit\":1989046577,\"threshold\":551027911},\"v6routePrefixLimit\":{\"hardLimit\":1181273635,\"threshold\":1397650583},\"lastOperation\":{\"details\":\"tcetjdv\"},\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\"]},\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"identity\":{\"principalId\":\"dxvqzxoe\",\"tenantId\":\"gjxb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ttkgsux\":{\"principalId\":\"aupwtzvpaklo\",\"clientId\":\"xbzrpejplssanb\"}}},\"location\":\"rswgkpjhboyikeb\",\"tags\":{\"wlokhueoijyzcq\":\"ksl\",\"fejyvdwtfxptpqa\":\"pzqzufgs\",\"mxsnxocuul\":\"amkncfgy\",\"wwdjuxdbdl\":\"ojkpoyh\"},\"id\":\"zgdyrcvuqbs\",\"name\":\"zlrqhbjnqogdx\",\"type\":\"bsfp\"}],\"nextLink\":\"x\"}") .toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("obcancdexxqcw", model.value().get(0).location()); - Assertions.assertEquals("fgvaknokzwj", model.value().get(0).tags().get("zrltixldzyyf")); - Assertions.assertEquals("kwqpat", model.value().get(0).networkFabricId()); + Assertions.assertEquals("rukoi", model.value().get(0).location()); + Assertions.assertEquals("iduw", model.value().get(0).tags().get("leipjl")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("syekrdrenxol", model.value().get(0).annotation()); Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("uzqymtuowog", - model.value().get(0).aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rzcdbanf", + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.value().get(0).redistributeStaticRoutes()); + Assertions.assertEquals("iv", model.value().get(0).aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jlkesmmpath", model.value().get(0).aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("scxmxeat", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("mwnrdj", + Assertions.assertEquals("gfkbebauzlqbtxx", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bqbnaomhjrmkuh", + Assertions.assertEquals("f", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xljalfihc", model.value().get(0).annotation()); - Assertions.assertEquals("bpqvybefg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainsListResult model = new L3IsolationDomainsListResult() - .withValue(Arrays.asList(new L3IsolationDomainInner().withLocation("obcancdexxqcw") - .withTags(mapOf("zrltixldzyyf", "fgvaknokzwj")) - .withNetworkFabricId("kwqpat") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("uzqymtuowog"), - new AggregateRoute().withPrefix("gitsqh"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("rzcdbanf")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("scxmxeat") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("mwnrdj") - .withExportIpv6RoutePolicyId("bqbnaomhjrmkuh"))) - .withAnnotation("xljalfihc"))) - .withNextLink("bpqvybefg"); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("obcancdexxqcw", model.value().get(0).location()); - Assertions.assertEquals("fgvaknokzwj", model.value().get(0).tags().get("zrltixldzyyf")); - Assertions.assertEquals("kwqpat", model.value().get(0).networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, - model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("uzqymtuowog", - model.value().get(0).aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rzcdbanf", - model.value().get(0).aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("scxmxeat", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("mwnrdj", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bqbnaomhjrmkuh", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xljalfihc", model.value().get(0).annotation()); - Assertions.assertEquals("bpqvybefg", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("njzudr", model.value().get(0).networkFabricId()); + Assertions.assertEquals("gmeboywhczz", + model.value().get(0).staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hmngqb", + model.value().get(0).staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1585605889, model.value().get(0).v4routePrefixLimit().hardLimit()); + Assertions.assertEquals(504390179, model.value().get(0).v4routePrefixLimit().threshold()); + Assertions.assertEquals(546507122, model.value().get(0).v6routePrefixLimit().hardLimit()); + Assertions.assertEquals(1141293702, model.value().get(0).v6routePrefixLimit().threshold()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + model.value().get(0).exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals("x", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionAPropertiesTests.java deleted file mode 100644 index 70e13e39b28b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionAPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class L3OptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3OptionAProperties model = BinaryData.fromString( - "{\"mtu\":1884259051,\"vlanId\":58322521,\"fabricASN\":501242553193670995,\"peerASN\":3479899819671117833,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2074968961,\"multiplier\":1582406723},\"ingressAclId\":\"ntgxdncaqttie\",\"egressAclId\":\"i\"}") - .toObject(L3OptionAProperties.class); - Assertions.assertEquals(1884259051, model.mtu()); - Assertions.assertEquals(58322521, model.vlanId()); - Assertions.assertEquals(3479899819671117833L, model.peerAsn()); - Assertions.assertEquals(2074968961, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1582406723, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("ntgxdncaqttie", model.ingressAclId()); - Assertions.assertEquals("i", model.egressAclId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3OptionAProperties model = new L3OptionAProperties().withMtu(1884259051) - .withVlanId(58322521) - .withPeerAsn(3479899819671117833L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2074968961).withMultiplier(1582406723)) - .withIngressAclId("ntgxdncaqttie") - .withEgressAclId("i"); - model = BinaryData.fromObject(model).toObject(L3OptionAProperties.class); - Assertions.assertEquals(1884259051, model.mtu()); - Assertions.assertEquals(58322521, model.vlanId()); - Assertions.assertEquals(3479899819671117833L, model.peerAsn()); - Assertions.assertEquals(2074968961, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1582406723, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("ntgxdncaqttie", model.ingressAclId()); - Assertions.assertEquals("i", model.egressAclId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java new file mode 100644 index 000000000000..5edaf659953f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class L3OptionBPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3OptionBPatchProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"ncwmhjob\",\"rf\",\"ri\",\"dc\"],\"exportRouteTargets\":[\"f\",\"cvbzwgwhgkgsoa\",\"oorssatfy\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"fdmxuqb\",\"qna\"],\"importIpv6RouteTargets\":[\"uxvzfqayopbtsi\",\"hg\",\"bhxmndztgsqjayq\",\"arxneibpgbr\"],\"exportIpv4RouteTargets\":[\"dqknh\",\"nmotpuwnnoh\"],\"exportIpv6RouteTargets\":[\"ngocfrjuypwyi\",\"laynosugkf\",\"axttpfsmwgs\",\"hqucum\"]}}") + .toObject(L3OptionBPatchProperties.class); + Assertions.assertEquals("ncwmhjob", model.importRouteTargets().get(0)); + Assertions.assertEquals("f", model.exportRouteTargets().get(0)); + Assertions.assertEquals("fdmxuqb", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("uxvzfqayopbtsi", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("dqknh", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ngocfrjuypwyi", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3OptionBPatchProperties model + = new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("ncwmhjob", "rf", "ri", "dc")) + .withExportRouteTargets(Arrays.asList("f", "cvbzwgwhgkgsoa", "oorssatfy")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("fdmxuqb", "qna")) + .withImportIpv6RouteTargets(Arrays.asList("uxvzfqayopbtsi", "hg", "bhxmndztgsqjayq", "arxneibpgbr")) + .withExportIpv4RouteTargets(Arrays.asList("dqknh", "nmotpuwnnoh")) + .withExportIpv6RouteTargets(Arrays.asList("ngocfrjuypwyi", "laynosugkf", "axttpfsmwgs", "hqucum"))); + model = BinaryData.fromObject(model).toObject(L3OptionBPatchProperties.class); + Assertions.assertEquals("ncwmhjob", model.importRouteTargets().get(0)); + Assertions.assertEquals("f", model.exportRouteTargets().get(0)); + Assertions.assertEquals("fdmxuqb", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("uxvzfqayopbtsi", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("dqknh", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ngocfrjuypwyi", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java index d6c3430a518b..485e28c54806 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,31 +14,33 @@ public final class L3OptionBPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3OptionBProperties model = BinaryData.fromString( - "{\"importRouteTargets\":[\"njzudr\"],\"exportRouteTargets\":[\"kgmeb\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"czzqrhmngqbedyg\",\"s\"],\"importIpv6RouteTargets\":[\"nykdi\",\"jch\",\"rmpwctofld\",\"eacdhztx\"],\"exportIpv4RouteTargets\":[\"fg\",\"rwjiyew\"],\"exportIpv6RouteTargets\":[\"srwqrxetfg\",\"wvrrmdqn\",\"ycnawthvmaxgnuy\"]}}") + "{\"importRouteTargets\":[\"gzhogsmgbvmtd\",\"rqbebjnfveglab\",\"vkbiw\",\"nhtfgfi\"],\"exportRouteTargets\":[\"yhizpaczmu\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"kznhokhoitwhrj\",\"dmmazdnc\",\"idb\",\"pglhzqp\"],\"importIpv6RouteTargets\":[\"awkikcdgfh\",\"ssdpjeyoqxded\",\"cfiwhagxsurejq\"],\"exportIpv4RouteTargets\":[\"zzbgullcxiqqz\",\"koxdupnamgl\",\"ouigdmfivjqte\",\"dqqigdydkghpc\"],\"exportIpv6RouteTargets\":[\"qirvtk\",\"yhhmvfxl\",\"pjajodmkrrwe\"]}}") .toObject(L3OptionBProperties.class); - Assertions.assertEquals("njzudr", model.importRouteTargets().get(0)); - Assertions.assertEquals("kgmeb", model.exportRouteTargets().get(0)); - Assertions.assertEquals("czzqrhmngqbedyg", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nykdi", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("fg", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("srwqrxetfg", model.routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("gzhogsmgbvmtd", model.importRouteTargets().get(0)); + Assertions.assertEquals("yhizpaczmu", model.exportRouteTargets().get(0)); + Assertions.assertEquals("kznhokhoitwhrj", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("awkikcdgfh", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("zzbgullcxiqqz", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv6RouteTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3OptionBProperties model = new L3OptionBProperties().withImportRouteTargets(Arrays.asList("njzudr")) - .withExportRouteTargets(Arrays.asList("kgmeb")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("czzqrhmngqbedyg", "s")) - .withImportIpv6RouteTargets(Arrays.asList("nykdi", "jch", "rmpwctofld", "eacdhztx")) - .withExportIpv4RouteTargets(Arrays.asList("fg", "rwjiyew")) - .withExportIpv6RouteTargets(Arrays.asList("srwqrxetfg", "wvrrmdqn", "ycnawthvmaxgnuy"))); + L3OptionBProperties model = new L3OptionBProperties() + .withImportRouteTargets(Arrays.asList("gzhogsmgbvmtd", "rqbebjnfveglab", "vkbiw", "nhtfgfi")) + .withExportRouteTargets(Arrays.asList("yhizpaczmu")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("kznhokhoitwhrj", "dmmazdnc", "idb", "pglhzqp")) + .withImportIpv6RouteTargets(Arrays.asList("awkikcdgfh", "ssdpjeyoqxded", "cfiwhagxsurejq")) + .withExportIpv4RouteTargets( + Arrays.asList("zzbgullcxiqqz", "koxdupnamgl", "ouigdmfivjqte", "dqqigdydkghpc")) + .withExportIpv6RouteTargets(Arrays.asList("qirvtk", "yhhmvfxl", "pjajodmkrrwe"))); model = BinaryData.fromObject(model).toObject(L3OptionBProperties.class); - Assertions.assertEquals("njzudr", model.importRouteTargets().get(0)); - Assertions.assertEquals("kgmeb", model.exportRouteTargets().get(0)); - Assertions.assertEquals("czzqrhmngqbedyg", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nykdi", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("fg", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("srwqrxetfg", model.routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("gzhogsmgbvmtd", model.importRouteTargets().get(0)); + Assertions.assertEquals("yhizpaczmu", model.exportRouteTargets().get(0)); + Assertions.assertEquals("kznhokhoitwhrj", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("awkikcdgfh", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("zzbgullcxiqqz", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv6RouteTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java new file mode 100644 index 000000000000..2cabcd415e78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; + +public final class L3UniqueRouteDistinguisherPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3UniqueRouteDistinguisherProperties model = BinaryData.fromString("{\"uniqueRds\":[\"dmbvxekraok\"]}") + .toObject(L3UniqueRouteDistinguisherProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3UniqueRouteDistinguisherProperties model = new L3UniqueRouteDistinguisherProperties(); + model = BinaryData.fromObject(model).toObject(L3UniqueRouteDistinguisherProperties.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java new file mode 100644 index 000000000000..38fcea455c9e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; + +public final class LastOperationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LastOperationProperties model + = BinaryData.fromString("{\"details\":\"ziycslevufuztck\"}").toObject(LastOperationProperties.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java new file mode 100644 index 000000000000..e99b7d540a0b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class Layer2ConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Layer2ConfigurationPatch model + = BinaryData.fromString("{\"mtu\":1181259528,\"interfaces\":[\"raq\",\"il\",\"pqcaigazwfwlrfd\",\"w\"]}") + .toObject(Layer2ConfigurationPatch.class); + Assertions.assertEquals(1181259528, model.mtu()); + Assertions.assertEquals("raq", model.interfaces().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Layer2ConfigurationPatch model = new Layer2ConfigurationPatch().withMtu(1181259528) + .withInterfaces(Arrays.asList("raq", "il", "pqcaigazwfwlrfd", "w")); + model = BinaryData.fromObject(model).toObject(Layer2ConfigurationPatch.class); + Assertions.assertEquals(1181259528, model.mtu()); + Assertions.assertEquals("raq", model.interfaces().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java index 56386e5112ab..f21114c47d14 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,20 @@ public final class Layer2ConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Layer2Configuration model - = BinaryData.fromString("{\"mtu\":1689763711,\"interfaces\":[\"xpthceopvkvt\",\"fve\",\"obpbokhmm\"]}") - .toObject(Layer2Configuration.class); - Assertions.assertEquals(1689763711, model.mtu()); - Assertions.assertEquals("xpthceopvkvt", model.interfaces().get(0)); + Layer2Configuration model = BinaryData + .fromString( + "{\"mtu\":1668427039,\"interfaces\":[\"wevsfgdrmnszdosm\",\"sqsvzvmxtc\",\"ghndae\",\"hgsulwvgs\"]}") + .toObject(Layer2Configuration.class); + Assertions.assertEquals(1668427039, model.mtu()); + Assertions.assertEquals("wevsfgdrmnszdosm", model.interfaces().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Layer2Configuration model = new Layer2Configuration().withMtu(1689763711) - .withInterfaces(Arrays.asList("xpthceopvkvt", "fve", "obpbokhmm")); + Layer2Configuration model = new Layer2Configuration().withMtu(1668427039) + .withInterfaces(Arrays.asList("wevsfgdrmnszdosm", "sqsvzvmxtc", "ghndae", "hgsulwvgs")); model = BinaryData.fromObject(model).toObject(Layer2Configuration.class); - Assertions.assertEquals(1689763711, model.mtu()); - Assertions.assertEquals("xpthceopvkvt", model.interfaces().get(0)); + Assertions.assertEquals(1668427039, model.mtu()); + Assertions.assertEquals("wevsfgdrmnszdosm", model.interfaces().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPatchPropertiesTests.java new file mode 100644 index 000000000000..49e11134f6b1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPatchPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Layer3IpPrefixPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class Layer3IpPrefixPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Layer3IpPrefixPatchProperties model = BinaryData.fromString( + "{\"primaryIpv4Prefix\":\"mi\",\"primaryIpv6Prefix\":\"ewzlscgsmepnqv\",\"secondaryIpv4Prefix\":\"voh\",\"secondaryIpv6Prefix\":\"thhx\"}") + .toObject(Layer3IpPrefixPatchProperties.class); + Assertions.assertEquals("mi", model.primaryIpv4Prefix()); + Assertions.assertEquals("ewzlscgsmepnqv", model.primaryIpv6Prefix()); + Assertions.assertEquals("voh", model.secondaryIpv4Prefix()); + Assertions.assertEquals("thhx", model.secondaryIpv6Prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Layer3IpPrefixPatchProperties model = new Layer3IpPrefixPatchProperties().withPrimaryIpv4Prefix("mi") + .withPrimaryIpv6Prefix("ewzlscgsmepnqv") + .withSecondaryIpv4Prefix("voh") + .withSecondaryIpv6Prefix("thhx"); + model = BinaryData.fromObject(model).toObject(Layer3IpPrefixPatchProperties.class); + Assertions.assertEquals("mi", model.primaryIpv4Prefix()); + Assertions.assertEquals("ewzlscgsmepnqv", model.primaryIpv6Prefix()); + Assertions.assertEquals("voh", model.secondaryIpv4Prefix()); + Assertions.assertEquals("thhx", model.secondaryIpv6Prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java index 5ecd353de40d..993dc46eefad 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,24 +12,24 @@ public final class Layer3IpPrefixPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Layer3IpPrefixProperties model = BinaryData.fromString( - "{\"primaryIpv4Prefix\":\"ilm\",\"primaryIpv6Prefix\":\"dqaolfylnkk\",\"secondaryIpv4Prefix\":\"pjvlywltmfwo\",\"secondaryIpv6Prefix\":\"jw\"}") + "{\"primaryIpv4Prefix\":\"rxgunnqgy\",\"primaryIpv6Prefix\":\"qtny\",\"secondaryIpv4Prefix\":\"uevqmvyumgmm\",\"secondaryIpv6Prefix\":\"bsnznwgsqufm\"}") .toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ilm", model.primaryIpv4Prefix()); - Assertions.assertEquals("dqaolfylnkk", model.primaryIpv6Prefix()); - Assertions.assertEquals("pjvlywltmfwo", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jw", model.secondaryIpv6Prefix()); + Assertions.assertEquals("rxgunnqgy", model.primaryIpv4Prefix()); + Assertions.assertEquals("qtny", model.primaryIpv6Prefix()); + Assertions.assertEquals("uevqmvyumgmm", model.secondaryIpv4Prefix()); + Assertions.assertEquals("bsnznwgsqufm", model.secondaryIpv6Prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Layer3IpPrefixProperties model = new Layer3IpPrefixProperties().withPrimaryIpv4Prefix("ilm") - .withPrimaryIpv6Prefix("dqaolfylnkk") - .withSecondaryIpv4Prefix("pjvlywltmfwo") - .withSecondaryIpv6Prefix("jw"); + Layer3IpPrefixProperties model = new Layer3IpPrefixProperties().withPrimaryIpv4Prefix("rxgunnqgy") + .withPrimaryIpv6Prefix("qtny") + .withSecondaryIpv4Prefix("uevqmvyumgmm") + .withSecondaryIpv6Prefix("bsnznwgsqufm"); model = BinaryData.fromObject(model).toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ilm", model.primaryIpv4Prefix()); - Assertions.assertEquals("dqaolfylnkk", model.primaryIpv6Prefix()); - Assertions.assertEquals("pjvlywltmfwo", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jw", model.secondaryIpv6Prefix()); + Assertions.assertEquals("rxgunnqgy", model.primaryIpv4Prefix()); + Assertions.assertEquals("qtny", model.primaryIpv6Prefix()); + Assertions.assertEquals("uevqmvyumgmm", model.secondaryIpv4Prefix()); + Assertions.assertEquals("bsnznwgsqufm", model.secondaryIpv6Prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java index 2664f06ac453..752280923d85 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class ManagedResourceGroupConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedResourceGroupConfiguration model - = BinaryData.fromString("{\"name\":\"laxp\",\"location\":\"jwdabalfd\"}") + = BinaryData.fromString("{\"name\":\"cvsvk\",\"location\":\"bjolpyoklkv\"}") .toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("laxp", model.name()); - Assertions.assertEquals("jwdabalfd", model.location()); + Assertions.assertEquals("cvsvk", model.name()); + Assertions.assertEquals("bjolpyoklkv", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedResourceGroupConfiguration model - = new ManagedResourceGroupConfiguration().withName("laxp").withLocation("jwdabalfd"); + = new ManagedResourceGroupConfiguration().withName("cvsvk").withLocation("bjolpyoklkv"); model = BinaryData.fromObject(model).toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("laxp", model.name()); - Assertions.assertEquals("jwdabalfd", model.location()); + Assertions.assertEquals("cvsvk", model.name()); + Assertions.assertEquals("bjolpyoklkv", model.location()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java new file mode 100644 index 000000000000..4821c868cb91 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentityPatch model = BinaryData.fromString( + "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"tpbnfnqtxjtoma\":{\"principalId\":\"gydlqidywm\",\"clientId\":\"ptyrilkfbnrqqxv\"},\"f\":{\"principalId\":\"wbnfddepl\",\"clientId\":\"qjn\"}}}") + .toObject(ManagedServiceIdentityPatch.class); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentityPatch model + = new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("tpbnfnqtxjtoma", new UserAssignedIdentity(), "f", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentityPatch.class); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java new file mode 100644 index 000000000000..a039a4521221 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentity model = BinaryData.fromString( + "{\"principalId\":\"v\",\"tenantId\":\"jkgv\",\"type\":\"None\",\"userAssignedIdentities\":{\"uyvpirf\":{\"principalId\":\"ursqf\",\"clientId\":\"btyi\"},\"bedenrexkx\":{\"principalId\":\"pnqn\",\"clientId\":\"w\"}}}") + .toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("uyvpirf", new UserAssignedIdentity(), "bedenrexkx", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java deleted file mode 100644 index b466829c2eb4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagementNetworkConfigurationPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagementNetworkConfigurationPatchableProperties model = BinaryData.fromString( - "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"usdvrgp\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"jdrpizfulgycts\",\"btqgkujdsoox\"],\"exportRouteTargets\":[\"oeurbtigapdyar\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"jdpdfhtwmmkfq\",\"r\",\"qulw\"],\"importIpv6RouteTargets\":[\"jmeqkvy\",\"zokpoy\",\"ohuen\"],\"exportIpv4RouteTargets\":[\"ajphmp\"],\"exportIpv6RouteTargets\":[\"nglpwsada\",\"jsumxpezcoio\",\"jrmfqzwqd\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"eedcnwmywx\",\"primaryIpv6Prefix\":\"zkvemy\",\"secondaryIpv4Prefix\":\"pczaqpqif\",\"secondaryIpv6Prefix\":\"m\",\"mtu\":947190230,\"vlanId\":2060612809,\"peerASN\":6577158463554950611,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2074245837,\"multiplier\":375594726}}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"izexroqsqj\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"splwsttxs\",\"gxfqpan\",\"ceov\",\"gzwhsxyrujmtik\"],\"exportRouteTargets\":[\"ik\",\"ohzixyqhfnkvycqq\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ipnquwzxhrptyod\",\"hkfktlt\",\"dsobjopnouhbq\"],\"importIpv6RouteTargets\":[\"qxsaluzyig\"],\"exportIpv4RouteTargets\":[\"cewbwqhdgsjsatm\",\"ncmazdf\",\"qxhyq\",\"rejparnpv\"],\"exportIpv6RouteTargets\":[\"zrbwtdrcwgz\",\"ll\",\"zlhhfix\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"c\",\"primaryIpv6Prefix\":\"zjrmhpfywvyld\",\"secondaryIpv4Prefix\":\"zfzxsoxinunjlz\",\"secondaryIpv6Prefix\":\"rocqsxy\",\"mtu\":766019445,\"vlanId\":1442676703,\"peerASN\":8406949182785574264,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":480988441,\"multiplier\":725997455}}}}") - .toObject(ManagementNetworkConfigurationPatchableProperties.class); - Assertions.assertEquals("usdvrgp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("jdrpizfulgycts", - model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("oeurbtigapdyar", - model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("jdpdfhtwmmkfq", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jmeqkvy", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ajphmp", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("nglpwsada", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(947190230, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2060612809, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(6577158463554950611L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2074245837, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(375594726, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("eedcnwmywx", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkvemy", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("pczaqpqif", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("m", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("izexroqsqj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("splwsttxs", - model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ik", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("ipnquwzxhrptyod", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qxsaluzyig", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("cewbwqhdgsjsatm", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("zrbwtdrcwgz", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(766019445, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1442676703, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8406949182785574264L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(480988441, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(725997455, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("c", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zjrmhpfywvyld", - model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("zfzxsoxinunjlz", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rocqsxy", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagementNetworkConfigurationPatchableProperties model - = new ManagementNetworkConfigurationPatchableProperties() - .withInfrastructureVpnConfiguration( - new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("usdvrgp") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("jdrpizfulgycts", "btqgkujdsoox")) - .withExportRouteTargets(Arrays.asList("oeurbtigapdyar")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("jdpdfhtwmmkfq", "r", "qulw")) - .withImportIpv6RouteTargets(Arrays.asList("jmeqkvy", "zokpoy", "ohuen")) - .withExportIpv4RouteTargets(Arrays.asList("ajphmp")) - .withExportIpv6RouteTargets(Arrays.asList("nglpwsada", "jsumxpezcoio", "jrmfqzwqd")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties() - .withMtu(947190230) - .withVlanId(2060612809) - .withPeerAsn(6577158463554950611L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2074245837).withMultiplier(375594726)) - .withPrimaryIpv4Prefix("eedcnwmywx") - .withPrimaryIpv6Prefix("zkvemy") - .withSecondaryIpv4Prefix("pczaqpqif") - .withSecondaryIpv6Prefix("m"))) - .withWorkloadVpnConfiguration(new VpnConfigurationPatchableProperties() - .withNetworkToNetworkInterconnectId("izexroqsqj") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("splwsttxs", "gxfqpan", "ceov", "gzwhsxyrujmtik")) - .withExportRouteTargets(Arrays.asList("ik", "ohzixyqhfnkvycqq")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("ipnquwzxhrptyod", "hkfktlt", "dsobjopnouhbq")) - .withImportIpv6RouteTargets(Arrays.asList("qxsaluzyig")) - .withExportIpv4RouteTargets( - Arrays.asList("cewbwqhdgsjsatm", "ncmazdf", "qxhyq", "rejparnpv")) - .withExportIpv6RouteTargets(Arrays.asList("zrbwtdrcwgz", "ll", "zlhhfix")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(766019445) - .withVlanId(1442676703) - .withPeerAsn(8406949182785574264L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(480988441).withMultiplier(725997455)) - .withPrimaryIpv4Prefix("c") - .withPrimaryIpv6Prefix("zjrmhpfywvyld") - .withSecondaryIpv4Prefix("zfzxsoxinunjlz") - .withSecondaryIpv6Prefix("rocqsxy"))); - model = BinaryData.fromObject(model).toObject(ManagementNetworkConfigurationPatchableProperties.class); - Assertions.assertEquals("usdvrgp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("jdrpizfulgycts", - model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("oeurbtigapdyar", - model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("jdpdfhtwmmkfq", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jmeqkvy", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ajphmp", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("nglpwsada", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(947190230, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2060612809, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(6577158463554950611L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2074245837, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(375594726, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("eedcnwmywx", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkvemy", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("pczaqpqif", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("m", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("izexroqsqj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("splwsttxs", - model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ik", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("ipnquwzxhrptyod", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qxsaluzyig", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("cewbwqhdgsjsatm", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("zrbwtdrcwgz", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(766019445, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1442676703, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8406949182785574264L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(480988441, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(725997455, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("c", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zjrmhpfywvyld", - model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("zfzxsoxinunjlz", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rocqsxy", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java index 45ef9fb5c534..520b4d38ed39 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,163 +19,161 @@ public final class ManagementNetworkConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagementNetworkConfigurationProperties model = BinaryData.fromString( - "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"saudoejtighsx\",\"administrativeState\":\"Disabled\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"bala\",\"ovu\",\"wxhmehjnhjiot\",\"ffbbcngkegxcypxb\"],\"exportRouteTargets\":[\"twilyrzoxp\",\"xql\",\"r\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"wnk\"],\"importIpv6RouteTargets\":[\"jew\",\"ahwkxjjm\"],\"exportIpv4RouteTargets\":[\"lmsoodtmve\",\"dhdyswcrptveaj\"],\"exportIpv6RouteTargets\":[\"vlgsrgkrfiz\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"wlp\",\"primaryIpv6Prefix\":\"uqhrlmcskykp\",\"secondaryIpv4Prefix\":\"ofix\",\"secondaryIpv6Prefix\":\"pcfykkpy\",\"mtu\":401462028,\"vlanId\":1800967897,\"peerASN\":8498572481806754395,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2048384787,\"multiplier\":1708534342}}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"fpcfjf\",\"administrativeState\":\"RMA\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"kgyepe\"],\"exportRouteTargets\":[\"nnidmdiawpzxk\",\"rntmkctdhu\",\"sgwqpsqaz\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"dvqgcnbhcbmjkz\",\"ibniynts\",\"jmfmeftvhkm\",\"ogjrhskbwgm\"],\"importIpv6RouteTargets\":[\"u\",\"cfogxhcxnwjt\"],\"exportIpv4RouteTargets\":[\"zxcouzf\",\"ofwakukzk\",\"tzxsoednlwglihe\"],\"exportIpv6RouteTargets\":[\"ucmqgisnione\",\"bzdrdpuenxkgt\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"mtrlxczn\",\"primaryIpv6Prefix\":\"zkbnbmxl\",\"secondaryIpv4Prefix\":\"wtyg\",\"secondaryIpv6Prefix\":\"zusitoqcahfs\",\"mtu\":1997837951,\"vlanId\":1957504225,\"peerASN\":547030463156659693,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1665599980,\"multiplier\":2049458072}}}}") + "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"qxfvgyx\",\"administrativeState\":\"MAT\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"xlttxoq\",\"tdnzujsjirkrpskc\"],\"exportRouteTargets\":[\"mofbnivd\",\"tkykpaxnlsfgnys\",\"accptbzetxy\",\"xxicee\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"yuveoxmpz\",\"wahdrdvhaztkxbi\",\"zfgxmbry\"],\"importIpv6RouteTargets\":[\"ibio\",\"iqsykqfdqwdrt\"],\"exportIpv4RouteTargets\":[\"daglmrcok\",\"zertkounz\",\"iywhubymfpop\",\"k\"],\"exportIpv6RouteTargets\":[\"qnnfywt\"]}},\"optionAProperties\":{\"mtu\":34530368,\"vlanId\":1699220060,\"peerASN\":2104144988313178735,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":585292498,\"multiplier\":1633231640},\"primaryIpv4Prefix\":\"gf\",\"primaryIpv6Prefix\":\"ulojhhylx\",\"secondaryIpv4Prefix\":\"vfiyymot\",\"secondaryIpv6Prefix\":\"bybwjmtftcvelnir\"}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"kqnstpaqpibjgbvs\",\"administrativeState\":\"UnderMaintenance\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"ttxbms\",\"nn\"],\"exportRouteTargets\":[\"bqcamalec\",\"cxs\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"dxmsynbkdnn\",\"ufxuzmsvzyqrbr\"],\"importIpv6RouteTargets\":[\"jtlxfikjkxara\"],\"exportIpv4RouteTargets\":[\"uasnjeglhtrxb\",\"zpcjcnwjzbqblxr\",\"w\",\"dsvoqiza\"],\"exportIpv6RouteTargets\":[\"dsorgfhjxsawo\"]}},\"optionAProperties\":{\"mtu\":1065368345,\"vlanId\":376869022,\"peerASN\":7722575456704087590,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":335998728,\"multiplier\":2095425122},\"primaryIpv4Prefix\":\"q\",\"primaryIpv6Prefix\":\"ybmrnotoc\",\"secondaryIpv4Prefix\":\"zdaiovrb\",\"secondaryIpv6Prefix\":\"pqphk\"}}}") .toObject(ManagementNetworkConfigurationProperties.class); - Assertions.assertEquals("saudoejtighsx", - model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("bala", + Assertions.assertEquals("qxfvgyx", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("xlttxoq", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("twilyrzoxp", + Assertions.assertEquals("mofbnivd", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wnk", + Assertions.assertEquals("yuveoxmpz", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jew", + Assertions.assertEquals("ibio", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lmsoodtmve", + Assertions.assertEquals("daglmrcok", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vlgsrgkrfiz", + Assertions.assertEquals("qnnfywt", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(401462028, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1800967897, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8498572481806754395L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2048384787, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1708534342, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("wlp", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("uqhrlmcskykp", + Assertions.assertEquals("gf", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ulojhhylx", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ofix", + Assertions.assertEquals("vfiyymot", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("pcfykkpy", + Assertions.assertEquals("bybwjmtftcvelnir", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("fpcfjf", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(34530368, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1699220060, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(2104144988313178735L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(585292498, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1633231640, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("kqnstpaqpibjgbvs", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("kgyepe", + Assertions.assertEquals("ttxbms", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nnidmdiawpzxk", + Assertions.assertEquals("bqcamalec", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("dvqgcnbhcbmjkz", + Assertions.assertEquals("dxmsynbkdnn", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("u", + Assertions.assertEquals("jtlxfikjkxara", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("zxcouzf", + Assertions.assertEquals("uasnjeglhtrxb", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ucmqgisnione", + Assertions.assertEquals("dsorgfhjxsawo", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(1997837951, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1957504225, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(547030463156659693L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(1665599980, + Assertions.assertEquals("q", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ybmrnotoc", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("zdaiovrb", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("pqphk", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1065368345, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(376869022, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(7722575456704087590L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(335998728, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2049458072, + Assertions.assertEquals(2095425122, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("mtrlxczn", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkbnbmxl", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("wtyg", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("zusitoqcahfs", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagementNetworkConfigurationProperties model = new ManagementNetworkConfigurationProperties() .withInfrastructureVpnConfiguration( - new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("saudoejtighsx") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("bala", "ovu", "wxhmehjnhjiot", "ffbbcngkegxcypxb")) - .withExportRouteTargets(Arrays.asList("twilyrzoxp", "xql", "r")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("wnk")) - .withImportIpv6RouteTargets(Arrays.asList("jew", "ahwkxjjm")) - .withExportIpv4RouteTargets(Arrays.asList("lmsoodtmve", "dhdyswcrptveaj")) - .withExportIpv6RouteTargets(Arrays.asList("vlgsrgkrfiz")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(401462028) - .withVlanId(1800967897) - .withPeerAsn(8498572481806754395L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2048384787).withMultiplier(1708534342)) - .withPrimaryIpv4Prefix("wlp") - .withPrimaryIpv6Prefix("uqhrlmcskykp") - .withSecondaryIpv4Prefix("ofix") - .withSecondaryIpv6Prefix("pcfykkpy"))) - .withWorkloadVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("fpcfjf") + new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("qxfvgyx") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("xlttxoq", "tdnzujsjirkrpskc")) + .withExportRouteTargets(Arrays.asList("mofbnivd", "tkykpaxnlsfgnys", "accptbzetxy", "xxicee")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("yuveoxmpz", "wahdrdvhaztkxbi", "zfgxmbry")) + .withImportIpv6RouteTargets(Arrays.asList("ibio", "iqsykqfdqwdrt")) + .withExportIpv4RouteTargets(Arrays.asList("daglmrcok", "zertkounz", "iywhubymfpop", "k")) + .withExportIpv6RouteTargets(Arrays.asList("qnnfywt")))) + .withOptionAProperties( + new VpnOptionAProperties().withPrimaryIpv4Prefix("gf") + .withPrimaryIpv6Prefix("ulojhhylx") + .withSecondaryIpv4Prefix("vfiyymot") + .withSecondaryIpv6Prefix("bybwjmtftcvelnir") + .withMtu(34530368) + .withVlanId(1699220060) + .withPeerASN(2104144988313178735L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(585292498) + .withMultiplier(1633231640)))) + .withWorkloadVpnConfiguration(new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId("kqnstpaqpibjgbvs") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("kgyepe")) - .withExportRouteTargets(Arrays.asList("nnidmdiawpzxk", "rntmkctdhu", "sgwqpsqaz")) + .withOptionBProperties(new VpnOptionBProperties().withImportRouteTargets(Arrays.asList("ttxbms", "nn")) + .withExportRouteTargets(Arrays.asList("bqcamalec", "cxs")) .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("dvqgcnbhcbmjkz", "ibniynts", "jmfmeftvhkm", "ogjrhskbwgm")) - .withImportIpv6RouteTargets(Arrays.asList("u", "cfogxhcxnwjt")) - .withExportIpv4RouteTargets(Arrays.asList("zxcouzf", "ofwakukzk", "tzxsoednlwglihe")) - .withExportIpv6RouteTargets(Arrays.asList("ucmqgisnione", "bzdrdpuenxkgt")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1997837951) - .withVlanId(1957504225) - .withPeerAsn(547030463156659693L) + .withImportIpv4RouteTargets(Arrays.asList("dxmsynbkdnn", "ufxuzmsvzyqrbr")) + .withImportIpv6RouteTargets(Arrays.asList("jtlxfikjkxara")) + .withExportIpv4RouteTargets(Arrays.asList("uasnjeglhtrxb", "zpcjcnwjzbqblxr", "w", "dsvoqiza")) + .withExportIpv6RouteTargets(Arrays.asList("dsorgfhjxsawo")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("q") + .withPrimaryIpv6Prefix("ybmrnotoc") + .withSecondaryIpv4Prefix("zdaiovrb") + .withSecondaryIpv6Prefix("pqphk") + .withMtu(1065368345) + .withVlanId(376869022) + .withPeerASN(7722575456704087590L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1665599980).withMultiplier(2049458072)) - .withPrimaryIpv4Prefix("mtrlxczn") - .withPrimaryIpv6Prefix("zkbnbmxl") - .withSecondaryIpv4Prefix("wtyg") - .withSecondaryIpv6Prefix("zusitoqcahfs"))); + new BfdConfiguration().withIntervalInMilliSeconds(335998728).withMultiplier(2095425122)))); model = BinaryData.fromObject(model).toObject(ManagementNetworkConfigurationProperties.class); - Assertions.assertEquals("saudoejtighsx", - model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("bala", + Assertions.assertEquals("qxfvgyx", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("xlttxoq", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("twilyrzoxp", + Assertions.assertEquals("mofbnivd", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wnk", + Assertions.assertEquals("yuveoxmpz", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jew", + Assertions.assertEquals("ibio", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lmsoodtmve", + Assertions.assertEquals("daglmrcok", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vlgsrgkrfiz", + Assertions.assertEquals("qnnfywt", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(401462028, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1800967897, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8498572481806754395L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2048384787, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1708534342, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("wlp", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("uqhrlmcskykp", + Assertions.assertEquals("gf", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ulojhhylx", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ofix", + Assertions.assertEquals("vfiyymot", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("pcfykkpy", + Assertions.assertEquals("bybwjmtftcvelnir", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("fpcfjf", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(34530368, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1699220060, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(2104144988313178735L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(585292498, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1633231640, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("kqnstpaqpibjgbvs", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("kgyepe", + Assertions.assertEquals("ttxbms", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nnidmdiawpzxk", + Assertions.assertEquals("bqcamalec", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("dvqgcnbhcbmjkz", + Assertions.assertEquals("dxmsynbkdnn", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("u", + Assertions.assertEquals("jtlxfikjkxara", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("zxcouzf", + Assertions.assertEquals("uasnjeglhtrxb", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ucmqgisnione", + Assertions.assertEquals("dsorgfhjxsawo", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(1997837951, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1957504225, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(547030463156659693L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(1665599980, + Assertions.assertEquals("q", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ybmrnotoc", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("zdaiovrb", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("pqphk", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1065368345, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(376869022, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(7722575456704087590L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(335998728, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2049458072, + Assertions.assertEquals(2095425122, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("mtrlxczn", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkbnbmxl", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("wtyg", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("zusitoqcahfs", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java new file mode 100644 index 000000000000..2543d7c34576 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagementNetworkPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagementNetworkPatchConfiguration model = BinaryData.fromString( + "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"iwtp\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"swwvwiftdjtvbfp\",\"hruptsyq\"],\"exportRouteTargets\":[\"qswxdowumxquk\",\"cdio\",\"clqddnhfknebw\",\"ddpnyzcwyj\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"qldqabn\"],\"importIpv6RouteTargets\":[\"aqbqxfbb\"],\"exportIpv4RouteTargets\":[\"fddofxnf\",\"mjyyr\",\"aedwov\"],\"exportIpv6RouteTargets\":[\"tjgo\",\"ayokrwfmihw\",\"adhed\"]}},\"optionAProperties\":{\"mtu\":1349503224,\"vlanId\":174083242,\"peerASN\":3311114130578713566,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":544698905,\"multiplier\":1893969422},\"primaryIpv4Prefix\":\"zvbwfcnjhbpoelh\",\"primaryIpv6Prefix\":\"myhrh\",\"secondaryIpv4Prefix\":\"szfqbokndwpppqw\",\"secondaryIpv6Prefix\":\"oevzzufytdxmly\"}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"yvapbkrbuoggtdl\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"izij\",\"aylzeohlps\",\"tqkrvmhvbvvcpwtq\",\"usp\"],\"exportRouteTargets\":[\"zydffet\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"tf\",\"nwacycsy\",\"tctkhfhfs\",\"tvc\"],\"importIpv6RouteTargets\":[\"mhnmizhvprhqqw\",\"ublehhkplobz\",\"ottaksadz\"],\"exportIpv4RouteTargets\":[\"mmtbt\"],\"exportIpv6RouteTargets\":[\"cfvvraabe\"]}},\"optionAProperties\":{\"mtu\":676937959,\"vlanId\":584353077,\"peerASN\":8278111662279968808,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2006252747,\"multiplier\":803730353},\"primaryIpv4Prefix\":\"jyjiznior\",\"primaryIpv6Prefix\":\"fmfta\",\"secondaryIpv4Prefix\":\"mcreihu\",\"secondaryIpv6Prefix\":\"rnig\"}}}") + .toObject(ManagementNetworkPatchConfiguration.class); + Assertions.assertEquals("iwtp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("swwvwiftdjtvbfp", + model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qswxdowumxquk", + model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("qldqabn", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("aqbqxfbb", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fddofxnf", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("tjgo", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("zvbwfcnjhbpoelh", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("myhrh", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("szfqbokndwpppqw", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("oevzzufytdxmly", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1349503224, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(174083242, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(3311114130578713566L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(544698905, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1893969422, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("yvapbkrbuoggtdl", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); + Assertions.assertEquals("izij", + model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("zydffet", + model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("tf", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("mhnmizhvprhqqw", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("mmtbt", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("cfvvraabe", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("jyjiznior", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("fmfta", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("mcreihu", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("rnig", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(676937959, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(584353077, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(8278111662279968808L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(2006252747, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(803730353, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagementNetworkPatchConfiguration model = new ManagementNetworkPatchConfiguration() + .withInfrastructureVpnConfiguration( + new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("iwtp") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("swwvwiftdjtvbfp", "hruptsyq")) + .withExportRouteTargets(Arrays.asList("qswxdowumxquk", "cdio", "clqddnhfknebw", "ddpnyzcwyj")) + .withRouteTargets( + new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("qldqabn")) + .withImportIpv6RouteTargets(Arrays.asList("aqbqxfbb")) + .withExportIpv4RouteTargets(Arrays.asList("fddofxnf", "mjyyr", "aedwov")) + .withExportIpv6RouteTargets(Arrays.asList("tjgo", "ayokrwfmihw", "adhed")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("zvbwfcnjhbpoelh") + .withPrimaryIpv6Prefix("myhrh") + .withSecondaryIpv4Prefix("szfqbokndwpppqw") + .withSecondaryIpv6Prefix("oevzzufytdxmly") + .withMtu(1349503224) + .withVlanId(174083242) + .withPeerASN(3311114130578713566L) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(544698905) + .withMultiplier(1893969422)))) + .withWorkloadVpnConfiguration( + new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("yvapbkrbuoggtdl") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("izij", "aylzeohlps", "tqkrvmhvbvvcpwtq", "usp")) + .withExportRouteTargets(Arrays.asList("zydffet")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("tf", "nwacycsy", "tctkhfhfs", "tvc")) + .withImportIpv6RouteTargets(Arrays.asList("mhnmizhvprhqqw", "ublehhkplobz", "ottaksadz")) + .withExportIpv4RouteTargets(Arrays.asList("mmtbt")) + .withExportIpv6RouteTargets(Arrays.asList("cfvvraabe")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("jyjiznior") + .withPrimaryIpv6Prefix("fmfta") + .withSecondaryIpv4Prefix("mcreihu") + .withSecondaryIpv6Prefix("rnig") + .withMtu(676937959) + .withVlanId(584353077) + .withPeerASN(8278111662279968808L) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(2006252747) + .withMultiplier(803730353)))); + model = BinaryData.fromObject(model).toObject(ManagementNetworkPatchConfiguration.class); + Assertions.assertEquals("iwtp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("swwvwiftdjtvbfp", + model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qswxdowumxquk", + model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("qldqabn", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("aqbqxfbb", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fddofxnf", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("tjgo", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("zvbwfcnjhbpoelh", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("myhrh", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("szfqbokndwpppqw", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("oevzzufytdxmly", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1349503224, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(174083242, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(3311114130578713566L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(544698905, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1893969422, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("yvapbkrbuoggtdl", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); + Assertions.assertEquals("izij", + model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("zydffet", + model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("tf", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("mhnmizhvprhqqw", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("mmtbt", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("cfvvraabe", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("jyjiznior", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("fmfta", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("mcreihu", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("rnig", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(676937959, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(584353077, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(8278111662279968808L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(2006252747, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(803730353, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..883a2eec5fd8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv4PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv4PrefixLimitPatchProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":157640432,\"threshold\":1869847736,\"idleTimeExpiry\":124766447}]}") + .toObject(NativeIpv4PrefixLimitPatchProperties.class); + Assertions.assertEquals(157640432, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1869847736, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(124766447, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv4PrefixLimitPatchProperties model = new NativeIpv4PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(157640432) + .withThreshold(1869847736) + .withIdleTimeExpiry(124766447))); + model = BinaryData.fromObject(model).toObject(NativeIpv4PrefixLimitPatchProperties.class); + Assertions.assertEquals(157640432, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1869847736, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(124766447, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..f21ca19bb38e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv4PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv4PrefixLimitProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":2110581374,\"threshold\":968967519,\"idleTimeExpiry\":1672449978},{\"maximumRoutes\":253020685,\"threshold\":1677397559,\"idleTimeExpiry\":547557787}]}") + .toObject(NativeIpv4PrefixLimitProperties.class); + Assertions.assertEquals(2110581374, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(968967519, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1672449978, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv4PrefixLimitProperties model = new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(2110581374) + .withThreshold(968967519) + .withIdleTimeExpiry(1672449978), + new PrefixLimitProperties().withMaximumRoutes(253020685) + .withThreshold(1677397559) + .withIdleTimeExpiry(547557787))); + model = BinaryData.fromObject(model).toObject(NativeIpv4PrefixLimitProperties.class); + Assertions.assertEquals(2110581374, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(968967519, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1672449978, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..79691108074d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv6PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv6PrefixLimitPatchProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":1972118177,\"threshold\":383202056,\"idleTimeExpiry\":437555374}]}") + .toObject(NativeIpv6PrefixLimitPatchProperties.class); + Assertions.assertEquals(1972118177, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(383202056, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(437555374, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv6PrefixLimitPatchProperties model = new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(1972118177) + .withThreshold(383202056) + .withIdleTimeExpiry(437555374))); + model = BinaryData.fromObject(model).toObject(NativeIpv6PrefixLimitPatchProperties.class); + Assertions.assertEquals(1972118177, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(383202056, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(437555374, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..85ab38730fe4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv6PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv6PrefixLimitProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":1251798259,\"threshold\":877909568,\"idleTimeExpiry\":1598132506}]}") + .toObject(NativeIpv6PrefixLimitProperties.class); + Assertions.assertEquals(1251798259, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(877909568, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1598132506, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv6PrefixLimitProperties model = new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(1251798259) + .withThreshold(877909568) + .withIdleTimeExpiry(1598132506))); + model = BinaryData.fromObject(model).toObject(NativeIpv6PrefixLimitProperties.class); + Assertions.assertEquals(1251798259, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(877909568, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1598132506, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java new file mode 100644 index 000000000000..65334eae411a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressBfdAdministrativeStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressBfdAdministrativeStatus model = BinaryData + .fromString("{\"neighborAddress\":\"m\",\"administrativeState\":\"Disabled\",\"error\":\"jlvzklk\"}") + .toObject(NeighborAddressBfdAdministrativeStatus.class); + Assertions.assertEquals("m", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.DISABLED, model.administrativeState()); + Assertions.assertEquals("jlvzklk", model.error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java new file mode 100644 index 000000000000..1e446f3387e2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressBgpAdministrativeStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressBgpAdministrativeStatus model = BinaryData + .fromString("{\"neighborAddress\":\"dj\",\"administrativeState\":\"Enabled\",\"error\":\"smqaz\"}") + .toObject(NeighborAddressBgpAdministrativeStatus.class); + Assertions.assertEquals("dj", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.ENABLED, model.administrativeState()); + Assertions.assertEquals("smqaz", model.error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java new file mode 100644 index 000000000000..02b53279ae01 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressPatch model = BinaryData.fromString( + "{\"address\":\"shuvftwaivmuqkev\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"}") + .toObject(NeighborAddressPatch.class); + Assertions.assertEquals("shuvftwaivmuqkev", model.address()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NeighborAddressPatch model = new NeighborAddressPatch().withAddress("shuvftwaivmuqkev"); + model = BinaryData.fromObject(model).toObject(NeighborAddressPatch.class); + Assertions.assertEquals("shuvftwaivmuqkev", model.address()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java index e801d1bd0216..8c434e416154 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,16 +11,16 @@ public final class NeighborAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NeighborAddress model - = BinaryData.fromString("{\"address\":\"zhzzwvywrg\",\"configurationState\":\"PendingCommit\"}") - .toObject(NeighborAddress.class); - Assertions.assertEquals("zhzzwvywrg", model.address()); + NeighborAddress model = BinaryData.fromString( + "{\"address\":\"txfvonfe\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"}") + .toObject(NeighborAddress.class); + Assertions.assertEquals("txfvonfe", model.address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborAddress model = new NeighborAddress().withAddress("zhzzwvywrg"); + NeighborAddress model = new NeighborAddress().withAddress("txfvonfe"); model = BinaryData.fromObject(model).toObject(NeighborAddress.class); - Assertions.assertEquals("zhzzwvywrg", model.address()); + Assertions.assertEquals("txfvonfe", model.address()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java new file mode 100644 index 000000000000..c1d6fe827472 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NeighborGroupDestinationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborGroupDestinationPatch model = BinaryData.fromString( + "{\"ipv4Addresses\":[\"gelg\",\"ewikfyaqandmym\",\"qoq\"],\"ipv6Addresses\":[\"ovsfb\",\"bvzo\",\"axmfmvsmcwoxfa\"]}") + .toObject(NeighborGroupDestinationPatch.class); + Assertions.assertEquals("gelg", model.ipv4Addresses().get(0)); + Assertions.assertEquals("ovsfb", model.ipv6Addresses().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NeighborGroupDestinationPatch model + = new NeighborGroupDestinationPatch().withIpv4Addresses(Arrays.asList("gelg", "ewikfyaqandmym", "qoq")) + .withIpv6Addresses(Arrays.asList("ovsfb", "bvzo", "axmfmvsmcwoxfa")); + model = BinaryData.fromObject(model).toObject(NeighborGroupDestinationPatch.class); + Assertions.assertEquals("gelg", model.ipv4Addresses().get(0)); + Assertions.assertEquals("ovsfb", model.ipv6Addresses().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java index bf707302f39a..09d7564f00d6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,19 @@ public final class NeighborGroupDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupDestination model = BinaryData.fromString( - "{\"ipv4Addresses\":[\"axxijvskwsdgkjgy\",\"cwrase\",\"wefcvoinw\",\"qartwy\"],\"ipv6Addresses\":[\"cladvatdavuqmcb\"]}") + "{\"ipv4Addresses\":[\"zbkuckgkdsksw\",\"iiqqcqikclsmalns\",\"woykdnonaaxwm\"],\"ipv6Addresses\":[\"ujlqcwnynlle\"]}") .toObject(NeighborGroupDestination.class); - Assertions.assertEquals("axxijvskwsdgkjgy", model.ipv4Addresses().get(0)); - Assertions.assertEquals("cladvatdavuqmcb", model.ipv6Addresses().get(0)); + Assertions.assertEquals("zbkuckgkdsksw", model.ipv4Addresses().get(0)); + Assertions.assertEquals("ujlqcwnynlle", model.ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NeighborGroupDestination model = new NeighborGroupDestination() - .withIpv4Addresses(Arrays.asList("axxijvskwsdgkjgy", "cwrase", "wefcvoinw", "qartwy")) - .withIpv6Addresses(Arrays.asList("cladvatdavuqmcb")); + .withIpv4Addresses(Arrays.asList("zbkuckgkdsksw", "iiqqcqikclsmalns", "woykdnonaaxwm")) + .withIpv6Addresses(Arrays.asList("ujlqcwnynlle")); model = BinaryData.fromObject(model).toObject(NeighborGroupDestination.class); - Assertions.assertEquals("axxijvskwsdgkjgy", model.ipv4Addresses().get(0)); - Assertions.assertEquals("cladvatdavuqmcb", model.ipv6Addresses().get(0)); + Assertions.assertEquals("zbkuckgkdsksw", model.ipv4Addresses().get(0)); + Assertions.assertEquals("ujlqcwnynlle", model.ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java index c5be3392a892..9b9881d2c5c4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -16,30 +19,34 @@ public final class NeighborGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupInner model = BinaryData.fromString( - "{\"properties\":{\"networkTapIds\":[\"kiiwvmtu\"],\"networkTapRuleIds\":[\"ymdjfua\",\"roqvqpilrgu\",\"canlduwzorxs\"],\"provisioningState\":\"Failed\",\"destination\":{\"ipv4Addresses\":[\"lxymxkqvfqe\",\"dxcltuubwyvpj\",\"owcpjqduqgixexky\",\"fbwljavhuerkjdd\"],\"ipv6Addresses\":[\"liegftcvbi\",\"ftksd\",\"gdnk\",\"fgmwd\"]},\"annotation\":\"eb\"},\"location\":\"czldbglzoutbaaqg\",\"tags\":{\"nzjotvmr\":\"ajclyzgsnorbjg\",\"ayfluiyuosnu\":\"khlobvvjbhvhdi\",\"hbuubpy\":\"dtelvhyibdrqrs\"},\"id\":\"owtjo\",\"name\":\"ztfwfqchvcz\",\"type\":\"vjnn\"}") + "{\"properties\":{\"annotation\":\"snxfbxu\",\"destination\":{\"ipv4Addresses\":[\"pdr\",\"zyvbsuadulpodk\",\"x\",\"f\"],\"ipv6Addresses\":[\"zh\",\"hjdqltdeluqr\"]},\"networkTapIds\":[\"dhfztlra\",\"srkgz\",\"yh\"],\"networkTapRuleIds\":[\"kuwpzqxlcw\",\"akfe\",\"jvxfaqufqizjvppw\"],\"networkFabricIds\":[\"jeyyjmjjxizxp\"],\"lastOperation\":{\"details\":\"zls\"},\"provisioningState\":\"Accepted\",\"configurationState\":\"Rejected\"},\"identity\":{\"principalId\":\"zkjtyqpdwadeg\",\"tenantId\":\"tldsvczdjiahuq\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ookyfoz\":{\"principalId\":\"cwwmejjqh\",\"clientId\":\"wvmqxi\"},\"swqi\":{\"principalId\":\"nzxbyp\",\"clientId\":\"pgaixwrgrkkderf\"},\"cqbsudzpgchzpg\":{\"principalId\":\"epwoggg\",\"clientId\":\"wnxhtf\"}}},\"location\":\"umjdjxhzghg\",\"tags\":{\"mxjdnaju\":\"ynrceqavfdbdf\",\"loqd\":\"pjyyqmkwlhvc\",\"uxxrwzobuzms\":\"jk\"},\"id\":\"g\",\"name\":\"mtdtkwppthuzd\",\"type\":\"rmimrljdpoqfxyem\"}") .toObject(NeighborGroupInner.class); - Assertions.assertEquals("czldbglzoutbaaqg", model.location()); - Assertions.assertEquals("ajclyzgsnorbjg", model.tags().get("nzjotvmr")); - Assertions.assertEquals("lxymxkqvfqe", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("liegftcvbi", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("eb", model.annotation()); + Assertions.assertEquals("umjdjxhzghg", model.location()); + Assertions.assertEquals("ynrceqavfdbdf", model.tags().get("mxjdnaju")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("snxfbxu", model.annotation()); + Assertions.assertEquals("pdr", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("zh", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupInner model = new NeighborGroupInner().withLocation("czldbglzoutbaaqg") - .withTags( - mapOf("nzjotvmr", "ajclyzgsnorbjg", "ayfluiyuosnu", "khlobvvjbhvhdi", "hbuubpy", "dtelvhyibdrqrs")) - .withDestination(new NeighborGroupDestination() - .withIpv4Addresses(Arrays.asList("lxymxkqvfqe", "dxcltuubwyvpj", "owcpjqduqgixexky", "fbwljavhuerkjdd")) - .withIpv6Addresses(Arrays.asList("liegftcvbi", "ftksd", "gdnk", "fgmwd"))) - .withAnnotation("eb"); + NeighborGroupInner model = new NeighborGroupInner().withLocation("umjdjxhzghg") + .withTags(mapOf("mxjdnaju", "ynrceqavfdbdf", "loqd", "pjyyqmkwlhvc", "uxxrwzobuzms", "jk")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("ookyfoz", new UserAssignedIdentity(), "swqi", + new UserAssignedIdentity(), "cqbsudzpgchzpg", new UserAssignedIdentity()))) + .withAnnotation("snxfbxu") + .withDestination( + new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("pdr", "zyvbsuadulpodk", "x", "f")) + .withIpv6Addresses(Arrays.asList("zh", "hjdqltdeluqr"))); model = BinaryData.fromObject(model).toObject(NeighborGroupInner.class); - Assertions.assertEquals("czldbglzoutbaaqg", model.location()); - Assertions.assertEquals("ajclyzgsnorbjg", model.tags().get("nzjotvmr")); - Assertions.assertEquals("lxymxkqvfqe", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("liegftcvbi", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("eb", model.annotation()); + Assertions.assertEquals("umjdjxhzghg", model.location()); + Assertions.assertEquals("ynrceqavfdbdf", model.tags().get("mxjdnaju")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("snxfbxu", model.annotation()); + Assertions.assertEquals("pdr", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("zh", model.destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java index 2206453d1f61..425b5d9b8e44 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -14,22 +14,22 @@ public final class NeighborGroupPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupPatchProperties model = BinaryData.fromString( - "{\"destination\":{\"ipv4Addresses\":[\"zgpmnma\",\"eddqilwgdfpfqfpc\"],\"ipv6Addresses\":[\"clg\"]},\"annotation\":\"vwerfwxbsmtb\"}") + "{\"annotation\":\"bzayspzvri\",\"destination\":{\"ipv4Addresses\":[\"phmdzxplgtp\",\"dvatlzmgschn\",\"rsbkkzovlzdmnfmf\"],\"ipv6Addresses\":[\"afofu\",\"orimmo\",\"zwdehkkmvhz\",\"ovanyrva\"]}}") .toObject(NeighborGroupPatchProperties.class); - Assertions.assertEquals("vwerfwxbsmtb", model.annotation()); - Assertions.assertEquals("zgpmnma", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("clg", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("bzayspzvri", model.annotation()); + Assertions.assertEquals("phmdzxplgtp", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("afofu", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupPatchProperties model = new NeighborGroupPatchProperties().withAnnotation("vwerfwxbsmtb") - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("zgpmnma", "eddqilwgdfpfqfpc")) - .withIpv6Addresses(Arrays.asList("clg"))); + NeighborGroupPatchProperties model = new NeighborGroupPatchProperties().withAnnotation("bzayspzvri") + .withDestination(new NeighborGroupDestinationPatch() + .withIpv4Addresses(Arrays.asList("phmdzxplgtp", "dvatlzmgschn", "rsbkkzovlzdmnfmf")) + .withIpv6Addresses(Arrays.asList("afofu", "orimmo", "zwdehkkmvhz", "ovanyrva"))); model = BinaryData.fromObject(model).toObject(NeighborGroupPatchProperties.class); - Assertions.assertEquals("vwerfwxbsmtb", model.annotation()); - Assertions.assertEquals("zgpmnma", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("clg", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("bzayspzvri", model.annotation()); + Assertions.assertEquals("phmdzxplgtp", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("afofu", model.destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java index 4c58ecd358fd..2089e51f08e8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -16,25 +19,32 @@ public final class NeighborGroupPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupPatch model = BinaryData.fromString( - "{\"properties\":{\"destination\":{\"ipv4Addresses\":[\"bjlquv\"],\"ipv6Addresses\":[\"cjumv\",\"simi\",\"yoi\",\"l\"]},\"annotation\":\"iqwnnraclibbfq\"},\"tags\":{\"hautw\":\"kladydg\"}}") + "{\"properties\":{\"annotation\":\"cbgvsbt\",\"destination\":{\"ipv4Addresses\":[\"oxa\",\"hxuvjhxm\",\"rqstjcme\",\"wmlgicvnpv\"],\"ipv6Addresses\":[\"gjnaqyqipsl\",\"mvcdsvmwbitek\"]}},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ybfzdqekivycp\":{\"principalId\":\"iy\",\"clientId\":\"qich\"},\"lpryf\":{\"principalId\":\"vdizulrqtbh\",\"clientId\":\"ezp\"},\"cgndjgdp\":{\"principalId\":\"mdutzfk\",\"clientId\":\"lnoud\"},\"htujcyohigimwdc\":{\"principalId\":\"ggqqyeqfcb\",\"clientId\":\"lpyuflqjf\"}}},\"tags\":{\"uyrzw\":\"kqnqvkixnmbzme\"}}") .toObject(NeighborGroupPatch.class); - Assertions.assertEquals("kladydg", model.tags().get("hautw")); - Assertions.assertEquals("bjlquv", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("cjumv", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("iqwnnraclibbfq", model.annotation()); + Assertions.assertEquals("kqnqvkixnmbzme", model.tags().get("uyrzw")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("cbgvsbt", model.annotation()); + Assertions.assertEquals("oxa", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("gjnaqyqipsl", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupPatch model = new NeighborGroupPatch().withTags(mapOf("hautw", "kladydg")) - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("bjlquv")) - .withIpv6Addresses(Arrays.asList("cjumv", "simi", "yoi", "l"))) - .withAnnotation("iqwnnraclibbfq"); + NeighborGroupPatch model = new NeighborGroupPatch().withTags(mapOf("uyrzw", "kqnqvkixnmbzme")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf("ybfzdqekivycp", new UserAssignedIdentity(), "lpryf", new UserAssignedIdentity(), "cgndjgdp", + new UserAssignedIdentity(), "htujcyohigimwdc", new UserAssignedIdentity()))) + .withAnnotation("cbgvsbt") + .withDestination(new NeighborGroupDestinationPatch() + .withIpv4Addresses(Arrays.asList("oxa", "hxuvjhxm", "rqstjcme", "wmlgicvnpv")) + .withIpv6Addresses(Arrays.asList("gjnaqyqipsl", "mvcdsvmwbitek"))); model = BinaryData.fromObject(model).toObject(NeighborGroupPatch.class); - Assertions.assertEquals("kladydg", model.tags().get("hautw")); - Assertions.assertEquals("bjlquv", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("cjumv", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("iqwnnraclibbfq", model.annotation()); + Assertions.assertEquals("kqnqvkixnmbzme", model.tags().get("uyrzw")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("cbgvsbt", model.annotation()); + Assertions.assertEquals("oxa", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("gjnaqyqipsl", model.destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java deleted file mode 100644 index 7ca467b5e41b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchableProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NeighborGroupPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NeighborGroupPatchableProperties model = BinaryData.fromString( - "{\"destination\":{\"ipv4Addresses\":[\"krie\",\"bgnixxoww\",\"kyfwnwpiwxeiicr\"],\"ipv6Addresses\":[\"pk\"]}}") - .toObject(NeighborGroupPatchableProperties.class); - Assertions.assertEquals("krie", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("pk", model.destination().ipv6Addresses().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeighborGroupPatchableProperties model = new NeighborGroupPatchableProperties().withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("krie", "bgnixxoww", "kyfwnwpiwxeiicr")) - .withIpv6Addresses(Arrays.asList("pk"))); - model = BinaryData.fromObject(model).toObject(NeighborGroupPatchableProperties.class); - Assertions.assertEquals("krie", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("pk", model.destination().ipv6Addresses().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java index 42a2a43fe8bd..a3201cd47534 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,21 +14,22 @@ public final class NeighborGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupProperties model = BinaryData.fromString( - "{\"networkTapIds\":[\"gfyvrtpqpe\",\"hzcgkrepdqhqyhwq\",\"e\"],\"networkTapRuleIds\":[\"qabckmzeoxin\",\"greohtwhlpuzjp\",\"eezn\"],\"provisioningState\":\"Accepted\",\"destination\":{\"ipv4Addresses\":[\"bfaxyxzlbc\"],\"ipv6Addresses\":[\"msexroqr\"]},\"annotation\":\"ktxfvonfe\"}") + "{\"annotation\":\"ftb\",\"destination\":{\"ipv4Addresses\":[\"htecloa\",\"fmxtllf\",\"tymqcnrrfijhggab\",\"bgamklilirwd\"],\"ipv6Addresses\":[\"hsdp\",\"ouh\",\"tqrxqwqnjxrdf\"]},\"networkTapIds\":[\"ullygtavczcx\"],\"networkTapRuleIds\":[\"eapyfmlxrlj\",\"h\",\"aspiflei\",\"ixlmdbgic\"],\"networkFabricIds\":[\"gs\",\"drjuqbp\",\"tokljmtznpaxw\"],\"lastOperation\":{\"details\":\"yyqiprcltungbsol\"},\"provisioningState\":\"Updating\",\"configurationState\":\"PendingAdministrativeUpdate\"}") .toObject(NeighborGroupProperties.class); - Assertions.assertEquals("ktxfvonfe", model.annotation()); - Assertions.assertEquals("bfaxyxzlbc", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("msexroqr", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("ftb", model.annotation()); + Assertions.assertEquals("htecloa", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("hsdp", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupProperties model = new NeighborGroupProperties().withAnnotation("ktxfvonfe") - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("bfaxyxzlbc")) - .withIpv6Addresses(Arrays.asList("msexroqr"))); + NeighborGroupProperties model = new NeighborGroupProperties().withAnnotation("ftb") + .withDestination(new NeighborGroupDestination() + .withIpv4Addresses(Arrays.asList("htecloa", "fmxtllf", "tymqcnrrfijhggab", "bgamklilirwd")) + .withIpv6Addresses(Arrays.asList("hsdp", "ouh", "tqrxqwqnjxrdf"))); model = BinaryData.fromObject(model).toObject(NeighborGroupProperties.class); - Assertions.assertEquals("ktxfvonfe", model.annotation()); - Assertions.assertEquals("bfaxyxzlbc", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("msexroqr", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("ftb", model.annotation()); + Assertions.assertEquals("htecloa", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("hsdp", model.destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java index 11bc9491e1d3..7557f4264fa4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -25,31 +28,34 @@ public final class NeighborGroupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkTapIds\":[\"ygkxrlfojlclp\",\"mveybodhrv\"],\"networkTapRuleIds\":[\"u\",\"mwb\"],\"provisioningState\":\"Succeeded\",\"destination\":{\"ipv4Addresses\":[\"gpdxtsaujtco\"],\"ipv6Addresses\":[\"bolqoxuptsl\",\"ivmlkwkzli\",\"vamtyk\",\"szde\"]},\"annotation\":\"xcsq\"},\"location\":\"do\",\"tags\":{\"eohpl\":\"kdpc\",\"edaxkuyorfjidqo\":\"gcnbvmhvqp\",\"vfyihuzsbpwn\":\"aweog\",\"zgkooagrlwpame\":\"fjcypazwiimd\"},\"id\":\"itwqadewhu\",\"name\":\"xkyxiatfamrna\",\"type\":\"fllxc\"}"; + = "{\"properties\":{\"annotation\":\"gqin\",\"destination\":{\"ipv4Addresses\":[\"xouknzhmzassrsqz\",\"knbtxtdmutdrrqq\"],\"ipv6Addresses\":[\"klttliuwdrtwqj\",\"tyaqd\",\"wfnom\",\"iwhumngihfndsj\"]},\"networkTapIds\":[\"lfvrpbcgdptf\",\"offckejx\",\"mng\"],\"networkTapRuleIds\":[\"xxynt\",\"rnksvximgnsiycx\",\"yzrnngnmfhmwfou\",\"mdomvdi\"],\"networkFabricIds\":[\"qalwlirapqhsidf\",\"sfnoczefgfqxejj\",\"tiqbxzeiudog\"],\"lastOperation\":{\"details\":\"rbroeomufaz\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"PendingAdministrativeUpdate\"},\"identity\":{\"principalId\":\"pbsspexejhwpnjco\",\"tenantId\":\"jzbovuvmdz\",\"type\":\"None\",\"userAssignedIdentities\":{\"jzkhncaeyk\":{\"principalId\":\"guajsrdecbowkh\",\"clientId\":\"ffllpdnnsujxoueq\"}}},\"location\":\"atztnprnsh\",\"tags\":{\"tjyisjscuwylukt\":\"ahvlzgsqwiubgb\",\"xrziry\":\"cuxuxaihheg\",\"mxqvv\":\"rpjru\",\"rnjvzlynv\":\"poftsapfwusf\"},\"id\":\"empvubs\",\"name\":\"wzntbi\",\"type\":\"u\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NeighborGroup response = manager.neighborGroups() - .define("qmbinpxmiwt") - .withRegion("tohgpzwxyv") - .withExistingResourceGroup("fz") - .withTags(mapOf("xpu", "bhi", "wnfhmjusuqnku", "dd")) - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("ipssv", "o", "ijcqcjozz", "kug")) - .withIpv6Addresses(Arrays.asList("qbtokvocuzxl"))) - .withAnnotation("pwarhw") + .define("lsuhsghdovcp") + .withRegion("uxotbvflg") + .withExistingResourceGroup("ojikffczwaewp") + .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("gagv")) + .withIpv6Addresses(Arrays.asList("xzcda", "khtwhhs", "bomf", "ojker"))) + .withTags(mapOf("taevqafdhpkiiu", "uqhopafobpyeob", "vdtqhrtn", "yrobckelowsm")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("ujvqzcuqculwnx", new UserAssignedIdentity(), "e", + new UserAssignedIdentity(), "fqftywbbanzhd", new UserAssignedIdentity()))) + .withAnnotation("f") .create(); - Assertions.assertEquals("do", response.location()); - Assertions.assertEquals("kdpc", response.tags().get("eohpl")); - Assertions.assertEquals("gpdxtsaujtco", response.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("bolqoxuptsl", response.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("xcsq", response.annotation()); + Assertions.assertEquals("atztnprnsh", response.location()); + Assertions.assertEquals("ahvlzgsqwiubgb", response.tags().get("tjyisjscuwylukt")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("gqin", response.annotation()); + Assertions.assertEquals("xouknzhmzassrsqz", response.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("klttliuwdrtwqj", response.destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java index b0f74a8f32c1..6636d1c853a0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,23 +22,24 @@ public final class NeighborGroupsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkTapIds\":[\"fmcoxbktuaj\"],\"networkTapRuleIds\":[\"pvvd\"],\"provisioningState\":\"Deleting\",\"destination\":{\"ipv4Addresses\":[\"mnobbai\",\"cfbfy\",\"zaisfofg\"],\"ipv6Addresses\":[\"kmgifm\",\"z\",\"u\",\"dnhhc\"]},\"annotation\":\"slptbdponhblqivc\"},\"location\":\"qfpzjz\",\"tags\":{\"mruawqesqsqmiekx\":\"cwtwtrchk\",\"qchf\":\"p\",\"cu\":\"tykkvjjlba\"},\"id\":\"zyqokbgum\",\"name\":\"ejxxpx\",\"type\":\"izchmb\"}"; + = "{\"properties\":{\"annotation\":\"moazsjsuevfvnn\",\"destination\":{\"ipv4Addresses\":[\"cvx\",\"bxg\",\"k\"],\"ipv6Addresses\":[\"riwxe\"]},\"networkTapIds\":[\"vwqldil\"],\"networkTapRuleIds\":[\"vz\",\"bk\",\"al\",\"bxldl\"],\"networkFabricIds\":[\"mibq\",\"ldhttkalpqln\",\"yevjealxlewlwb\"],\"lastOperation\":{\"details\":\"qfdkkviji\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"ErrorDeprovisioning\"},\"identity\":{\"principalId\":\"owdqvqfldaqoao\",\"tenantId\":\"qpfwnjdyoxformfe\",\"type\":\"None\",\"userAssignedIdentities\":{\"pqttusux\":{\"principalId\":\"neszx\",\"clientId\":\"snhxphxokdbv\"},\"grxzcnwguezx\":{\"principalId\":\"z\",\"clientId\":\"vueijrnn\"},\"uuuyvpcf\":{\"principalId\":\"imkwbwmgqzq\",\"clientId\":\"nycchpcjztz\"}}},\"location\":\"njxciunetcxgdg\",\"tags\":{\"tjdrqgionmoky\":\"etlwavtzbphxxv\"},\"id\":\"mtdnymbeey\",\"name\":\"kbqlcaklesjg\",\"type\":\"dhgezyhpha\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NeighborGroup response = manager.neighborGroups() - .getByResourceGroupWithResponse("iuj", "icwmlfzl", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("xzjehdklvqtmzoci", "etctjh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qfpzjz", response.location()); - Assertions.assertEquals("cwtwtrchk", response.tags().get("mruawqesqsqmiekx")); - Assertions.assertEquals("mnobbai", response.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("kmgifm", response.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("slptbdponhblqivc", response.annotation()); + Assertions.assertEquals("njxciunetcxgdg", response.location()); + Assertions.assertEquals("etlwavtzbphxxv", response.tags().get("tjdrqgionmoky")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("moazsjsuevfvnn", response.annotation()); + Assertions.assertEquals("cvx", response.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("riwxe", response.destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java index 970c39fbc837..30cbb2d5bcc8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,22 +23,24 @@ public final class NeighborGroupsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapIds\":[\"jkngzfs\",\"laybhozlsb\",\"fnhbvcntpoe\",\"ytrsljzmzui\"],\"networkTapRuleIds\":[\"gsxzn\",\"p\"],\"provisioningState\":\"Accepted\",\"destination\":{\"ipv4Addresses\":[\"lbbnjld\"],\"ipv6Addresses\":[\"omanefwlenit\"]},\"annotation\":\"yahfoyfz\"},\"location\":\"dyaepre\",\"tags\":{\"vqbeqpucnus\":\"ukfalwceechca\",\"hicrjriy\":\"yl\",\"ofsnq\":\"fbydrlqll\",\"gseiqb\":\"cybrhxgiknrl\"},\"id\":\"oqjfeamzkuxdgpks\",\"name\":\"otbunvnjqldr\",\"type\":\"qvcugusqlxlx\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"mxgglkqitpbyne\",\"destination\":{\"ipv4Addresses\":[\"ux\"],\"ipv6Addresses\":[\"cleffgggglzs\",\"ouhmngccnkgius\"]},\"networkTapIds\":[\"wcpspaoxigpd\",\"ouppgp\",\"smglutnlynplxx\"],\"networkTapRuleIds\":[\"gxkidbcxbg\"],\"networkFabricIds\":[\"cfwlwn\"],\"lastOperation\":{\"details\":\"nmop\"},\"provisioningState\":\"Accepted\",\"configurationState\":\"Deprovisioning\"},\"identity\":{\"principalId\":\"ugimvief\",\"tenantId\":\"esmiyjkhjuue\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dxu\":{\"principalId\":\"wnajbbpxqsvaxv\",\"clientId\":\"isdwtug\"},\"llhkzunnwmwwxy\":{\"principalId\":\"pgc\",\"clientId\":\"iwhtjox\"}}},\"location\":\"xkdvevhyu\",\"tags\":{\"kubljnizwztlcrx\":\"apcqmcvur\",\"qrd\":\"iiifgxnfarmfi\",\"lzlrmrtcsmp\":\"rvtr\",\"bdb\":\"hlcxbaxcgcdfelva\"},\"id\":\"cjznt\",\"name\":\"blxeyg\",\"type\":\"suhroicj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.neighborGroups().listByResourceGroup("zgi", com.azure.core.util.Context.NONE); + = manager.neighborGroups().listByResourceGroup("kh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dyaepre", response.iterator().next().location()); - Assertions.assertEquals("ukfalwceechca", response.iterator().next().tags().get("vqbeqpucnus")); - Assertions.assertEquals("lbbnjld", response.iterator().next().destination().ipv4Addresses().get(0)); - Assertions.assertEquals("omanefwlenit", response.iterator().next().destination().ipv6Addresses().get(0)); - Assertions.assertEquals("yahfoyfz", response.iterator().next().annotation()); + Assertions.assertEquals("xkdvevhyu", response.iterator().next().location()); + Assertions.assertEquals("apcqmcvur", response.iterator().next().tags().get("kubljnizwztlcrx")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("mxgglkqitpbyne", response.iterator().next().annotation()); + Assertions.assertEquals("ux", response.iterator().next().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("cleffgggglzs", response.iterator().next().destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java index ee396fe13758..efb4fcb61598 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,21 +23,22 @@ public final class NeighborGroupsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapIds\":[\"hfwlnvqacbyfisb\",\"nlmpuyypaggpaih\"],\"networkTapRuleIds\":[\"yzwloqrmgd\"],\"provisioningState\":\"Failed\",\"destination\":{\"ipv4Addresses\":[\"lxtywukhj\",\"spllitxrrgkw\",\"yoy\",\"qoivxcodw\"],\"ipv6Addresses\":[\"ytcachhsizfuew\",\"fwfiikqcdnzsfi\",\"hgneo\"]},\"annotation\":\"mcrxlyzoaho\"},\"location\":\"fakrxjjwnbrmdw\",\"tags\":{\"nistcjhatc\":\"nlsyia\",\"anapfaoiz\":\"pphcstmryc\",\"mzc\":\"inlpxngzzxqbgqn\",\"pucv\":\"bxzjkpi\"},\"id\":\"dozw\",\"name\":\"sk\",\"type\":\"e\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"qdymoa\",\"destination\":{\"ipv4Addresses\":[\"cmdix\"],\"ipv6Addresses\":[\"qbcalgspzoafp\",\"zlvhohzkcsjddzpo\",\"mnmkypeqmuue\"]},\"networkTapIds\":[\"krulavxe\",\"y\"],\"networkTapRuleIds\":[\"chwpfunptsry\",\"jaekbw\",\"xvsytbxcjubad\"],\"networkFabricIds\":[\"jquliovrc\",\"nthluze\",\"valezkyfykm\"],\"lastOperation\":{\"details\":\"asuwep\"},\"provisioningState\":\"Failed\",\"configurationState\":\"Deprovisioning\"},\"identity\":{\"principalId\":\"yc\",\"tenantId\":\"ufutfqffw\",\"type\":\"None\",\"userAssignedIdentities\":{\"s\":{\"principalId\":\"rykshizw\",\"clientId\":\"wikyew\"},\"c\":{\"principalId\":\"wqzwsg\",\"clientId\":\"pqqemeftlgjrfkq\"},\"bnoisbmvrmenrcqi\":{\"principalId\":\"elokxklgl\",\"clientId\":\"regjo\"},\"ntyuq\":{\"principalId\":\"hvps\",\"clientId\":\"uiuvingmonq\"}}},\"location\":\"xyoj\",\"tags\":{\"aysckydqyjzwmfw\":\"ykfjga\",\"gvmuotcseabfy\":\"qziz\",\"nqrbyqhywxbowcjk\":\"ampvwxlkhprltxip\"},\"id\":\"r\",\"name\":\"gvyuewgylol\",\"type\":\"xwlql\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.neighborGroups().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("fakrxjjwnbrmdw", response.iterator().next().location()); - Assertions.assertEquals("nlsyia", response.iterator().next().tags().get("nistcjhatc")); - Assertions.assertEquals("lxtywukhj", response.iterator().next().destination().ipv4Addresses().get(0)); - Assertions.assertEquals("ytcachhsizfuew", response.iterator().next().destination().ipv6Addresses().get(0)); - Assertions.assertEquals("mcrxlyzoaho", response.iterator().next().annotation()); + Assertions.assertEquals("xyoj", response.iterator().next().location()); + Assertions.assertEquals("ykfjga", response.iterator().next().tags().get("aysckydqyjzwmfw")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("qdymoa", response.iterator().next().annotation()); + Assertions.assertEquals("cmdix", response.iterator().next().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("qbcalgspzoafp", response.iterator().next().destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java index 5cf0e2290565..ac166be85003 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java @@ -1,69 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class NeighborGroupsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkTapIds\":[\"hci\"],\"networkTapRuleIds\":[\"dv\"],\"provisioningState\":\"Deleting\",\"destination\":{\"ipv4Addresses\":[\"qhs\"],\"ipv6Addresses\":[\"fpwpqbyejuwyqwd\",\"igmghginztx\",\"ujkhnjcmrnkfmkh\"]},\"annotation\":\"twmlmhjnqtqeah\"},\"location\":\"dvragpokddxejhh\",\"tags\":{\"tbkewkqynspg\":\"uavt\",\"qokmyrljial\":\"voffbkkwvdxae\"},\"id\":\"bn\",\"name\":\"brqlpbcjtrpz\",\"type\":\"yudivbxnhsqeaeo\"},{\"properties\":{\"networkTapIds\":[\"lwgdhuruz\"],\"networkTapRuleIds\":[\"arogatmolji\"],\"provisioningState\":\"Updating\",\"destination\":{\"ipv4Addresses\":[\"mzvfkneerz\",\"trknsjulu\"],\"ipv6Addresses\":[\"bnhrxlelfjhkeiz\",\"pihtdmiwjekpt\",\"caydbjzcqymlcfnz\",\"mhsurlgwqkpmm\"]},\"annotation\":\"stauolawi\"},\"location\":\"momsgvvj\",\"tags\":{\"q\":\"lrlohewjjmajnkdf\",\"kzfzqxjosho\":\"onswae\",\"znlw\":\"totryegpkhxrme\",\"ze\":\"bfokxkhu\"},\"id\":\"ufgjblcdr\",\"name\":\"yfcemftz\",\"type\":\"yykyalu\"}],\"nextLink\":\"kd\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"nqifb\",\"destination\":{\"ipv4Addresses\":[\"roiauesugmo\",\"pcjycb\",\"elrgttwfldsiuo\"],\"ipv6Addresses\":[\"ikcedpk\",\"riwmmtmqrxrzqv\"]},\"networkTapIds\":[\"zyayubtgmbxi\",\"ahr\",\"gpx\",\"ibplnupoyryefqm\"],\"networkTapRuleIds\":[\"yztxlno\",\"fpbjc\"],\"networkFabricIds\":[\"vyieztkutnjilluk\",\"rehyhtmj\",\"dui\",\"vulxfar\"],\"lastOperation\":{\"details\":\"jlgdez\"},\"provisioningState\":\"Canceled\",\"configurationState\":\"DeferredControl\"},\"identity\":{\"principalId\":\"yiyaxqvjweiwtczk\",\"tenantId\":\"nvovbooqbmdqrxy\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"cuxd\":{\"principalId\":\"scflwtjdtlri\",\"clientId\":\"ooy\"}}},\"location\":\"c\",\"tags\":{\"omehx\":\"sdudgcoz\",\"lczipvwdtgc\":\"antolamlbijuxkq\"},\"id\":\"zdqiqdlrat\",\"name\":\"kwx\",\"type\":\"auwxsuykznhrfgsl\"},{\"properties\":{\"annotation\":\"hpryjfzihuioa\",\"destination\":{\"ipv4Addresses\":[\"pajtfeyvkbd\",\"dd\"],\"ipv6Addresses\":[\"dccxbeuuqu\",\"kzwtjwwguzytij\"]},\"networkTapIds\":[\"nondegjdyd\"],\"networkTapRuleIds\":[\"kkbjuckcatuq\",\"hpowcnxtpzdl\",\"seidtoakatpr\",\"tgrhz\"],\"networkFabricIds\":[\"d\",\"fa\",\"rptvcshtkutzcttb\",\"gdirda\"],\"lastOperation\":{\"details\":\"zjgcfjfx\"},\"provisioningState\":\"Canceled\",\"configurationState\":\"DeferredControl\"},\"identity\":{\"principalId\":\"muy\",\"tenantId\":\"fttm\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"iygmgs\":{\"principalId\":\"oagfuoftnxodwx\",\"clientId\":\"aj\"},\"dtjva\":{\"principalId\":\"mdmze\",\"clientId\":\"rstgfczljdnc\"},\"cvucgytoxu\":{\"principalId\":\"yznm\",\"clientId\":\"cdo\"}}},\"location\":\"ttnzqsaq\",\"tags\":{\"ekpdzzmssg\":\"gszplus\",\"yejidbdqzsqun\":\"gvo\",\"mrkkyjtr\":\"cwztlvvws\"},\"id\":\"pwpwfkcauxuva\",\"name\":\"cpfpdofuckcl\",\"type\":\"txluevs\"},{\"properties\":{\"annotation\":\"zwilfngo\",\"destination\":{\"ipv4Addresses\":[\"qebuuxjxhfxfjwp\"],\"ipv6Addresses\":[\"tpmbmxbmbrwgz\",\"xljbkhxsd\"]},\"networkTapIds\":[\"umyd\"],\"networkTapRuleIds\":[\"eqjfyxydgtokvq\",\"vwglgwzpv\",\"akglhpsesrfga\"],\"networkFabricIds\":[\"yd\",\"xcgdhyhgoqgso\"],\"lastOperation\":{\"details\":\"xyjrcbqpb\"},\"provisioningState\":\"Updating\",\"configurationState\":\"Deprovisioning\"},\"identity\":{\"principalId\":\"o\",\"tenantId\":\"dahneaoovty\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"srmau\":{\"principalId\":\"fwjlof\",\"clientId\":\"k\"},\"ee\":{\"principalId\":\"ajvcfoczhapej\",\"clientId\":\"tkwxnhwhhnoyrzaa\"},\"l\":{\"principalId\":\"mjenvjeatea\",\"clientId\":\"crxoxdj\"}}},\"location\":\"a\",\"tags\":{\"vxvzaledoyqxlun\":\"inzkdolrndwd\"},\"id\":\"fthmcxqqxmy\",\"name\":\"klaoa\",\"type\":\"pohrvm\"}],\"nextLink\":\"qr\"}") .toObject(NeighborGroupsListResult.class); - Assertions.assertEquals("dvragpokddxejhh", model.value().get(0).location()); - Assertions.assertEquals("uavt", model.value().get(0).tags().get("tbkewkqynspg")); - Assertions.assertEquals("qhs", model.value().get(0).destination().ipv4Addresses().get(0)); - Assertions.assertEquals("fpwpqbyejuwyqwd", model.value().get(0).destination().ipv6Addresses().get(0)); - Assertions.assertEquals("twmlmhjnqtqeah", model.value().get(0).annotation()); - Assertions.assertEquals("kd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeighborGroupsListResult model - = new NeighborGroupsListResult() - .withValue(Arrays.asList( - new NeighborGroupInner().withLocation("dvragpokddxejhh") - .withTags(mapOf("tbkewkqynspg", "uavt", "qokmyrljial", "voffbkkwvdxae")) - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("qhs")) - .withIpv6Addresses(Arrays.asList("fpwpqbyejuwyqwd", "igmghginztx", "ujkhnjcmrnkfmkh"))) - .withAnnotation("twmlmhjnqtqeah"), - new NeighborGroupInner().withLocation("momsgvvj") - .withTags(mapOf("q", "lrlohewjjmajnkdf", "kzfzqxjosho", "onswae", "znlw", "totryegpkhxrme", - "ze", "bfokxkhu")) - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("mzvfkneerz", "trknsjulu")) - .withIpv6Addresses(Arrays.asList("bnhrxlelfjhkeiz", "pihtdmiwjekpt", "caydbjzcqymlcfnz", - "mhsurlgwqkpmm"))) - .withAnnotation("stauolawi"))) - .withNextLink("kd"); - model = BinaryData.fromObject(model).toObject(NeighborGroupsListResult.class); - Assertions.assertEquals("dvragpokddxejhh", model.value().get(0).location()); - Assertions.assertEquals("uavt", model.value().get(0).tags().get("tbkewkqynspg")); - Assertions.assertEquals("qhs", model.value().get(0).destination().ipv4Addresses().get(0)); - Assertions.assertEquals("fpwpqbyejuwyqwd", model.value().get(0).destination().ipv6Addresses().get(0)); - Assertions.assertEquals("twmlmhjnqtqeah", model.value().get(0).annotation()); - Assertions.assertEquals("kd", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("c", model.value().get(0).location()); + Assertions.assertEquals("sdudgcoz", model.value().get(0).tags().get("omehx")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + model.value().get(0).identity().type()); + Assertions.assertEquals("nqifb", model.value().get(0).annotation()); + Assertions.assertEquals("roiauesugmo", model.value().get(0).destination().ipv4Addresses().get(0)); + Assertions.assertEquals("ikcedpk", model.value().get(0).destination().ipv6Addresses().get(0)); + Assertions.assertEquals("qr", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceInnerTests.java new file mode 100644 index 000000000000..a566a5f0cab2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceInnerTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapDeviceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapDeviceInner model = BinaryData.fromString( + "{\"properties\":{\"annotation\":\"wqufudp\",\"hostName\":\"boqlefxf\",\"serialNumber\":\"majvwfi\",\"version\":\"djjrvsvhmsmri\",\"networkDeviceSku\":\"dnbwlbqntdderrx\",\"networkFabricId\":\"wuzpsvcm\",\"secondaryManagementIpv4Address\":\"fstyyysq\",\"dhcpV4ServerIpAddress\":\"nlcfzfjdz\",\"primaryManagementIpv6Address\":\"thsydphdbz\",\"secondaryManagementIpv6Address\":\"tf\",\"provisioningState\":\"Accepted\",\"primaryManagementIpv4Address\":\"bvhvd\",\"administrativeState\":\"RMA\",\"configurationState\":\"PendingAdministrativeUpdate\"},\"identity\":{\"principalId\":\"s\",\"tenantId\":\"h\",\"type\":\"None\",\"userAssignedIdentities\":{\"bzghpsotbameirbu\":{\"principalId\":\"enpftk\",\"clientId\":\"bmvxbi\"},\"rlurgip\":{\"principalId\":\"aqsvruuhyncpp\",\"clientId\":\"whj\"},\"iihrfcowlase\":{\"principalId\":\"bxlepsmckgpxdx\",\"clientId\":\"qmguvdk\"},\"otdtmcktkal\":{\"principalId\":\"fywxjjylaqhxevf\",\"clientId\":\"rvjhwgkynxlwrj\"}}},\"location\":\"i\",\"tags\":{\"og\":\"nkylzrignql\"},\"id\":\"nbjuaiu\",\"name\":\"emqcbnkiv\",\"type\":\"xiathmaryywyf\"}") + .toObject(NetworkBootstrapDeviceInner.class); + Assertions.assertEquals("i", model.location()); + Assertions.assertEquals("nkylzrignql", model.tags().get("og")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("wqufudp", model.annotation()); + Assertions.assertEquals("boqlefxf", model.hostName()); + Assertions.assertEquals("majvwfi", model.serialNumber()); + Assertions.assertEquals("dnbwlbqntdderrx", model.networkDeviceSku()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapDeviceInner model = new NetworkBootstrapDeviceInner().withLocation("i") + .withTags(mapOf("og", "nkylzrignql")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("bzghpsotbameirbu", new UserAssignedIdentity(), "rlurgip", new UserAssignedIdentity(), + "iihrfcowlase", new UserAssignedIdentity(), "otdtmcktkal", new UserAssignedIdentity()))) + .withAnnotation("wqufudp") + .withHostName("boqlefxf") + .withSerialNumber("majvwfi") + .withNetworkDeviceSku("dnbwlbqntdderrx"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapDeviceInner.class); + Assertions.assertEquals("i", model.location()); + Assertions.assertEquals("nkylzrignql", model.tags().get("og")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("wqufudp", model.annotation()); + Assertions.assertEquals("boqlefxf", model.hostName()); + Assertions.assertEquals("majvwfi", model.serialNumber()); + Assertions.assertEquals("dnbwlbqntdderrx", model.networkDeviceSku()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceListResultTests.java new file mode 100644 index 000000000000..04be790dca4f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDeviceListResultTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapDeviceListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapDeviceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapDeviceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"ghgermmadkbxuips\",\"hostName\":\"wxugpubeqkwxz\",\"serialNumber\":\"zgueuygpbh\",\"version\":\"hejmswelygxxzx\",\"networkDeviceSku\":\"nqwdjvlwqzxy\",\"networkFabricId\":\"wsfxqc\",\"secondaryManagementIpv4Address\":\"jezjcbciuaga\",\"dhcpV4ServerIpAddress\":\"xgwwm\",\"primaryManagementIpv6Address\":\"llpfjgu\",\"secondaryManagementIpv6Address\":\"yfwa\",\"provisioningState\":\"Canceled\",\"primaryManagementIpv4Address\":\"oxxbzagwnomp\",\"administrativeState\":\"Enabled\",\"configurationState\":\"ErrorProvisioning\"},\"identity\":{\"principalId\":\"cuf\",\"tenantId\":\"alb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jqhjenbdupfp\":{\"principalId\":\"xqfzmhkridipwczj\",\"clientId\":\"mpi\"}}},\"location\":\"osadjff\",\"tags\":{\"eoka\":\"sfghy\",\"mny\":\"zuddccclsnflcxx\"},\"id\":\"k\",\"name\":\"gslkokqaqgz\",\"type\":\"ojgdqjhzf\"}],\"nextLink\":\"jgpjnydkkgbvsqks\"}") + .toObject(NetworkBootstrapDeviceListResult.class); + Assertions.assertEquals("osadjff", model.value().get(0).location()); + Assertions.assertEquals("sfghy", model.value().get(0).tags().get("eoka")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("ghgermmadkbxuips", model.value().get(0).annotation()); + Assertions.assertEquals("wxugpubeqkwxz", model.value().get(0).hostName()); + Assertions.assertEquals("zgueuygpbh", model.value().get(0).serialNumber()); + Assertions.assertEquals("nqwdjvlwqzxy", model.value().get(0).networkDeviceSku()); + Assertions.assertEquals("jgpjnydkkgbvsqks", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchPropertiesTests.java new file mode 100644 index 000000000000..b88520ceb0f1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchPropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDevicePatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapDevicePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapDevicePatchProperties model = BinaryData.fromString( + "{\"annotation\":\"rzplhaljomg\",\"hostName\":\"rprraptvbjenylg\",\"serialNumber\":\"rsnvofuyzvbploa\"}") + .toObject(NetworkBootstrapDevicePatchProperties.class); + Assertions.assertEquals("rzplhaljomg", model.annotation()); + Assertions.assertEquals("rprraptvbjenylg", model.hostName()); + Assertions.assertEquals("rsnvofuyzvbploa", model.serialNumber()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapDevicePatchProperties model + = new NetworkBootstrapDevicePatchProperties().withAnnotation("rzplhaljomg") + .withHostName("rprraptvbjenylg") + .withSerialNumber("rsnvofuyzvbploa"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapDevicePatchProperties.class); + Assertions.assertEquals("rzplhaljomg", model.annotation()); + Assertions.assertEquals("rprraptvbjenylg", model.hostName()); + Assertions.assertEquals("rsnvofuyzvbploa", model.serialNumber()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchTests.java new file mode 100644 index 000000000000..d103257bdeef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePatchTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevicePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapDevicePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapDevicePatch model = BinaryData.fromString( + "{\"properties\":{\"annotation\":\"aalwid\",\"hostName\":\"bwedjrikzppgij\",\"serialNumber\":\"u\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mgersdudh\":{\"principalId\":\"gaxpy\",\"clientId\":\"mccqdss\"},\"nozzfysffrpjfxs\":{\"principalId\":\"smnfgzmxtxfuhxy\",\"clientId\":\"fyzevcknglf\"},\"ykqrqtxqogr\":{\"principalId\":\"cdosyhhwpufrspre\",\"clientId\":\"lqcskxkte\"}}},\"tags\":{\"vmbdgexpnp\":\"mnacklyr\",\"api\":\"tqwfpjpsbcxqi\",\"wcgrzafqsozawq\":\"cjlfugnrz\",\"xdwtfmf\":\"nhlvagug\"}}") + .toObject(NetworkBootstrapDevicePatch.class); + Assertions.assertEquals("mnacklyr", model.tags().get("vmbdgexpnp")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("aalwid", model.annotation()); + Assertions.assertEquals("bwedjrikzppgij", model.hostName()); + Assertions.assertEquals("u", model.serialNumber()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapDevicePatch model = new NetworkBootstrapDevicePatch() + .withTags(mapOf("vmbdgexpnp", "mnacklyr", "api", "tqwfpjpsbcxqi", "wcgrzafqsozawq", "cjlfugnrz", "xdwtfmf", + "nhlvagug")) + .withIdentity( + new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("mgersdudh", new UserAssignedIdentity(), "nozzfysffrpjfxs", + new UserAssignedIdentity(), "ykqrqtxqogr", new UserAssignedIdentity()))) + .withAnnotation("aalwid") + .withHostName("bwedjrikzppgij") + .withSerialNumber("u"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapDevicePatch.class); + Assertions.assertEquals("mnacklyr", model.tags().get("vmbdgexpnp")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("aalwid", model.annotation()); + Assertions.assertEquals("bwedjrikzppgij", model.hostName()); + Assertions.assertEquals("u", model.serialNumber()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePropertiesTests.java new file mode 100644 index 000000000000..a428afc79124 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicePropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapDeviceProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapDevicePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapDeviceProperties model = BinaryData.fromString( + "{\"annotation\":\"nkbfxq\",\"hostName\":\"pggeciradmx\",\"serialNumber\":\"butbbzcxzayvcsej\",\"version\":\"rodyi\",\"networkDeviceSku\":\"reddjtgopp\",\"networkFabricId\":\"seckgaxmha\",\"secondaryManagementIpv4Address\":\"jiet\",\"dhcpV4ServerIpAddress\":\"td\",\"primaryManagementIpv6Address\":\"dvzcnlk\",\"secondaryManagementIpv6Address\":\"rjtkreiso\",\"provisioningState\":\"Canceled\",\"primaryManagementIpv4Address\":\"wmgrbkobmg\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"PendingAdministrativeUpdate\"}") + .toObject(NetworkBootstrapDeviceProperties.class); + Assertions.assertEquals("nkbfxq", model.annotation()); + Assertions.assertEquals("pggeciradmx", model.hostName()); + Assertions.assertEquals("butbbzcxzayvcsej", model.serialNumber()); + Assertions.assertEquals("reddjtgopp", model.networkDeviceSku()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapDeviceProperties model = new NetworkBootstrapDeviceProperties().withAnnotation("nkbfxq") + .withHostName("pggeciradmx") + .withSerialNumber("butbbzcxzayvcsej") + .withNetworkDeviceSku("reddjtgopp"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapDeviceProperties.class); + Assertions.assertEquals("nkbfxq", model.annotation()); + Assertions.assertEquals("pggeciradmx", model.hostName()); + Assertions.assertEquals("butbbzcxzayvcsej", model.serialNumber()); + Assertions.assertEquals("reddjtgopp", model.networkDeviceSku()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateMockTests.java new file mode 100644 index 000000000000..fd9a24f8d6dc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesCreateMockTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapDevicesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"annotation\":\"yupaggkrum\",\"hostName\":\"nwyfyvhc\",\"serialNumber\":\"ipxhghicw\",\"version\":\"jdrvjktvpy\",\"networkDeviceSku\":\"ooytilsmise\",\"networkFabricId\":\"ljmmoquic\",\"secondaryManagementIpv4Address\":\"gluqac\",\"dhcpV4ServerIpAddress\":\"cnhzhsaum\",\"primaryManagementIpv6Address\":\"ruspflvglvwkgcp\",\"secondaryManagementIpv6Address\":\"nekbrqgwvxwqqmv\",\"provisioningState\":\"Succeeded\",\"primaryManagementIpv4Address\":\"fobtmljobguoy\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"PendingCommit\"},\"identity\":{\"principalId\":\"alcwheby\",\"tenantId\":\"wegt\",\"type\":\"None\",\"userAssignedIdentities\":{\"dgl\":{\"principalId\":\"zqxxvksqi\",\"clientId\":\"gmidvtu\"},\"pryhz\":{\"principalId\":\"megol\",\"clientId\":\"l\"},\"bqii\":{\"principalId\":\"xuizakejomjnlxjh\",\"clientId\":\"gnfqqlgqez\"},\"euxdvzomtzpukm\":{\"principalId\":\"oaceokr\",\"clientId\":\"zkzatznv\"}}},\"location\":\"slzbpnlfzq\",\"tags\":{\"j\":\"uotwzes\",\"ofzmvt\":\"cpcpeur\"},\"id\":\"yj\",\"name\":\"bjrptlty\",\"type\":\"bqhe\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkBootstrapDevice response = manager.networkBootstrapDevices() + .define("mbmbvccuikpaviu") + .withRegion("xogv") + .withExistingResourceGroup("wf") + .withTags(mapOf("wxuyikgmlplqgps", "xfchnhjsaq", "lvwtslzblgvezhim", "ynkkezkv")) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("qvbahiiatpdx", new UserAssignedIdentity()))) + .withAnnotation("izbjsuiouet") + .withHostName("crtmebrssrlxenqp") + .withSerialNumber("cl") + .withNetworkDeviceSku("ensogdvhqqxggnc") + .create(); + + Assertions.assertEquals("slzbpnlfzq", response.location()); + Assertions.assertEquals("uotwzes", response.tags().get("j")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("yupaggkrum", response.annotation()); + Assertions.assertEquals("nwyfyvhc", response.hostName()); + Assertions.assertEquals("ipxhghicw", response.serialNumber()); + Assertions.assertEquals("ooytilsmise", response.networkDeviceSku()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..c0199144d5cb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapDevicesGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"annotation\":\"asxiczvfxoihcq\",\"hostName\":\"xbksaf\",\"serialNumber\":\"cwyrtluujyesp\",\"version\":\"pszwvooxieyywwm\",\"networkDeviceSku\":\"iaqrcjfybktbvia\",\"networkFabricId\":\"zz\",\"secondaryManagementIpv4Address\":\"crwhrxoyvygdef\",\"dhcpV4ServerIpAddress\":\"jtww\",\"primaryManagementIpv6Address\":\"xrg\",\"secondaryManagementIpv6Address\":\"smravxtglpxmdw\",\"provisioningState\":\"Deleting\",\"primaryManagementIpv4Address\":\"cecmnqcgbi\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"Rejected\"},\"identity\":{\"principalId\":\"rkxzebvxuz\",\"tenantId\":\"egeogdkcrchw\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"kmkelbqmnrm\":{\"principalId\":\"adlpxirewhu\",\"clientId\":\"icimy\"},\"akgo\":{\"principalId\":\"fxkattpkkwldv\",\"clientId\":\"ig\"},\"bx\":{\"principalId\":\"bjooqobpnkvnuw\",\"clientId\":\"xbbxkhve\"},\"mtzzyjhyieyxrwfu\":{\"principalId\":\"glo\",\"clientId\":\"mlbhlimgz\"}}},\"location\":\"alvdhmumsmnubc\",\"tags\":{\"bfe\":\"pstypxidqnvh\"},\"id\":\"fwrintaaft\",\"name\":\"y\",\"type\":\"e\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkBootstrapDevice response = manager.networkBootstrapDevices() + .getByResourceGroupWithResponse("umerkgmg", "ynej", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("alvdhmumsmnubc", response.location()); + Assertions.assertEquals("pstypxidqnvh", response.tags().get("bfe")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("asxiczvfxoihcq", response.annotation()); + Assertions.assertEquals("xbksaf", response.hostName()); + Assertions.assertEquals("cwyrtluujyesp", response.serialNumber()); + Assertions.assertEquals("iaqrcjfybktbvia", response.networkDeviceSku()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupMockTests.java new file mode 100644 index 000000000000..8d7cf1c216f4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListByResourceGroupMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapDevicesListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"annotation\":\"sfuxhlgoexu\",\"hostName\":\"bfoo\",\"serialNumber\":\"txdlewh\",\"version\":\"vrip\",\"networkDeviceSku\":\"kwoommqvzz\",\"networkFabricId\":\"mw\",\"secondaryManagementIpv4Address\":\"pfh\",\"dhcpV4ServerIpAddress\":\"p\",\"primaryManagementIpv6Address\":\"ljajz\",\"secondaryManagementIpv6Address\":\"gwarbvblat\",\"provisioningState\":\"Deleting\",\"primaryManagementIpv4Address\":\"qytodgis\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"ErrorProvisioning\"},\"identity\":{\"principalId\":\"wi\",\"tenantId\":\"jynfjwktiy\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ops\":{\"principalId\":\"tvaodif\",\"clientId\":\"dafuft\"},\"aswgvo\":{\"principalId\":\"qhgnrxxhzwtrxpwu\",\"clientId\":\"gpdmvshgbju\"},\"dl\":{\"principalId\":\"utdthloafhhiyk\",\"clientId\":\"jsebcuyn\"}}},\"location\":\"tefdvjgbemrj\",\"tags\":{\"r\":\"quxpd\"},\"id\":\"ethyhbnoyexu\",\"name\":\"vdrzxobtek\",\"type\":\"giqoib\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.networkBootstrapDevices().listByResourceGroup("qppx", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("tefdvjgbemrj", response.iterator().next().location()); + Assertions.assertEquals("quxpd", response.iterator().next().tags().get("r")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("sfuxhlgoexu", response.iterator().next().annotation()); + Assertions.assertEquals("bfoo", response.iterator().next().hostName()); + Assertions.assertEquals("txdlewh", response.iterator().next().serialNumber()); + Assertions.assertEquals("kwoommqvzz", response.iterator().next().networkDeviceSku()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListMockTests.java new file mode 100644 index 000000000000..4e85684d69a4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapDevicesListMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapDevice; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapDevicesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"annotation\":\"umo\",\"hostName\":\"zxwmwrjmtpgkybdk\",\"serialNumber\":\"vramrqbeqzhnpxa\",\"version\":\"cnnyga\",\"networkDeviceSku\":\"mpfrgouwe\",\"networkFabricId\":\"dn\",\"secondaryManagementIpv4Address\":\"athvl\",\"dhcpV4ServerIpAddress\":\"rjakd\",\"primaryManagementIpv6Address\":\"xj\",\"secondaryManagementIpv6Address\":\"ykkwkmkkpbybhqwi\",\"provisioningState\":\"Canceled\",\"primaryManagementIpv4Address\":\"gahehkirbo\",\"administrativeState\":\"Disabled\",\"configurationState\":\"ErrorProvisioning\"},\"identity\":{\"principalId\":\"phbcurth\",\"tenantId\":\"gavwbqjeto\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"eqwxivjhmld\":{\"principalId\":\"vuymibfnqjc\",\"clientId\":\"u\"},\"fgbcwawblkkccixs\":{\"principalId\":\"oxjbhlt\",\"clientId\":\"pgqqinkktay\"},\"qzcbqvjejnwwqyy\":{\"principalId\":\"lxgsqhczokun\",\"clientId\":\"qhbjmvbeznluk\"}}},\"location\":\"t\",\"tags\":{\"tnuzorx\":\"hmrughmrybbh\",\"zjqpdfs\":\"t\"},\"id\":\"utvitislcfxsgjdi\",\"name\":\"emcghorrjaw\",\"type\":\"czbbvrmvhtmzwgi\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.networkBootstrapDevices().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("t", response.iterator().next().location()); + Assertions.assertEquals("hmrughmrybbh", response.iterator().next().tags().get("tnuzorx")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("umo", response.iterator().next().annotation()); + Assertions.assertEquals("zxwmwrjmtpgkybdk", response.iterator().next().hostName()); + Assertions.assertEquals("vramrqbeqzhnpxa", response.iterator().next().serialNumber()); + Assertions.assertEquals("mpfrgouwe", response.iterator().next().networkDeviceSku()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceInnerTests.java new file mode 100644 index 000000000000..288a2ced2bd0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceInnerTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceInner; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapInterfaceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapInterfaceInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"administrativeState\":\"EnabledDegraded\",\"configurationState\":\"DeferredControl\",\"physicalIdentifier\":\"l\",\"connectedTo\":\"etr\",\"interfaceType\":\"Data\",\"description\":\"fsdswp\",\"additionalDescription\":\"loopz\",\"ipv4Address\":\"egchtabhacjlf\",\"ipv6Address\":\"cklvvwvpfq\",\"serialNumber\":\"vzhmlnfvyhdhff\",\"annotation\":\"dmhawbxnlkmazhle\"},\"id\":\"roksay\",\"name\":\"hfzzipyqt\",\"type\":\"dhbctkgmwxzl\"}") + .toObject(NetworkBootstrapInterfaceInner.class); + Assertions.assertEquals("loopz", model.additionalDescription()); + Assertions.assertEquals("vzhmlnfvyhdhff", model.serialNumber()); + Assertions.assertEquals("dmhawbxnlkmazhle", model.annotation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapInterfaceInner model = new NetworkBootstrapInterfaceInner().withAdditionalDescription("loopz") + .withSerialNumber("vzhmlnfvyhdhff") + .withAnnotation("dmhawbxnlkmazhle"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapInterfaceInner.class); + Assertions.assertEquals("loopz", model.additionalDescription()); + Assertions.assertEquals("vzhmlnfvyhdhff", model.serialNumber()); + Assertions.assertEquals("dmhawbxnlkmazhle", model.annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceListResultTests.java new file mode 100644 index 000000000000..2d4f60d0a13e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfaceListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkBootstrapInterfaceListResult; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapInterfaceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapInterfaceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"ErrorDeprovisioning\",\"physicalIdentifier\":\"umaplpdz\",\"connectedTo\":\"ettnmiufpbfqml\",\"interfaceType\":\"Management\",\"description\":\"yekuwwdxzpegumyd\",\"additionalDescription\":\"rt\",\"ipv4Address\":\"zecgbxrcs\",\"ipv6Address\":\"qjdxiiqwqbvanvg\",\"serialNumber\":\"naaiitnkruy\",\"annotation\":\"xnksmae\"},\"id\":\"rxjsmrseauxeovb\",\"name\":\"rqwfuxntuegy\",\"type\":\"leketk\"},{\"properties\":{\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"configurationState\":\"Deprovisioned\",\"physicalIdentifier\":\"fg\",\"connectedTo\":\"hbxgfhgkdms\",\"interfaceType\":\"Management\",\"description\":\"bupqov\",\"additionalDescription\":\"hvqihmqhqjdcbg\",\"ipv4Address\":\"mjtiljxagcalyqz\",\"ipv6Address\":\"axilzdxcmpdmd\",\"serialNumber\":\"pksfrhiehxjoupx\",\"annotation\":\"sbecxuvkba\"},\"id\":\"v\",\"name\":\"yhgpgjd\",\"type\":\"n\"},{\"properties\":{\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"configurationState\":\"Provisioned\",\"physicalIdentifier\":\"kuofzw\",\"connectedTo\":\"tvucyackgkavpmgt\",\"interfaceType\":\"Data\",\"description\":\"fksixvw\",\"additionalDescription\":\"cesmurjabpnxo\",\"ipv4Address\":\"gcojgmyzjdgmqeh\",\"ipv6Address\":\"tg\",\"serialNumber\":\"pbnjiweyuig\",\"annotation\":\"sebkbfykgm\"},\"id\":\"rcxxjyxyunypf\",\"name\":\"vjgovbbn\",\"type\":\"jxr\"}],\"nextLink\":\"qgmztlrubn\"}") + .toObject(NetworkBootstrapInterfaceListResult.class); + Assertions.assertEquals("rt", model.value().get(0).additionalDescription()); + Assertions.assertEquals("naaiitnkruy", model.value().get(0).serialNumber()); + Assertions.assertEquals("xnksmae", model.value().get(0).annotation()); + Assertions.assertEquals("qgmztlrubn", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchPropertiesTests.java new file mode 100644 index 000000000000..f35476cd9fb7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfacePatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapInterfacePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapInterfacePatchProperties model = BinaryData + .fromString( + "{\"serialNumber\":\"gzx\",\"additionalDescription\":\"safvflyqauuohsk\",\"annotation\":\"ntxdvlqmn\"}") + .toObject(NetworkBootstrapInterfacePatchProperties.class); + Assertions.assertEquals("ntxdvlqmn", model.annotation()); + Assertions.assertEquals("gzx", model.serialNumber()); + Assertions.assertEquals("safvflyqauuohsk", model.additionalDescription()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapInterfacePatchProperties model + = new NetworkBootstrapInterfacePatchProperties().withAnnotation("ntxdvlqmn") + .withSerialNumber("gzx") + .withAdditionalDescription("safvflyqauuohsk"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapInterfacePatchProperties.class); + Assertions.assertEquals("ntxdvlqmn", model.annotation()); + Assertions.assertEquals("gzx", model.serialNumber()); + Assertions.assertEquals("safvflyqauuohsk", model.additionalDescription()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchTests.java new file mode 100644 index 000000000000..f0821a3ee30b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePatchTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterfacePatch; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapInterfacePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapInterfacePatch model = BinaryData.fromString( + "{\"properties\":{\"serialNumber\":\"ypl\",\"additionalDescription\":\"vrjselauzrpe\",\"annotation\":\"eb\"}}") + .toObject(NetworkBootstrapInterfacePatch.class); + Assertions.assertEquals("ypl", model.serialNumber()); + Assertions.assertEquals("vrjselauzrpe", model.additionalDescription()); + Assertions.assertEquals("eb", model.annotation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapInterfacePatch model = new NetworkBootstrapInterfacePatch().withSerialNumber("ypl") + .withAdditionalDescription("vrjselauzrpe") + .withAnnotation("eb"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapInterfacePatch.class); + Assertions.assertEquals("ypl", model.serialNumber()); + Assertions.assertEquals("vrjselauzrpe", model.additionalDescription()); + Assertions.assertEquals("eb", model.annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePropertiesTests.java new file mode 100644 index 000000000000..12fb8dfa3daa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacePropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkBootstrapInterfaceProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkBootstrapInterfacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkBootstrapInterfaceProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\",\"configurationState\":\"Provisioning\",\"physicalIdentifier\":\"xbejhxopehely\",\"connectedTo\":\"khdapxdiibjjwuek\",\"interfaceType\":\"Management\",\"description\":\"hxhuhhnrmmfzfkh\",\"additionalDescription\":\"zjf\",\"ipv4Address\":\"jhtvbskgciedlqv\",\"ipv6Address\":\"trlsmsr\",\"serialNumber\":\"fgb\",\"annotation\":\"gchjtpszcawf\"}") + .toObject(NetworkBootstrapInterfaceProperties.class); + Assertions.assertEquals("gchjtpszcawf", model.annotation()); + Assertions.assertEquals("zjf", model.additionalDescription()); + Assertions.assertEquals("fgb", model.serialNumber()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkBootstrapInterfaceProperties model + = new NetworkBootstrapInterfaceProperties().withAnnotation("gchjtpszcawf") + .withAdditionalDescription("zjf") + .withSerialNumber("fgb"); + model = BinaryData.fromObject(model).toObject(NetworkBootstrapInterfaceProperties.class); + Assertions.assertEquals("gchjtpszcawf", model.annotation()); + Assertions.assertEquals("zjf", model.additionalDescription()); + Assertions.assertEquals("fgb", model.serialNumber()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateMockTests.java new file mode 100644 index 000000000000..fac38b0269db --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesCreateMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapInterfacesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"configurationState\":\"Provisioned\",\"physicalIdentifier\":\"kbchnhexmg\",\"connectedTo\":\"lufojue\",\"interfaceType\":\"Data\",\"description\":\"hgfwyzvnsna\",\"additionalDescription\":\"obcuy\",\"ipv4Address\":\"ltdgxiq\",\"ipv6Address\":\"rrxjfxueqyj\",\"serialNumber\":\"oytgnycnk\",\"annotation\":\"ipnzgnybuglala\"},\"id\":\"nc\",\"name\":\"hzqnhxksc\",\"type\":\"ykrzrjjernjkgalo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkBootstrapInterface response = manager.networkBootstrapInterfaces() + .define("gvh") + .withExistingNetworkBootstrapDevice("szuhuojjbkyd", "s") + .withAdditionalDescription("gchtaeacbqkx") + .withSerialNumber("fx") + .withAnnotation("vav") + .create(); + + Assertions.assertEquals("obcuy", response.additionalDescription()); + Assertions.assertEquals("oytgnycnk", response.serialNumber()); + Assertions.assertEquals("ipnzgnybuglala", response.annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetWithResponseMockTests.java new file mode 100644 index 000000000000..3d35638be837 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapInterfacesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\",\"physicalIdentifier\":\"vqmtejhvggy\",\"connectedTo\":\"rqkskyyamm\",\"interfaceType\":\"Management\",\"description\":\"yiw\",\"additionalDescription\":\"wqjbrrxmlmib\",\"ipv4Address\":\"zdjkonlvl\",\"ipv6Address\":\"wdtsbjmchs\",\"serialNumber\":\"ezjyfaqdwfa\",\"annotation\":\"zdetslxerhw\"},\"id\":\"halxxgeladqzilj\",\"name\":\"sycujnsznjskwjju\",\"type\":\"ukhx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkBootstrapInterface response = manager.networkBootstrapInterfaces() + .getWithResponse("h", "wjlbygqfmeeuuurx", "slxzwvygquiwcfq", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wqjbrrxmlmib", response.additionalDescription()); + Assertions.assertEquals("ezjyfaqdwfa", response.serialNumber()); + Assertions.assertEquals("zdetslxerhw", response.annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceMockTests.java new file mode 100644 index 000000000000..83c57b821c80 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkBootstrapInterfacesListByNetworkBootstrapDeviceMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkBootstrapInterface; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkBootstrapInterfacesListByNetworkBootstrapDeviceMockTests { + @Test + public void testListByNetworkBootstrapDevice() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"configurationState\":\"PendingCommit\",\"physicalIdentifier\":\"dsp\",\"connectedTo\":\"uhztvbgcflttes\",\"interfaceType\":\"Data\",\"description\":\"uuyttuindp\",\"additionalDescription\":\"ijncaqgtsbahtlop\",\"ipv4Address\":\"sbjzrnj\",\"ipv6Address\":\"gagmgullnashn\",\"serialNumber\":\"rmabbetzcdbqzw\",\"annotation\":\"akbvaqguaub\"},\"id\":\"wpllojdccd\",\"name\":\"ewtddigmmjve\",\"type\":\"jrcrbkw\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.networkBootstrapInterfaces() + .listByNetworkBootstrapDevice("ixuy", "qsonfxsfjedjnxic", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ijncaqgtsbahtlop", response.iterator().next().additionalDescription()); + Assertions.assertEquals("rmabbetzcdbqzw", response.iterator().next().serialNumber()); + Assertions.assertEquals("akbvaqguaub", response.iterator().next().annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java deleted file mode 100644 index fd527b05ff9c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"ffofwan\",\"networkDeviceSku\":\"k\",\"networkDeviceRole\":\"TS\",\"networkRackId\":\"w\",\"managementIpv4Address\":\"cgwdfriwgybjp\",\"managementIpv6Address\":\"ok\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"hostName\":\"dgbyfgwewqkjvxp\",\"serialNumber\":\"pxsoohu\",\"annotation\":\"lcsklt\"},\"location\":\"uugggzlfbgrd\",\"tags\":{\"mdylperp\":\"bsr\",\"cmfpfbodet\":\"lttjzgcz\",\"muqkevzgjypanhx\":\"esrgvtshuvftwai\",\"wot\":\"pdxxzetwwz\"},\"id\":\"xl\",\"name\":\"fhglhrfo\",\"type\":\"qwec\"}") - .toObject(NetworkDeviceInner.class); - Assertions.assertEquals("uugggzlfbgrd", model.location()); - Assertions.assertEquals("bsr", model.tags().get("mdylperp")); - Assertions.assertEquals("k", model.networkDeviceSku()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.hostname()); - Assertions.assertEquals("pxsoohu", model.serialNumber()); - Assertions.assertEquals("lcsklt", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceInner model = new NetworkDeviceInner().withLocation("uugggzlfbgrd") - .withTags(mapOf("mdylperp", "bsr", "cmfpfbodet", "lttjzgcz", "muqkevzgjypanhx", "esrgvtshuvftwai", "wot", - "pdxxzetwwz")) - .withNetworkDeviceSku("k") - .withHostname("dgbyfgwewqkjvxp") - .withSerialNumber("pxsoohu") - .withAnnotation("lcsklt"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceInner.class); - Assertions.assertEquals("uugggzlfbgrd", model.location()); - Assertions.assertEquals("bsr", model.tags().get("mdylperp")); - Assertions.assertEquals("k", model.networkDeviceSku()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.hostname()); - Assertions.assertEquals("pxsoohu", model.serialNumber()); - Assertions.assertEquals("lcsklt", model.annotation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java index 749eca7362ca..1e7e1e2acc58 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java @@ -1,33 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; import org.junit.jupiter.api.Assertions; public final class NetworkDevicePatchParametersPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkDevicePatchParametersProperties model - = BinaryData.fromString("{\"hostName\":\"iutg\",\"serialNumber\":\"mkahpqha\",\"annotation\":\"ntacih\"}") - .toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("ntacih", model.annotation()); - Assertions.assertEquals("iutg", model.hostname()); - Assertions.assertEquals("mkahpqha", model.serialNumber()); + NetworkDevicePatchParametersProperties model = BinaryData.fromString( + "{\"annotation\":\"bpjbapm\",\"hostName\":\"mmkvav\",\"serialNumber\":\"gjiuaiqpmnufzhrc\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"zdmh\"}}") + .toObject(NetworkDevicePatchParametersProperties.class); + Assertions.assertEquals("bpjbapm", model.annotation()); + Assertions.assertEquals("mmkvav", model.hostName()); + Assertions.assertEquals("gjiuaiqpmnufzhrc", model.serialNumber()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("zdmh", model.identitySelector().userAssignedIdentityResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkDevicePatchParametersProperties model - = new NetworkDevicePatchParametersProperties().withAnnotation("ntacih") - .withHostname("iutg") - .withSerialNumber("mkahpqha"); + = new NetworkDevicePatchParametersProperties().withAnnotation("bpjbapm") + .withHostName("mmkvav") + .withSerialNumber("gjiuaiqpmnufzhrc") + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("zdmh")); model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("ntacih", model.annotation()); - Assertions.assertEquals("iutg", model.hostname()); - Assertions.assertEquals("mkahpqha", model.serialNumber()); + Assertions.assertEquals("bpjbapm", model.annotation()); + Assertions.assertEquals("mmkvav", model.hostName()); + Assertions.assertEquals("gjiuaiqpmnufzhrc", model.serialNumber()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("zdmh", model.identitySelector().userAssignedIdentityResourceId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java index d24df9fc9ae0..ef1641dda582 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java @@ -1,11 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,26 +19,38 @@ public final class NetworkDevicePatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDevicePatchParameters model = BinaryData.fromString( - "{\"properties\":{\"hostName\":\"zwzlp\",\"serialNumber\":\"tzuykykipfsdye\",\"annotation\":\"noc\"},\"tags\":{\"qejg\":\"zacfpztgazw\",\"gkqzkcyzmffngdyf\":\"aokctgkp\",\"qvhoej\":\"ixrhl\"}}") + "{\"properties\":{\"annotation\":\"sanmameu\",\"hostName\":\"qiqmlfvhlq\",\"serialNumber\":\"kkqjmxptueipuug\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"mrpahuuonj\"}},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"j\":{\"principalId\":\"e\",\"clientId\":\"vpxjoegcj\"}}},\"tags\":{\"htmep\":\"uidpmtonvhg\"}}") .toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("zacfpztgazw", model.tags().get("qejg")); - Assertions.assertEquals("zwzlp", model.hostname()); - Assertions.assertEquals("tzuykykipfsdye", model.serialNumber()); - Assertions.assertEquals("noc", model.annotation()); + Assertions.assertEquals("uidpmtonvhg", model.tags().get("htmep")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("sanmameu", model.annotation()); + Assertions.assertEquals("qiqmlfvhlq", model.hostName()); + Assertions.assertEquals("kkqjmxptueipuug", model.serialNumber()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("mrpahuuonj", model.identitySelector().userAssignedIdentityResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkDevicePatchParameters model = new NetworkDevicePatchParameters() - .withTags(mapOf("qejg", "zacfpztgazw", "gkqzkcyzmffngdyf", "aokctgkp", "qvhoej", "ixrhl")) - .withHostname("zwzlp") - .withSerialNumber("tzuykykipfsdye") - .withAnnotation("noc"); + NetworkDevicePatchParameters model = new NetworkDevicePatchParameters().withTags(mapOf("htmep", "uidpmtonvhg")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("j", new UserAssignedIdentity()))) + .withAnnotation("sanmameu") + .withHostName("qiqmlfvhlq") + .withSerialNumber("kkqjmxptueipuug") + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("mrpahuuonj")); model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("zacfpztgazw", model.tags().get("qejg")); - Assertions.assertEquals("zwzlp", model.hostname()); - Assertions.assertEquals("tzuykykipfsdye", model.serialNumber()); - Assertions.assertEquals("noc", model.annotation()); + Assertions.assertEquals("uidpmtonvhg", model.tags().get("htmep")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("sanmameu", model.annotation()); + Assertions.assertEquals("qiqmlfvhlq", model.hostName()); + Assertions.assertEquals("kkqjmxptueipuug", model.serialNumber()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("mrpahuuonj", model.identitySelector().userAssignedIdentityResourceId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java deleted file mode 100644 index dd6d98da3399..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchableProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicePatchableProperties model - = BinaryData.fromString("{\"hostName\":\"upjo\",\"serialNumber\":\"ozsaye\"}") - .toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("upjo", model.hostname()); - Assertions.assertEquals("ozsaye", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicePatchableProperties model - = new NetworkDevicePatchableProperties().withHostname("upjo").withSerialNumber("ozsaye"); - model = BinaryData.fromObject(model).toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("upjo", model.hostname()); - Assertions.assertEquals("ozsaye", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java deleted file mode 100644 index 492ed2895521..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceProperties model = BinaryData.fromString( - "{\"version\":\"nhpcselqx\",\"networkDeviceSku\":\"ppqib\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"vzrlrmlcc\",\"managementIpv4Address\":\"tjsczivfq\",\"managementIpv6Address\":\"nasd\",\"configurationState\":\"Rejected\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"hostName\":\"uscplhyvdg\",\"serialNumber\":\"yzkxitds\",\"annotation\":\"zsvko\"}") - .toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("zsvko", model.annotation()); - Assertions.assertEquals("ppqib", model.networkDeviceSku()); - Assertions.assertEquals("uscplhyvdg", model.hostname()); - Assertions.assertEquals("yzkxitds", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceProperties model = new NetworkDeviceProperties().withAnnotation("zsvko") - .withNetworkDeviceSku("ppqib") - .withHostname("uscplhyvdg") - .withSerialNumber("yzkxitds"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("zsvko", model.annotation()); - Assertions.assertEquals("ppqib", model.networkDeviceSku()); - Assertions.assertEquals("uscplhyvdg", model.hostname()); - Assertions.assertEquals("yzkxitds", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRwCommandResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRwCommandResponsePropertiesTests.java new file mode 100644 index 000000000000..5e84ff1829a9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRwCommandResponsePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkDeviceRwCommandResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkDeviceRwCommandResponseProperties model + = BinaryData.fromString("{\"configurationState\":\"Provisioning\",\"outputUrl\":\"niuarlcjiwgsxfai\"}") + .toObject(NetworkDeviceRwCommandResponseProperties.class); + Assertions.assertEquals("niuarlcjiwgsxfai", model.outputUrl()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java index 8f1ef3573a98..076fce2efd98 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java @@ -1,91 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkDeviceSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDeviceSkuInner model = BinaryData.fromString( - "{\"properties\":{\"model\":\"qnhttwdowrczfj\",\"manufacturer\":\"nuxxrkkm\",\"supportedVersions\":[{\"version\":\"lwe\",\"vendorOsVersion\":\"dcifrhjulrsulwz\",\"vendorFirmwareVersion\":\"lusnawmhhgzotfr\",\"isDefault\":\"False\"},{\"version\":\"koekvzwxx\",\"vendorOsVersion\":\"highctxbxm\",\"vendorFirmwareVersion\":\"pcqydeykvsk\",\"isDefault\":\"False\"},{\"version\":\"frjeizikgqaboohx\",\"vendorOsVersion\":\"sgyc\",\"vendorFirmwareVersion\":\"xrmdvewuyqaeohpj\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"ToR\",\"TS\"],\"interfaces\":[{\"identifier\":\"aurghooxa\",\"interfaceType\":\"bkhxj\",\"supportedConnectorTypes\":[{\"connectorType\":\"zlqxrkdknk\",\"maxSpeedInMbps\":1052717434}]},{\"identifier\":\"tmbozomtzamicbig\",\"interfaceType\":\"dgzsez\",\"supportedConnectorTypes\":[{\"connectorType\":\"euairaabmdlqjb\",\"maxSpeedInMbps\":476574314}]},{\"identifier\":\"ixlhupm\",\"interfaceType\":\"ihzbdnpxpk\",\"supportedConnectorTypes\":[{\"connectorType\":\"eyxel\",\"maxSpeedInMbps\":886562524}]},{\"identifier\":\"hflrufssjyghsfx\",\"interfaceType\":\"bh\",\"supportedConnectorTypes\":[{\"connectorType\":\"mqfmefgvqcpd\",\"maxSpeedInMbps\":911131826},{\"connectorType\":\"uxweyslandkd\",\"maxSpeedInMbps\":27796894}]}],\"provisioningState\":\"Succeeded\"},\"id\":\"hghcgawnrrnqu\",\"name\":\"xsotir\",\"type\":\"imseobf\"}") + "{\"properties\":{\"model\":\"yms\",\"manufacturer\":\"yljurkeposehqqyl\",\"supportedVersions\":[{\"version\":\"wjwdsdlzmkxer\",\"vendorOsVersion\":\"xoteehkhowg\",\"vendorFirmwareVersion\":\"vvh\",\"isDefault\":\"False\"},{\"version\":\"c\",\"vendorOsVersion\":\"pnp\",\"vendorFirmwareVersion\":\"aqawbmpspfeylql\",\"isDefault\":\"True\"},{\"version\":\"ujexayglxrk\",\"vendorOsVersion\":\"nmzpas\",\"vendorFirmwareVersion\":\"vxjfiuofpieidzlv\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"ToR\",\"ToR\",\"NPB\",\"TS\"],\"interfaces\":[{\"identifier\":\"hydv\",\"interfaceType\":\"mfngpmillxgjsci\",\"supportedConnectorTypes\":[{\"connectorType\":\"oriobijei\",\"maxSpeedInMbps\":551907026},{\"connectorType\":\"uynhbokayrgwybr\",\"maxSpeedInMbps\":1640567268},{\"connectorType\":\"weoftnorw\",\"maxSpeedInMbps\":1288696361}]},{\"identifier\":\"ioctqk\",\"interfaceType\":\"ja\",\"supportedConnectorTypes\":[{\"connectorType\":\"fffhtjnwos\",\"maxSpeedInMbps\":1063401210}]},{\"identifier\":\"xt\",\"interfaceType\":\"xx\",\"supportedConnectorTypes\":[{\"connectorType\":\"wrr\",\"maxSpeedInMbps\":1916586648},{\"connectorType\":\"eezwyh\",\"maxSpeedInMbps\":1081801760}]}],\"provisioningState\":\"Succeeded\"},\"id\":\"egmxdbsohc\",\"name\":\"hpyvdkgdet\",\"type\":\"z\"}") .toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("qnhttwdowrczfj", model.model()); - Assertions.assertEquals("nuxxrkkm", model.manufacturer()); - Assertions.assertEquals("lwe", model.supportedVersions().get(0).version()); - Assertions.assertEquals("dcifrhjulrsulwz", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("lusnawmhhgzotfr", model.supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals("yms", model.model()); + Assertions.assertEquals("yljurkeposehqqyl", model.manufacturer()); + Assertions.assertEquals("wjwdsdlzmkxer", model.supportedVersions().get(0).version()); + Assertions.assertEquals("xoteehkhowg", model.supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("vvh", model.supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.supportedVersions().get(0).isDefault()); Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("aurghooxa", model.interfaces().get(0).identifier()); - Assertions.assertEquals("bkhxj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("zlqxrkdknk", + Assertions.assertEquals("hydv", model.interfaces().get(0).identifier()); + Assertions.assertEquals("mfngpmillxgjsci", model.interfaces().get(0).interfaceType()); + Assertions.assertEquals("oriobijei", model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1052717434, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuInner model = new NetworkDeviceSkuInner().withModel("qnhttwdowrczfj") - .withManufacturer("nuxxrkkm") - .withSupportedVersions(Arrays.asList( - new SupportedVersionProperties().withVersion("lwe") - .withVendorOsVersion("dcifrhjulrsulwz") - .withVendorFirmwareVersion("lusnawmhhgzotfr") - .withIsDefault(BooleanEnumProperty.FALSE), - new SupportedVersionProperties().withVersion("koekvzwxx") - .withVendorOsVersion("highctxbxm") - .withVendorFirmwareVersion("pcqydeykvsk") - .withIsDefault(BooleanEnumProperty.FALSE), - new SupportedVersionProperties().withVersion("frjeizikgqaboohx") - .withVendorOsVersion("sgyc") - .withVendorFirmwareVersion("xrmdvewuyqaeohpj") - .withIsDefault(BooleanEnumProperty.FALSE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TOR, NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList(new DeviceInterfaceProperties().withIdentifier("aurghooxa") - .withInterfaceType("bkhxj") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("zlqxrkdknk").withMaxSpeedInMbps(1052717434))), - new DeviceInterfaceProperties().withIdentifier("tmbozomtzamicbig") - .withInterfaceType("dgzsez") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("euairaabmdlqjb") - .withMaxSpeedInMbps(476574314))), - new DeviceInterfaceProperties().withIdentifier("ixlhupm") - .withInterfaceType("ihzbdnpxpk") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("eyxel").withMaxSpeedInMbps(886562524))), - new DeviceInterfaceProperties().withIdentifier("hflrufssjyghsfx") - .withInterfaceType("bh") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("mqfmefgvqcpd") - .withMaxSpeedInMbps(911131826), - new SupportedConnectorProperties().withConnectorType("uxweyslandkd") - .withMaxSpeedInMbps(27796894))))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("qnhttwdowrczfj", model.model()); - Assertions.assertEquals("nuxxrkkm", model.manufacturer()); - Assertions.assertEquals("lwe", model.supportedVersions().get(0).version()); - Assertions.assertEquals("dcifrhjulrsulwz", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("lusnawmhhgzotfr", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("aurghooxa", model.interfaces().get(0).identifier()); - Assertions.assertEquals("bkhxj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("zlqxrkdknk", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1052717434, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); + Assertions.assertEquals(551907026, model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java index 771427fb72e4..3d54c497cadf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java @@ -1,93 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkDeviceSkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDeviceSkuProperties model = BinaryData.fromString( - "{\"model\":\"xstcyilbvzm\",\"manufacturer\":\"cjzlquzexokjxebj\",\"supportedVersions\":[{\"version\":\"n\",\"vendorOsVersion\":\"bwmvogljsvl\",\"vendorFirmwareVersion\":\"idnwceha\",\"isDefault\":\"True\"},{\"version\":\"yzltgiomqo\",\"vendorOsVersion\":\"epiaeapfsergd\",\"vendorFirmwareVersion\":\"eqn\",\"isDefault\":\"True\"},{\"version\":\"eqwbpqqncjubkhj\",\"vendorOsVersion\":\"fymcwmb\",\"vendorFirmwareVersion\":\"yvqyvliqiips\",\"isDefault\":\"True\"},{\"version\":\"vsi\",\"vendorOsVersion\":\"eswhd\",\"vendorFirmwareVersion\":\"ydisnuepywyjl\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"TS\",\"TS\"],\"interfaces\":[{\"identifier\":\"i\",\"interfaceType\":\"cqibzj\",\"supportedConnectorTypes\":[{\"connectorType\":\"ebiphryvcjwqwoq\",\"maxSpeedInMbps\":1703055806},{\"connectorType\":\"jhdhz\",\"maxSpeedInMbps\":22711679},{\"connectorType\":\"ijh\",\"maxSpeedInMbps\":480540278}]},{\"identifier\":\"dkkagvwukhsusmm\",\"interfaceType\":\"fmz\",\"supportedConnectorTypes\":[{\"connectorType\":\"zzhnijmriprlkd\",\"maxSpeedInMbps\":261947956}]},{\"identifier\":\"tlrcxivcbkutpu\",\"interfaceType\":\"twjfluxynbp\",\"supportedConnectorTypes\":[{\"connectorType\":\"ywauyqnjckhm\",\"maxSpeedInMbps\":769053900}]}],\"provisioningState\":\"Canceled\"}") + "{\"model\":\"canzb\",\"manufacturer\":\"kwuyck\",\"supportedVersions\":[{\"version\":\"nsm\",\"vendorOsVersion\":\"fiwjbctvbp\",\"vendorFirmwareVersion\":\"jqjtotd\",\"isDefault\":\"True\"},{\"version\":\"cslhwuusi\",\"vendorOsVersion\":\"ktybh\",\"vendorFirmwareVersion\":\"xidhhxomil\",\"isDefault\":\"True\"},{\"version\":\"x\",\"vendorOsVersion\":\"gxwjwil\",\"vendorFirmwareVersion\":\"rslaatep\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"NPB\"],\"interfaces\":[{\"identifier\":\"gqwlxrhg\",\"interfaceType\":\"hvtqqykbkk\",\"supportedConnectorTypes\":[{\"connectorType\":\"ejogmkor\",\"maxSpeedInMbps\":193703110},{\"connectorType\":\"mcofn\",\"maxSpeedInMbps\":548887082}]},{\"identifier\":\"snosnqliwkmzojf\",\"interfaceType\":\"yalhtgm\",\"supportedConnectorTypes\":[{\"connectorType\":\"gbjbhrp\",\"maxSpeedInMbps\":431420929}]},{\"identifier\":\"ttcucrcm\",\"interfaceType\":\"ixpqj\",\"supportedConnectorTypes\":[{\"connectorType\":\"hbksldttohqclnai\",\"maxSpeedInMbps\":336436219}]},{\"identifier\":\"iqikvllr\",\"interfaceType\":\"p\",\"supportedConnectorTypes\":[{\"connectorType\":\"k\",\"maxSpeedInMbps\":370422484},{\"connectorType\":\"trawrqkza\",\"maxSpeedInMbps\":505721663}]}],\"provisioningState\":\"Canceled\"}") .toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("xstcyilbvzm", model.model()); - Assertions.assertEquals("cjzlquzexokjxebj", model.manufacturer()); - Assertions.assertEquals("n", model.supportedVersions().get(0).version()); - Assertions.assertEquals("bwmvogljsvl", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("idnwceha", model.supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals("canzb", model.model()); + Assertions.assertEquals("kwuyck", model.manufacturer()); + Assertions.assertEquals("nsm", model.supportedVersions().get(0).version()); + Assertions.assertEquals("fiwjbctvbp", model.supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("jqjtotd", model.supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("i", model.interfaces().get(0).identifier()); - Assertions.assertEquals("cqibzj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("ebiphryvcjwqwoq", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1703055806, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuProperties model = new NetworkDeviceSkuProperties().withModel("xstcyilbvzm") - .withManufacturer("cjzlquzexokjxebj") - .withSupportedVersions(Arrays.asList( - new SupportedVersionProperties().withVersion("n") - .withVendorOsVersion("bwmvogljsvl") - .withVendorFirmwareVersion("idnwceha") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("yzltgiomqo") - .withVendorOsVersion("epiaeapfsergd") - .withVendorFirmwareVersion("eqn") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("eqwbpqqncjubkhj") - .withVendorOsVersion("fymcwmb") - .withVendorFirmwareVersion("yvqyvliqiips") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("vsi") - .withVendorOsVersion("eswhd") - .withVendorFirmwareVersion("ydisnuepywyjl") - .withIsDefault(BooleanEnumProperty.TRUE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TS, NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList( - new DeviceInterfaceProperties().withIdentifier("i") - .withInterfaceType("cqibzj") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("ebiphryvcjwqwoq") - .withMaxSpeedInMbps(1703055806), - new SupportedConnectorProperties().withConnectorType("jhdhz").withMaxSpeedInMbps(22711679), - new SupportedConnectorProperties().withConnectorType("ijh").withMaxSpeedInMbps(480540278))), - new DeviceInterfaceProperties().withIdentifier("dkkagvwukhsusmm") - .withInterfaceType("fmz") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("zzhnijmriprlkd") - .withMaxSpeedInMbps(261947956))), - new DeviceInterfaceProperties().withIdentifier("tlrcxivcbkutpu") - .withInterfaceType("twjfluxynbp") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("ywauyqnjckhm") - .withMaxSpeedInMbps(769053900))))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("xstcyilbvzm", model.model()); - Assertions.assertEquals("cjzlquzexokjxebj", model.manufacturer()); - Assertions.assertEquals("n", model.supportedVersions().get(0).version()); - Assertions.assertEquals("bwmvogljsvl", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("idnwceha", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("i", model.interfaces().get(0).identifier()); - Assertions.assertEquals("cqibzj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("ebiphryvcjwqwoq", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1703055806, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); + Assertions.assertEquals(NetworkDeviceRoleName.NPB, model.supportedRoleTypes().get(0)); + Assertions.assertEquals("gqwlxrhg", model.interfaces().get(0).identifier()); + Assertions.assertEquals("hvtqqykbkk", model.interfaces().get(0).interfaceType()); + Assertions.assertEquals("ejogmkor", model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); + Assertions.assertEquals(193703110, model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java index d0dca1e99117..a39a286a9ce9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; @@ -23,26 +23,26 @@ public final class NetworkDeviceSkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"model\":\"homyd\",\"manufacturer\":\"tuqbvf\",\"supportedVersions\":[{\"version\":\"hirqvvke\",\"vendorOsVersion\":\"dg\",\"vendorFirmwareVersion\":\"oktssgvqxerxrmhr\",\"isDefault\":\"True\"},{\"version\":\"b\",\"vendorOsVersion\":\"lvihylrxsi\",\"vendorFirmwareVersion\":\"syiumtitlqy\",\"isDefault\":\"True\"},{\"version\":\"rn\",\"vendorOsVersion\":\"qpkayqivbigdrqg\",\"vendorFirmwareVersion\":\"tboyztgnmu\",\"isDefault\":\"True\"},{\"version\":\"pcfmgr\",\"vendorOsVersion\":\"gwhzbbdwrje\",\"vendorFirmwareVersion\":\"ofeiiewibdtplj\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"NPB\"],\"interfaces\":[{\"identifier\":\"xcdkhxjwtkftg\",\"interfaceType\":\"juepmewsj\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"lb\",\"interfaceType\":\"hgvtepvrunudmakk\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"axk\",\"interfaceType\":\"kwohdig\",\"supportedConnectorTypes\":[{},{}]},{\"identifier\":\"cftsamod\",\"interfaceType\":\"baktvxer\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Deleting\"},\"id\":\"nnbegr\",\"name\":\"feonmto\",\"type\":\"xgd\"}"; + = "{\"properties\":{\"model\":\"fift\",\"manufacturer\":\"upuukpsw\",\"supportedVersions\":[{\"version\":\"uchcfndijzpvc\",\"vendorOsVersion\":\"butmxtijs\",\"vendorFirmwareVersion\":\"tdp\",\"isDefault\":\"True\"},{\"version\":\"wibwcdxymns\",\"vendorOsVersion\":\"qtmhff\",\"vendorFirmwareVersion\":\"nvrdtdl\",\"isDefault\":\"True\"},{\"version\":\"gh\",\"vendorOsVersion\":\"lh\",\"vendorFirmwareVersion\":\"zljyogcpw\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"TS\",\"CE\",\"Management\",\"Management\"],\"interfaces\":[{\"identifier\":\"eljmfolqdi\",\"interfaceType\":\"v\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Updating\"},\"id\":\"hghkf\",\"name\":\"wnlpbawtp\",\"type\":\"nkiwxlplqnil\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkDeviceSku response - = manager.networkDeviceSkus().getWithResponse("prkiyfoz", com.azure.core.util.Context.NONE).getValue(); + = manager.networkDeviceSkus().getWithResponse("fg", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("homyd", response.model()); - Assertions.assertEquals("tuqbvf", response.manufacturer()); - Assertions.assertEquals("hirqvvke", response.supportedVersions().get(0).version()); - Assertions.assertEquals("dg", response.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("oktssgvqxerxrmhr", response.supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals("fift", response.model()); + Assertions.assertEquals("upuukpsw", response.manufacturer()); + Assertions.assertEquals("uchcfndijzpvc", response.supportedVersions().get(0).version()); + Assertions.assertEquals("butmxtijs", response.supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("tdp", response.supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.TRUE, response.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.NPB, response.supportedRoleTypes().get(0)); - Assertions.assertEquals("xcdkhxjwtkftg", response.interfaces().get(0).identifier()); - Assertions.assertEquals("juepmewsj", response.interfaces().get(0).interfaceType()); + Assertions.assertEquals(NetworkDeviceRoleName.TS, response.supportedRoleTypes().get(0)); + Assertions.assertEquals("eljmfolqdi", response.interfaces().get(0).identifier()); + Assertions.assertEquals("v", response.interfaces().get(0).interfaceType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java index 93fbf421479f..6d62eb204e2c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; @@ -24,29 +24,27 @@ public final class NetworkDeviceSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"model\":\"fmazhkqqsjk\",\"manufacturer\":\"q\",\"supportedVersions\":[{\"version\":\"gpmdmwiwevv\",\"vendorOsVersion\":\"wghhbqqhdldar\",\"vendorFirmwareVersion\":\"wimtcceeeuquu\",\"isDefault\":\"True\"},{\"version\":\"cujwxvb\",\"vendorOsVersion\":\"rgknhfwlajwda\",\"vendorFirmwareVersion\":\"djbjg\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"Management\",\"CE\",\"TS\",\"NPB\"],\"interfaces\":[{\"identifier\":\"tkbmtrs\",\"interfaceType\":\"lviaigarma\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"cnev\",\"interfaceType\":\"cwbqy\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Accepted\"},\"id\":\"giynqryo\",\"name\":\"sweofvsxauphzefi\",\"type\":\"eyydx\"}]}"; + = "{\"value\":[{\"properties\":{\"model\":\"zfyg\",\"manufacturer\":\"fafca\",\"supportedVersions\":[{\"version\":\"lieqdwocufcshqf\",\"vendorOsVersion\":\"c\",\"vendorFirmwareVersion\":\"fofwqdroqk\",\"isDefault\":\"True\"},{\"version\":\"lbkzctqbvntl\",\"vendorOsVersion\":\"gj\",\"vendorFirmwareVersion\":\"xqoydyislepdbsi\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"CE\",\"CE\",\"TS\",\"TS\"],\"interfaces\":[{\"identifier\":\"ytbjbm\",\"interfaceType\":\"mtxbi\",\"supportedConnectorTypes\":[{}]},{\"identifier\":\"g\",\"interfaceType\":\"otvocjk\",\"supportedConnectorTypes\":[{}]},{\"identifier\":\"wyvtrs\",\"interfaceType\":\"dmtfnbv\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Updating\"},\"id\":\"miqbdi\",\"name\":\"hjxcdhpdlxwsfdd\",\"type\":\"qpfynt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("fmazhkqqsjk", response.iterator().next().model()); - Assertions.assertEquals("q", response.iterator().next().manufacturer()); - Assertions.assertEquals("gpmdmwiwevv", response.iterator().next().supportedVersions().get(0).version()); - Assertions.assertEquals("wghhbqqhdldar", - response.iterator().next().supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("wimtcceeeuquu", + Assertions.assertEquals("zfyg", response.iterator().next().model()); + Assertions.assertEquals("fafca", response.iterator().next().manufacturer()); + Assertions.assertEquals("lieqdwocufcshqf", response.iterator().next().supportedVersions().get(0).version()); + Assertions.assertEquals("c", response.iterator().next().supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("fofwqdroqk", response.iterator().next().supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.TRUE, response.iterator().next().supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.MANAGEMENT, - response.iterator().next().supportedRoleTypes().get(0)); - Assertions.assertEquals("tkbmtrs", response.iterator().next().interfaces().get(0).identifier()); - Assertions.assertEquals("lviaigarma", response.iterator().next().interfaces().get(0).interfaceType()); + Assertions.assertEquals(NetworkDeviceRoleName.CE, response.iterator().next().supportedRoleTypes().get(0)); + Assertions.assertEquals("ytbjbm", response.iterator().next().interfaces().get(0).identifier()); + Assertions.assertEquals("mtxbi", response.iterator().next().interfaces().get(0).interfaceType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java index bdce74dbd622..b02b99f57218 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java @@ -1,63 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkusListResult; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkDeviceSkusListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDeviceSkusListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"model\":\"mtmesrfsv\",\"manufacturer\":\"nkzpatqtdiswxsp\",\"supportedVersions\":[{\"version\":\"jazbbgspftesu\",\"vendorOsVersion\":\"pvpvd\",\"vendorFirmwareVersion\":\"ytcovqs\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"TS\"],\"interfaces\":[{\"identifier\":\"zfxnxmlbmuos\",\"interfaceType\":\"jmdihdcyyyzlw\",\"supportedConnectorTypes\":[{},{}]}],\"provisioningState\":\"Deleting\"},\"id\":\"ufzrfgmdqgnnbzrt\",\"name\":\"tedzu\",\"type\":\"bjtvgjsxmtyjj\"}],\"nextLink\":\"vdpwwobtdphti\"}") + "{\"value\":[{\"properties\":{\"model\":\"tvdhqnufbxwe\",\"manufacturer\":\"bntojovfny\",\"supportedVersions\":[{\"version\":\"uihaouwud\",\"vendorOsVersion\":\"aorhjkehwvumo\",\"vendorFirmwareVersion\":\"ircamqprlo\",\"isDefault\":\"False\"},{\"version\":\"ejcvjkjyczcmta\",\"vendorOsVersion\":\"lajdyoljeqyxq\",\"vendorFirmwareVersion\":\"zsizzhra\",\"isDefault\":\"True\"},{\"version\":\"kjymgqbgcxh\",\"vendorOsVersion\":\"xgzxlermkmer\",\"vendorFirmwareVersion\":\"skirhn\",\"isDefault\":\"False\"},{\"version\":\"cbkfukd\",\"vendorOsVersion\":\"qnv\",\"vendorFirmwareVersion\":\"dydshk\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"CE\",\"NPB\"],\"interfaces\":[{\"identifier\":\"zizznyu\",\"interfaceType\":\"qz\",\"supportedConnectorTypes\":[{},{},{},{}]}],\"provisioningState\":\"Succeeded\"},\"id\":\"fyjfd\",\"name\":\"qiyv\",\"type\":\"djokgwesym\"},{\"properties\":{\"model\":\"qh\",\"manufacturer\":\"p\",\"supportedVersions\":[{\"version\":\"ejtznxlue\",\"vendorOsVersion\":\"jqbbgsimwejlw\",\"vendorFirmwareVersion\":\"bpjzobdwbcpraswk\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"Management\",\"Management\",\"NPB\",\"Management\"],\"interfaces\":[{\"identifier\":\"fatgawphnski\",\"interfaceType\":\"wgtqcume\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"q\",\"interfaceType\":\"qbdiuycsbskowkr\",\"supportedConnectorTypes\":[{},{},{}]},{\"identifier\":\"rb\",\"interfaceType\":\"tmqowiuasfgqg\",\"supportedConnectorTypes\":[{},{},{}]},{\"identifier\":\"faimqvdruozk\",\"interfaceType\":\"fpeoehgfmq\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Updating\"},\"id\":\"vlzjx\",\"name\":\"lhpevasyntvzjyie\",\"type\":\"bqrvvbqv\"},{\"properties\":{\"model\":\"nmpecqxgiqasifub\",\"manufacturer\":\"nstlpwqpjn\",\"supportedVersions\":[{\"version\":\"tupsvyouweu\",\"vendorOsVersion\":\"xfwkz\",\"vendorFirmwareVersion\":\"msfb\",\"isDefault\":\"False\"},{\"version\":\"lznfhkqytkztado\",\"vendorOsVersion\":\"fzdgjfcycrsvloy\",\"vendorFirmwareVersion\":\"igqkzjuqwqa\",\"isDefault\":\"True\"},{\"version\":\"x\",\"vendorOsVersion\":\"xhyoip\",\"vendorFirmwareVersion\":\"dbgsosc\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"ToR\",\"Management\",\"CE\",\"Management\"],\"interfaces\":[{\"identifier\":\"fkbpjn\",\"interfaceType\":\"ekwwnthropmdudsy\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Canceled\"},\"id\":\"ktjhffe\",\"name\":\"q\",\"type\":\"oqyouergagh\"}],\"nextLink\":\"zxkpyehhfdyld\"}") .toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("mtmesrfsv", model.value().get(0).model()); - Assertions.assertEquals("nkzpatqtdiswxsp", model.value().get(0).manufacturer()); - Assertions.assertEquals("jazbbgspftesu", model.value().get(0).supportedVersions().get(0).version()); - Assertions.assertEquals("pvpvd", model.value().get(0).supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("ytcovqs", model.value().get(0).supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals("tvdhqnufbxwe", model.value().get(0).model()); + Assertions.assertEquals("bntojovfny", model.value().get(0).manufacturer()); + Assertions.assertEquals("uihaouwud", model.value().get(0).supportedVersions().get(0).version()); + Assertions.assertEquals("aorhjkehwvumo", model.value().get(0).supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("ircamqprlo", model.value().get(0).supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.value().get(0).supportedRoleTypes().get(0)); - Assertions.assertEquals("zfxnxmlbmuos", model.value().get(0).interfaces().get(0).identifier()); - Assertions.assertEquals("jmdihdcyyyzlw", model.value().get(0).interfaces().get(0).interfaceType()); - Assertions.assertEquals("vdpwwobtdphti", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkusListResult model = new NetworkDeviceSkusListResult() - .withValue(Arrays.asList(new NetworkDeviceSkuInner().withModel("mtmesrfsv") - .withManufacturer("nkzpatqtdiswxsp") - .withSupportedVersions(Arrays.asList(new SupportedVersionProperties().withVersion("jazbbgspftesu") - .withVendorOsVersion("pvpvd") - .withVendorFirmwareVersion("ytcovqs") - .withIsDefault(BooleanEnumProperty.FALSE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList(new DeviceInterfaceProperties().withIdentifier("zfxnxmlbmuos") - .withInterfaceType("jmdihdcyyyzlw") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties(), new SupportedConnectorProperties())))))) - .withNextLink("vdpwwobtdphti"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("mtmesrfsv", model.value().get(0).model()); - Assertions.assertEquals("nkzpatqtdiswxsp", model.value().get(0).manufacturer()); - Assertions.assertEquals("jazbbgspftesu", model.value().get(0).supportedVersions().get(0).version()); - Assertions.assertEquals("pvpvd", model.value().get(0).supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("ytcovqs", model.value().get(0).supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.value().get(0).supportedRoleTypes().get(0)); - Assertions.assertEquals("zfxnxmlbmuos", model.value().get(0).interfaces().get(0).identifier()); - Assertions.assertEquals("jmdihdcyyyzlw", model.value().get(0).interfaces().get(0).interfaceType()); - Assertions.assertEquals("vdpwwobtdphti", model.nextLink()); + Assertions.assertEquals(NetworkDeviceRoleName.CE, model.value().get(0).supportedRoleTypes().get(0)); + Assertions.assertEquals("zizznyu", model.value().get(0).interfaces().get(0).identifier()); + Assertions.assertEquals("qz", model.value().get(0).interfaces().get(0).interfaceType()); + Assertions.assertEquals("zxkpyehhfdyld", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceUpgradeRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceUpgradeRequestTests.java new file mode 100644 index 000000000000..4883b0c9f70c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceUpgradeRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceUpgradeRequest; +import org.junit.jupiter.api.Assertions; + +public final class NetworkDeviceUpgradeRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkDeviceUpgradeRequest model + = BinaryData.fromString("{\"version\":\"yresgzsdtmwbyorj\",\"rwDeviceConfigUrl\":\"bchycha\"}") + .toObject(NetworkDeviceUpgradeRequest.class); + Assertions.assertEquals("yresgzsdtmwbyorj", model.version()); + Assertions.assertEquals("bchycha", model.rwDeviceConfigUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkDeviceUpgradeRequest model + = new NetworkDeviceUpgradeRequest().withVersion("yresgzsdtmwbyorj").withRwDeviceConfigUrl("bchycha"); + model = BinaryData.fromObject(model).toObject(NetworkDeviceUpgradeRequest.class); + Assertions.assertEquals("yresgzsdtmwbyorj", model.version()); + Assertions.assertEquals("bchycha", model.rwDeviceConfigUrl()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java deleted file mode 100644 index 41f6bbc60aa6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"version\":\"gl\",\"networkDeviceSku\":\"sfgb\",\"networkDeviceRole\":\"ToR\",\"networkRackId\":\"azlycx\",\"managementIpv4Address\":\"brukhqbuoyr\",\"managementIpv6Address\":\"kgqdmvvvjm\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"hostName\":\"sveamsea\",\"serialNumber\":\"uvhxiohglmufzuuy\",\"annotation\":\"haeem\"},\"location\":\"osdpxtsdyw\",\"tags\":{\"mixaqgfpuhhzwr\":\"fvwgwphwxiav\",\"lixa\":\"jumlkjsvkbt\",\"jmsngmluyr\":\"phkgminhecjgdj\"},\"id\":\"kpismmrmrj\",\"name\":\"jthizsabcylz\",\"type\":\"ietumzenkrdr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkDevice response = manager.networkDevices() - .define("ihatajdt") - .withRegion("bhgjajkvwkocx") - .withExistingResourceGroup("kxsqkuzabrs") - .withTags(mapOf("bgvlpg", "zllvna")) - .withNetworkDeviceSku("jyiehkxgfuzqqnz") - .withHostname("acrktjoygyns") - .withSerialNumber("gzbbnuglquarbruv") - .withAnnotation("eyxwrmupzpe") - .create(); - - Assertions.assertEquals("osdpxtsdyw", response.location()); - Assertions.assertEquals("fvwgwphwxiav", response.tags().get("mixaqgfpuhhzwr")); - Assertions.assertEquals("sfgb", response.networkDeviceSku()); - Assertions.assertEquals("sveamsea", response.hostname()); - Assertions.assertEquals("uvhxiohglmufzuuy", response.serialNumber()); - Assertions.assertEquals("haeem", response.annotation()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 840693a383c1..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"version\":\"wmwt\",\"networkDeviceSku\":\"rscfcn\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"cullmfwfpoeow\",\"managementIpv4Address\":\"zzwncs\",\"managementIpv6Address\":\"fxvchmubyguqh\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"hostName\":\"rpryyircbajxjr\",\"serialNumber\":\"yrkb\",\"annotation\":\"tx\"},\"location\":\"n\",\"tags\":{\"kevday\":\"mbxo\"},\"id\":\"x\",\"name\":\"kxiymzgrg\",\"type\":\"jalrjwaezp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkDevice response = manager.networkDevices() - .getByResourceGroupWithResponse("gtiivzkd", "exccwldgfq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("n", response.location()); - Assertions.assertEquals("mbxo", response.tags().get("kevday")); - Assertions.assertEquals("rscfcn", response.networkDeviceSku()); - Assertions.assertEquals("rpryyircbajxjr", response.hostname()); - Assertions.assertEquals("yrkb", response.serialNumber()); - Assertions.assertEquals("tx", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java deleted file mode 100644 index e66400e0832b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"mtcepzimfcfs\",\"networkDeviceSku\":\"wexpasckpgbmly\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"lxgcmxt\",\"managementIpv4Address\":\"jtqvqctm\",\"managementIpv6Address\":\"dkxzxol\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"hostName\":\"ddpxqrxiperrp\",\"serialNumber\":\"mfvmjjfzizxlbiqq\",\"annotation\":\"arxknfvbsym\"},\"location\":\"bahdbtjm\",\"tags\":{\"bizrxhuq\":\"onrk\",\"cxgqtquirgopgza\":\"vpanloqov\",\"uoqhqrcsksxqfhl\":\"ucujtjuzvyjxuxch\"},\"id\":\"vuvda\",\"name\":\"vyjcdpncvfyeqyod\",\"type\":\"ijcsapqhipajs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.networkDevices().listByResourceGroup("ybsps", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bahdbtjm", response.iterator().next().location()); - Assertions.assertEquals("onrk", response.iterator().next().tags().get("bizrxhuq")); - Assertions.assertEquals("wexpasckpgbmly", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals("ddpxqrxiperrp", response.iterator().next().hostname()); - Assertions.assertEquals("mfvmjjfzizxlbiqq", response.iterator().next().serialNumber()); - Assertions.assertEquals("arxknfvbsym", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java deleted file mode 100644 index 3058da68bc88..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"vnmevl\",\"networkDeviceSku\":\"cuwrfgpjfv\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"eodvlmdzgvcykz\",\"managementIpv4Address\":\"gctygbbmu\",\"managementIpv6Address\":\"jvvcrsmwojm\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"hostName\":\"utqnkeqjftvlt\",\"serialNumber\":\"pec\",\"annotation\":\"kbzltnowpajfhx\"},\"location\":\"ubbzadzglmuuzps\",\"tags\":{\"rerk\":\"ypxmuldh\",\"fjxkbywsbuqfm\":\"p\"},\"id\":\"bdjkmnxsggnow\",\"name\":\"hyvdbrdvsv\",\"type\":\"hbtyc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkDevices().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ubbzadzglmuuzps", response.iterator().next().location()); - Assertions.assertEquals("ypxmuldh", response.iterator().next().tags().get("rerk")); - Assertions.assertEquals("cuwrfgpjfv", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals("utqnkeqjftvlt", response.iterator().next().hostname()); - Assertions.assertEquals("pec", response.iterator().next().serialNumber()); - Assertions.assertEquals("kbzltnowpajfhx", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java deleted file mode 100644 index 2d2e10b2c9a3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"version\":\"mip\",\"networkDeviceSku\":\"liqmvlbhikeaq\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"pomxpu\",\"managementIpv4Address\":\"tsdfjyieso\",\"managementIpv6Address\":\"iqbuou\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"hostName\":\"ofjsbgbwwzvdaj\",\"serialNumber\":\"nncfmaciqgjjrlhi\",\"annotation\":\"wixvtbouguxtndop\"},\"location\":\"ttbas\",\"tags\":{\"lndbeaqbkixv\":\"ap\",\"spugzfeuzjljmph\":\"lwynpbbfqvzfj\"},\"id\":\"ky\",\"name\":\"zolgjzmicuydocc\",\"type\":\"xshanzb\"},{\"properties\":{\"version\":\"adh\",\"networkDeviceSku\":\"tecaa\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"hzniucbda\",\"managementIpv4Address\":\"b\",\"managementIpv6Address\":\"injdllwktlepo\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"hostName\":\"jgcq\",\"serialNumber\":\"lynkgfcfdruw\",\"annotation\":\"kxx\"},\"location\":\"lhuulriqb\",\"tags\":{\"sxebrslttfyhcdjw\":\"vjgb\",\"agttpufpb\":\"uoard\"},\"id\":\"g\",\"name\":\"rholhujbfwxi\",\"type\":\"lkysolsyjp\"},{\"properties\":{\"version\":\"slwhdmcvhtbb\",\"networkDeviceSku\":\"hfvhuwzbxpcqz\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"tjecohm\",\"managementIpv4Address\":\"vlrrskapbxwieexu\",\"managementIpv6Address\":\"derltfokyksyim\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"hostName\":\"xzznnui\",\"serialNumber\":\"rsejegprkj\",\"annotation\":\"wrjmwv\"},\"location\":\"tu\",\"tags\":{\"jgxieqfkyfh\":\"ximwgxqldeko\",\"pbyynvskpajbm\":\"wvjaq\"},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"},{\"properties\":{\"version\":\"iscr\",\"networkDeviceSku\":\"lgftrqrejdaa\",\"networkDeviceRole\":\"NPB\",\"networkRackId\":\"m\",\"managementIpv4Address\":\"ahlfxlmuifmuadj\",\"managementIpv6Address\":\"snc\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"hostName\":\"gczetybnxg\",\"serialNumber\":\"lcgctjchfjv\",\"annotation\":\"wjzebecuvlb\"},\"location\":\"vwcljkx\",\"tags\":{\"psyxjije\":\"rwoxzg\",\"qwjxi\":\"pdvrbkerdkdkga\",\"ygzqpjoisfmn\":\"dfkcef\",\"ntwhymxymulwiv\":\"ybdjnxumentq\"},\"id\":\"towlhlsycoyb\",\"name\":\"jasqubf\",\"type\":\"j\"}],\"nextLink\":\"whjq\"}") - .toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("ttbas", model.value().get(0).location()); - Assertions.assertEquals("ap", model.value().get(0).tags().get("lndbeaqbkixv")); - Assertions.assertEquals("liqmvlbhikeaq", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals("ofjsbgbwwzvdaj", model.value().get(0).hostname()); - Assertions.assertEquals("nncfmaciqgjjrlhi", model.value().get(0).serialNumber()); - Assertions.assertEquals("wixvtbouguxtndop", model.value().get(0).annotation()); - Assertions.assertEquals("whjq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicesListResult model = new NetworkDevicesListResult().withValue(Arrays.asList( - new NetworkDeviceInner().withLocation("ttbas") - .withTags(mapOf("lndbeaqbkixv", "ap", "spugzfeuzjljmph", "lwynpbbfqvzfj")) - .withNetworkDeviceSku("liqmvlbhikeaq") - .withHostname("ofjsbgbwwzvdaj") - .withSerialNumber("nncfmaciqgjjrlhi") - .withAnnotation("wixvtbouguxtndop"), - new NetworkDeviceInner().withLocation("lhuulriqb") - .withTags(mapOf("sxebrslttfyhcdjw", "vjgb", "agttpufpb", "uoard")) - .withNetworkDeviceSku("tecaa") - .withHostname("jgcq") - .withSerialNumber("lynkgfcfdruw") - .withAnnotation("kxx"), - new NetworkDeviceInner().withLocation("tu") - .withTags(mapOf("jgxieqfkyfh", "ximwgxqldeko", "pbyynvskpajbm", "wvjaq")) - .withNetworkDeviceSku("hfvhuwzbxpcqz") - .withHostname("xzznnui") - .withSerialNumber("rsejegprkj") - .withAnnotation("wrjmwv"), - new NetworkDeviceInner().withLocation("vwcljkx") - .withTags(mapOf("psyxjije", "rwoxzg", "qwjxi", "pdvrbkerdkdkga", "ygzqpjoisfmn", "dfkcef", - "ntwhymxymulwiv", "ybdjnxumentq")) - .withNetworkDeviceSku("lgftrqrejdaa") - .withHostname("gczetybnxg") - .withSerialNumber("lcgctjchfjv") - .withAnnotation("wjzebecuvlb"))) - .withNextLink("whjq"); - model = BinaryData.fromObject(model).toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("ttbas", model.value().get(0).location()); - Assertions.assertEquals("ap", model.value().get(0).tags().get("lndbeaqbkixv")); - Assertions.assertEquals("liqmvlbhikeaq", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals("ofjsbgbwwzvdaj", model.value().get(0).hostname()); - Assertions.assertEquals("nncfmaciqgjjrlhi", model.value().get(0).serialNumber()); - Assertions.assertEquals("wixvtbouguxtndop", model.value().get(0).annotation()); - Assertions.assertEquals("whjq", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java new file mode 100644 index 000000000000..7a5b5ec1daf7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkFabricLockRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkFabricLockRequest model = BinaryData.fromString("{\"lockType\":\"Administrative\",\"action\":\"Lock\"}") + .toObject(NetworkFabricLockRequest.class); + Assertions.assertEquals(NetworkFabricLockType.ADMINISTRATIVE, model.lockType()); + Assertions.assertEquals(NetworkFabricLockAction.LOCK, model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkFabricLockRequest model + = new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.ADMINISTRATIVE) + .withAction(NetworkFabricLockAction.LOCK); + model = BinaryData.fromObject(model).toObject(NetworkFabricLockRequest.class); + Assertions.assertEquals(NetworkFabricLockType.ADMINISTRATIVE, model.lockType()); + Assertions.assertEquals(NetworkFabricLockAction.LOCK, model.action()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java index 05a9a1aa62c1..52d25bf617cd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,9 @@ public final class NetworkFabricSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkFabricSkuInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":976682569,\"maximumServerCount\":1008393103,\"supportedVersions\":[\"jtaqhsmqazpdg\"],\"details\":\"jhxsht\",\"provisioningState\":\"Accepted\"},\"id\":\"c\",\"name\":\"qulpt\",\"type\":\"bvcpxtzhi\"}") + "{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":1367645323,\"maximumServerCount\":1186435541,\"supportedVersions\":[\"iwfryawkchkap\",\"tsk\",\"hfyf\"],\"details\":\"ibjepzwhj\",\"provisioningState\":\"Succeeded\"},\"id\":\"gbggcjx\",\"name\":\"hblivwehsudym\",\"type\":\"mbhdo\"}") .toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(976682569, model.maxComputeRacks()); - Assertions.assertEquals(1008393103, model.maximumServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuInner model - = new NetworkFabricSkuInner().withMaxComputeRacks(976682569).withMaximumServerCount(1008393103); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(976682569, model.maxComputeRacks()); - Assertions.assertEquals(1008393103, model.maximumServerCount()); + Assertions.assertEquals(1367645323, model.maxComputeRacks()); + Assertions.assertEquals(1186435541, model.maximumServerCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java index c0bf9d5fa067..050f663c0c2d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,9 @@ public final class NetworkFabricSkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkFabricSkuProperties model = BinaryData.fromString( - "{\"type\":\"SingleRack\",\"maxComputeRacks\":949341879,\"maximumServerCount\":1510349768,\"supportedVersions\":[\"jbl\",\"rnsihqhudsmus\",\"aawja\"],\"details\":\"wj\",\"provisioningState\":\"Succeeded\"}") + "{\"type\":\"SingleRack\",\"maxComputeRacks\":91394578,\"maximumServerCount\":223502884,\"supportedVersions\":[\"xzduvxdmxexat\",\"dmnrsenxoirx\",\"ddmiploisjkzso\"],\"details\":\"nntwg\",\"provisioningState\":\"Deleting\"}") .toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(949341879, model.maxComputeRacks()); - Assertions.assertEquals(1510349768, model.maximumServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuProperties model - = new NetworkFabricSkuProperties().withMaxComputeRacks(949341879).withMaximumServerCount(1510349768); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(949341879, model.maxComputeRacks()); - Assertions.assertEquals(1510349768, model.maximumServerCount()); + Assertions.assertEquals(91394578, model.maxComputeRacks()); + Assertions.assertEquals(223502884, model.maximumServerCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java index 6b1f71da0b8c..189aa85be64c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; @@ -21,19 +21,19 @@ public final class NetworkFabricSkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":1500695591,\"maximumServerCount\":1431108277,\"supportedVersions\":[\"dotmpumzuhood\",\"tqhpvarumvu\"],\"details\":\"yu\",\"provisioningState\":\"Updating\"},\"id\":\"qqllavzlhjgm\",\"name\":\"odbl\",\"type\":\"pqr\"}"; + = "{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":1929977189,\"maximumServerCount\":898198822,\"supportedVersions\":[\"xehmnizoybtehk\",\"tlnmmyznwrc\",\"qwkqulkzov\"],\"details\":\"hwiwhrqxjxlssosn\",\"provisioningState\":\"Deleting\"},\"id\":\"xnsjjjcdd\",\"name\":\"vg\",\"type\":\"bfn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkFabricSku response - = manager.networkFabricSkus().getWithResponse("dlrkvitzk", com.azure.core.util.Context.NONE).getValue(); + = manager.networkFabricSkus().getWithResponse("cjighmkd", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(1500695591, response.maxComputeRacks()); - Assertions.assertEquals(1431108277, response.maximumServerCount()); + Assertions.assertEquals(1929977189, response.maxComputeRacks()); + Assertions.assertEquals(898198822, response.maximumServerCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java index 79f248b0d6ae..f0c5f2592631 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; @@ -22,18 +22,18 @@ public final class NetworkFabricSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1716501322,\"maximumServerCount\":685018698,\"supportedVersions\":[\"cubwh\",\"myibx\"],\"details\":\"eg\",\"provisioningState\":\"Succeeded\"},\"id\":\"xkxtcxbbjbeyqoh\",\"name\":\"iawpjfkrarerdl\",\"type\":\"bvtpxow\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1197175774,\"maximumServerCount\":1820484156,\"supportedVersions\":[\"majgczpdiod\",\"tjylimzvj\",\"jh\",\"t\"],\"details\":\"cwmabehr\",\"provisioningState\":\"Failed\"},\"id\":\"zwtghzvhzrxcaes\",\"name\":\"xoavlwwpvjrnjwvc\",\"type\":\"arqlceflgsndur\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals(1716501322, response.iterator().next().maxComputeRacks()); - Assertions.assertEquals(685018698, response.iterator().next().maximumServerCount()); + Assertions.assertEquals(1197175774, response.iterator().next().maxComputeRacks()); + Assertions.assertEquals(1820484156, response.iterator().next().maximumServerCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java index 646547b9807c..64f4330e4dfe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java @@ -1,35 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkusListResult; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkusListResult; import org.junit.jupiter.api.Assertions; public final class NetworkFabricSkusListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkFabricSkusListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1161341993,\"maximumServerCount\":404849195,\"supportedVersions\":[\"qban\",\"sjtgirnbgmgmddo\"],\"details\":\"mynltwmpftmfoeaj\",\"provisioningState\":\"Updating\"},\"id\":\"xwet\",\"name\":\"mfd\",\"type\":\"rvlkpzwbhnrec\"}],\"nextLink\":\"d\"}") + "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1477736921,\"maximumServerCount\":2104029750,\"supportedVersions\":[\"zwwy\",\"bdjzghximkg\",\"mxpqkjnpyriwn\"],\"details\":\"tcxmmqm\",\"provisioningState\":\"Accepted\"},\"id\":\"yjrexwdonbexfte\",\"name\":\"aubheeggzgrnqt\",\"type\":\"fozuumrtgjq\"}],\"nextLink\":\"cant\"}") .toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(1161341993, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals(404849195, model.value().get(0).maximumServerCount()); - Assertions.assertEquals("d", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkusListResult model = new NetworkFabricSkusListResult() - .withValue(Arrays - .asList(new NetworkFabricSkuInner().withMaxComputeRacks(1161341993).withMaximumServerCount(404849195))) - .withNextLink("d"); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(1161341993, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals(404849195, model.value().get(0).maximumServerCount()); - Assertions.assertEquals("d", model.nextLink()); + Assertions.assertEquals(1477736921, model.value().get(0).maxComputeRacks()); + Assertions.assertEquals(2104029750, model.value().get(0).maximumServerCount()); + Assertions.assertEquals("cant", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java index 8d9a11692af7..7da46f7fe91d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java @@ -1,26 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; import org.junit.jupiter.api.Assertions; public final class NetworkInterfaceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfaceInner model = BinaryData.fromString( - "{\"properties\":{\"physicalIdentifier\":\"chqohtfxcpupuk\",\"connectedTo\":\"mjzpwdlvwtiwsm\",\"interfaceType\":\"Data\",\"ipv4Address\":\"nhqnampp\",\"ipv6Address\":\"tassaekewna\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"annotation\":\"aj\"},\"id\":\"yizyddcvxodk\",\"name\":\"vfsxx\",\"type\":\"ydesqlvgec\"}") + "{\"properties\":{\"physicalIdentifier\":\"fs\",\"connectedTo\":\"izhqikmgobl\",\"interfaceType\":\"Management\",\"ipv4Address\":\"cdiiisklbonx\",\"ipv6Address\":\"pjxvtrkfkg\",\"description\":\"jqnnpjwkosnyxi\",\"additionalDescription\":\"oujjcx\",\"lastOperation\":{\"details\":\"mrlhnzkwops\"},\"networkFabricId\":\"yinxu\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"configurationState\":\"Provisioning\",\"annotation\":\"ezbfqployuek\"},\"identity\":{\"principalId\":\"vuftrsvjmnsvu\",\"tenantId\":\"jktvolef\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ampqocl\":{\"principalId\":\"pkdbx\",\"clientId\":\"fb\"}}},\"id\":\"nmxynlsuqbwzst\",\"name\":\"k\",\"type\":\"gvp\"}") .toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("aj", model.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("oujjcx", model.additionalDescription()); + Assertions.assertEquals("ezbfqployuek", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceInner model = new NetworkInterfaceInner().withAnnotation("aj"); + NetworkInterfaceInner model = new NetworkInterfaceInner() + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("ampqocl", new UserAssignedIdentity()))) + .withAdditionalDescription("oujjcx") + .withAnnotation("ezbfqployuek"); model = BinaryData.fromObject(model).toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("aj", model.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("oujjcx", model.additionalDescription()); + Assertions.assertEquals("ezbfqployuek", model.annotation()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java index 8208381ef42c..913f188caa36 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,14 +12,18 @@ public final class NetworkInterfacePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfacePatchProperties model - = BinaryData.fromString("{\"annotation\":\"imyfpqdo\"}").toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("imyfpqdo", model.annotation()); + = BinaryData.fromString("{\"additionalDescription\":\"kixsps\",\"annotation\":\"gavkmv\"}") + .toObject(NetworkInterfacePatchProperties.class); + Assertions.assertEquals("gavkmv", model.annotation()); + Assertions.assertEquals("kixsps", model.additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfacePatchProperties model = new NetworkInterfacePatchProperties().withAnnotation("imyfpqdo"); + NetworkInterfacePatchProperties model + = new NetworkInterfacePatchProperties().withAnnotation("gavkmv").withAdditionalDescription("kixsps"); model = BinaryData.fromObject(model).toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("imyfpqdo", model.annotation()); + Assertions.assertEquals("gavkmv", model.annotation()); + Assertions.assertEquals("kixsps", model.additionalDescription()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java index a775573d4dcb..384afe2b035a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java @@ -1,25 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; import org.junit.jupiter.api.Assertions; public final class NetworkInterfacePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkInterfacePatch model = BinaryData.fromString("{\"properties\":{\"annotation\":\"ducdaaktujktz\"}}") + NetworkInterfacePatch model = BinaryData.fromString( + "{\"properties\":{\"additionalDescription\":\"ejqfbi\",\"annotation\":\"pfjxdwdrpazq\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"zmecjjkmqenhai\":{\"principalId\":\"otfcuuugtjigpg\",\"clientId\":\"iawohfmhn\"},\"pijpkhc\":{\"principalId\":\"rpvsgloiovs\",\"clientId\":\"ivqsuvwtenb\"},\"nd\":{\"principalId\":\"aqxukuicjufte\",\"clientId\":\"oo\"},\"vzuaixc\":{\"principalId\":\"wfhvpxjhxzu\",\"clientId\":\"jzabbwz\"}}}}") .toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("ducdaaktujktz", model.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ejqfbi", model.additionalDescription()); + Assertions.assertEquals("pfjxdwdrpazq", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfacePatch model = new NetworkInterfacePatch().withAnnotation("ducdaaktujktz"); + NetworkInterfacePatch model = new NetworkInterfacePatch().withIdentity(new ManagedServiceIdentityPatch() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("zmecjjkmqenhai", new UserAssignedIdentity(), "pijpkhc", + new UserAssignedIdentity(), "nd", new UserAssignedIdentity(), "vzuaixc", new UserAssignedIdentity()))) + .withAdditionalDescription("ejqfbi") + .withAnnotation("pfjxdwdrpazq"); model = BinaryData.fromObject(model).toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("ducdaaktujktz", model.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ejqfbi", model.additionalDescription()); + Assertions.assertEquals("pfjxdwdrpazq", model.annotation()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java index 4038133857b8..dc4dff1ffd58 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,15 +12,18 @@ public final class NetworkInterfacePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfaceProperties model = BinaryData.fromString( - "{\"physicalIdentifier\":\"goljtzxnmxs\",\"connectedTo\":\"bygoo\",\"interfaceType\":\"Management\",\"ipv4Address\":\"pjxvazyjf\",\"ipv6Address\":\"saodj\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"annotation\":\"ibfasgmatr\"}") + "{\"physicalIdentifier\":\"rgjjktfinfhoksmm\",\"connectedTo\":\"lwkqic\",\"interfaceType\":\"Management\",\"ipv4Address\":\"krjflsgaojb\",\"ipv6Address\":\"pqsdoc\",\"description\":\"zpujzflmcdsg\",\"additionalDescription\":\"elujiswl\",\"lastOperation\":{\"details\":\"nxhfwlfxzfwu\"},\"networkFabricId\":\"upcknecexkgrvfp\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"configurationState\":\"Deprovisioning\",\"annotation\":\"tqpdzfyxcnwawoxc\"}") .toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("ibfasgmatr", model.annotation()); + Assertions.assertEquals("tqpdzfyxcnwawoxc", model.annotation()); + Assertions.assertEquals("elujiswl", model.additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceProperties model = new NetworkInterfaceProperties().withAnnotation("ibfasgmatr"); + NetworkInterfaceProperties model + = new NetworkInterfaceProperties().withAnnotation("tqpdzfyxcnwawoxc").withAdditionalDescription("elujiswl"); model = BinaryData.fromObject(model).toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("ibfasgmatr", model.annotation()); + Assertions.assertEquals("tqpdzfyxcnwawoxc", model.annotation()); + Assertions.assertEquals("elujiswl", model.additionalDescription()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java index ed574c14dfbb..177f550ba61a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java @@ -1,18 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,21 +26,38 @@ public final class NetworkInterfacesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"physicalIdentifier\":\"ljjhcsgzooefzsdt\",\"connectedTo\":\"qkaqdvwojvx\",\"interfaceType\":\"Data\",\"ipv4Address\":\"rqxrqghotingzick\",\"ipv6Address\":\"gawyhpwmd\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"annotation\":\"lvyhvvpuqyrpubbk\"},\"id\":\"idcfwoolku\",\"name\":\"zowgmmixf\",\"type\":\"aupgblna\"}"; + = "{\"properties\":{\"physicalIdentifier\":\"muwl\",\"connectedTo\":\"jwkpznsfbi\",\"interfaceType\":\"Management\",\"ipv4Address\":\"gpvdl\",\"ipv6Address\":\"yo\",\"description\":\"lcuxzlln\",\"additionalDescription\":\"gqcfggje\",\"lastOperation\":{\"details\":\"xmpgfspwhfhdgu\"},\"networkFabricId\":\"gav\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"configurationState\":\"PendingCommit\",\"annotation\":\"zxemqnwpwrf\"},\"identity\":{\"principalId\":\"ggrm\",\"tenantId\":\"fhkoe\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vrjhtpxydiuviup\":{\"principalId\":\"ichasaenta\",\"clientId\":\"vddei\"},\"qdjw\":{\"principalId\":\"tnsyrrybdyqiv\",\"clientId\":\"suhozihd\"},\"vzbdhrcepanhy\":{\"principalId\":\"wcpijga\",\"clientId\":\"afdjinwgirnjgs\"},\"ehzxzazo\":{\"principalId\":\"ahijbjjlx\",\"clientId\":\"jzbggsnanojty\"}}},\"id\":\"ons\",\"name\":\"jdga\",\"type\":\"mktnsowszbeflhxi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkInterface response = manager.networkInterfaces() - .define("esswbrnbox") - .withExistingNetworkDevice("qonxvnmcyze", "uvwa") - .withAnnotation("dqr") + .define("aceoaboozxkdz") + .withExistingNetworkDevice("jxphwynimcp", "rakucgjre") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("jgmfyernckg", new UserAssignedIdentity()))) + .withAdditionalDescription("wcveqge") + .withAnnotation("jdonufqhqsniobe") .create(); - Assertions.assertEquals("lvyhvvpuqyrpubbk", response.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("gqcfggje", response.additionalDescription()); + Assertions.assertEquals("zxemqnwpwrf", response.annotation()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java index 0d813a29cea8..4aad004b4c35 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,19 +22,21 @@ public final class NetworkInterfacesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"physicalIdentifier\":\"ebqq\",\"connectedTo\":\"et\",\"interfaceType\":\"Management\",\"ipv4Address\":\"lczf\",\"ipv6Address\":\"fyyraiaiidkewq\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"dddo\"},\"id\":\"ljhnxf\",\"name\":\"ffngfpilloirm\",\"type\":\"xdbktuqnbcjknrq\"}"; + = "{\"properties\":{\"physicalIdentifier\":\"gomhs\",\"connectedTo\":\"d\",\"interfaceType\":\"Management\",\"ipv4Address\":\"wbijxfc\",\"ipv6Address\":\"effrg\",\"description\":\"dmrowhrrguvd\",\"additionalDescription\":\"gucwawlmsikl\",\"lastOperation\":{\"details\":\"dfcphg\"},\"networkFabricId\":\"ijzhrb\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"configurationState\":\"Failed\",\"annotation\":\"uelf\"},\"identity\":{\"principalId\":\"b\",\"tenantId\":\"blpdwckmnpzub\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"emnryxnklf\":{\"principalId\":\"g\",\"clientId\":\"rgngcpbshqzzlc\"},\"dsuopcdi\":{\"principalId\":\"zsyigxsyx\",\"clientId\":\"gczabapeuqyz\"}}},\"id\":\"sspcutgkm\",\"name\":\"sqaqgllnhg\",\"type\":\"siwzzkaeqrnglgi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkInterface response = manager.networkInterfaces() - .getWithResponse("es", "exawxo", "bdctj", com.azure.core.util.Context.NONE) + .getWithResponse("rqnjush", "xhtvn", "cmrrgm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dddo", response.annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("gucwawlmsikl", response.additionalDescription()); + Assertions.assertEquals("uelf", response.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java index d67d47ab8cb2..5cfe4f2644c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,18 +23,21 @@ public final class NetworkInterfacesListByNetworkDeviceMockTests { @Test public void testListByNetworkDevice() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"oyoioxdwffwyzqke\",\"connectedTo\":\"urreuecokyduqz\",\"interfaceType\":\"Management\",\"ipv4Address\":\"lbqv\",\"ipv6Address\":\"tekxnvkdvcgowrdt\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"annotation\":\"dlbbc\"},\"id\":\"amkyrkwsthpiv\",\"name\":\"cffxhvnodqqzjbf\",\"type\":\"roswnfq\"}]}"; + = "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"tfkkiupmdaj\",\"connectedTo\":\"dvvzb\",\"interfaceType\":\"Management\",\"ipv4Address\":\"okiffqpwdyzsetr\",\"ipv6Address\":\"tqhnsoijucprkqyw\",\"description\":\"xga\",\"additionalDescription\":\"msetzcxlisvqfbls\",\"lastOperation\":{\"details\":\"polpsap\"},\"networkFabricId\":\"exhimvlocdxvh\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"configurationState\":\"Deprovisioned\",\"annotation\":\"pntrddyriwanv\"},\"identity\":{\"principalId\":\"mqsci\",\"tenantId\":\"fulxgnz\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ydehbvbexrbynnl\":{\"principalId\":\"wsooqypvplmyz\",\"clientId\":\"vghh\"},\"wzzsicbbosacr\":{\"principalId\":\"d\",\"clientId\":\"k\"},\"jvtgecehennledho\":{\"principalId\":\"scfkefeltx\",\"clientId\":\"amimgju\"}}},\"id\":\"fjwkctdnnqokq\",\"name\":\"uzsl\",\"type\":\"yj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkInterfaces() - .listByNetworkDevice("znwwtkuytwii", "inlic", com.azure.core.util.Context.NONE); + .listByNetworkDevice("uaefwdkpadkts", "ywaojr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dlbbc", response.iterator().next().annotation()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("msetzcxlisvqfbls", response.iterator().next().additionalDescription()); + Assertions.assertEquals("pntrddyriwanv", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java index 61c72e5104ea..be5932dd352d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java @@ -1,34 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfacesList; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class NetworkInterfacesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfacesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"nwyytfv\",\"connectedTo\":\"tfjikffffgkuh\",\"interfaceType\":\"Data\",\"ipv4Address\":\"vuldbkkejjk\",\"ipv6Address\":\"gawgazmxjqi\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"annotation\":\"bcmlza\"},\"id\":\"zbhur\",\"name\":\"olk\",\"type\":\"lirh\"},{\"properties\":{\"physicalIdentifier\":\"ojusuzgfjzcva\",\"connectedTo\":\"oialahfxwccokdx\",\"interfaceType\":\"Management\",\"ipv4Address\":\"kczynuhhoqeqsh\",\"ipv6Address\":\"ljqkxyrqolnthbb\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"wdrnzkj\"},\"id\":\"fceyjn\",\"name\":\"jmlfuyfjbp\",\"type\":\"iddhlrufzc\"},{\"properties\":{\"physicalIdentifier\":\"jmqrfuiocuselq\",\"connectedTo\":\"sazrhxuddqmdtff\",\"interfaceType\":\"Management\",\"ipv4Address\":\"rkkhmwdmdlgy\",\"ipv6Address\":\"xokwtjawhvagnqfq\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"annotation\":\"yolcaymjchtvsnv\"},\"id\":\"qdnzyza\",\"name\":\"atuwqkokbc\",\"type\":\"othymgobl\"},{\"properties\":{\"physicalIdentifier\":\"snwgwimaa\",\"connectedTo\":\"akhtmhobcyanrfvq\",\"interfaceType\":\"Data\",\"ipv4Address\":\"gvoogxkfna\",\"ipv6Address\":\"qymhcctopuow\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"annotation\":\"yhquhc\"},\"id\":\"gx\",\"name\":\"hajpxecxqnwhsc\",\"type\":\"zawmvgxsmp\"}],\"nextLink\":\"pwirfljfewxqouo\"}") + "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"erejrkpzj\",\"connectedTo\":\"etjx\",\"interfaceType\":\"Management\",\"ipv4Address\":\"taeitwhlbecgihz\",\"ipv6Address\":\"emnrrabovrwwxy\",\"description\":\"jhspboxhifpps\",\"additionalDescription\":\"eswyhh\",\"lastOperation\":{\"details\":\"juajxwwvcmmp\"},\"networkFabricId\":\"lyuqvcmlaexb\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"configurationState\":\"Rejected\",\"annotation\":\"zsjz\"},\"identity\":{\"principalId\":\"ldrorhyogzmsimeh\",\"tenantId\":\"uuwdhtq\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ovke\":{\"principalId\":\"imxt\",\"clientId\":\"ugisnomwnwngho\"},\"veywetkrhlolmcn\":{\"principalId\":\"micjixxfsf\",\"clientId\":\"rtnuguefxxijteb\"}}},\"id\":\"pfgsvbbvaqdljnp\",\"name\":\"tlrnrdet\",\"type\":\"wevxeh\"},{\"properties\":{\"physicalIdentifier\":\"kdxl\",\"connectedTo\":\"vdovbrb\",\"interfaceType\":\"Management\",\"ipv4Address\":\"prdaqcc\",\"ipv6Address\":\"cbnygd\",\"description\":\"cxwbp\",\"additionalDescription\":\"ykdigqzlrznda\",\"lastOperation\":{\"details\":\"id\"},\"networkFabricId\":\"q\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"configurationState\":\"Provisioning\",\"annotation\":\"larh\"},\"identity\":{\"principalId\":\"v\",\"tenantId\":\"zekdzdzffzj\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"orywnvojtv\":{\"principalId\":\"pchggryelgfy\",\"clientId\":\"igfgfrrkdkncz\"}}},\"id\":\"evdlh\",\"name\":\"vbkar\",\"type\":\"pyhssrlvkpkpkoc\"}],\"nextLink\":\"ccebxxopyicyvspe\"}") .toObject(NetworkInterfacesList.class); - Assertions.assertEquals("bcmlza", model.value().get(0).annotation()); - Assertions.assertEquals("pwirfljfewxqouo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacesList model - = new NetworkInterfacesList().withValue(Arrays.asList(new NetworkInterfaceInner().withAnnotation("bcmlza"), - new NetworkInterfaceInner().withAnnotation("wdrnzkj"), - new NetworkInterfaceInner().withAnnotation("yolcaymjchtvsnv"), - new NetworkInterfaceInner().withAnnotation("yhquhc"))).withNextLink("pwirfljfewxqouo"); - model = BinaryData.fromObject(model).toObject(NetworkInterfacesList.class); - Assertions.assertEquals("bcmlza", model.value().get(0).annotation()); - Assertions.assertEquals("pwirfljfewxqouo", model.nextLink()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("eswyhh", model.value().get(0).additionalDescription()); + Assertions.assertEquals("zsjz", model.value().get(0).annotation()); + Assertions.assertEquals("ccebxxopyicyvspe", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java new file mode 100644 index 000000000000..d41c126a6dbc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorInner model = BinaryData.fromString( + "{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"btkogfggyl\",\"stationName\":\"olrvwsgseqjt\",\"stationIp\":\"axir\",\"stationPort\":633854741,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":221681582,\"probeInterval\":2015763467,\"probeCount\":1302418434},\"stationNetwork\":\"bamtarirdzd\",\"monitoredNetworks\":[\"oflzuk\",\"gougxpypbmz\",\"sxblmnxrxkuly\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"All\",\"vpnIpv4\",\"vpnIpv4\"]},\"lastOperation\":{\"details\":\"b\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\",\"annotation\":\"kfrxvlusedpn\"},\"location\":\"imqaxtmvmycvjpa\",\"tags\":{\"f\":\"qvvyjehyv\"},\"id\":\"ngoqmr\",\"name\":\"v\",\"type\":\"bgtuhw\"}") + .toObject(NetworkMonitorInner.class); + Assertions.assertEquals("imqaxtmvmycvjpa", model.location()); + Assertions.assertEquals("qvvyjehyv", model.tags().get("f")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("btkogfggyl", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("olrvwsgseqjt", model.bmpConfiguration().stationName()); + Assertions.assertEquals("axir", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(633854741, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(221681582, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(2015763467, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1302418434, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("bamtarirdzd", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("oflzuk", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("kfrxvlusedpn", model.annotation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorInner model + = new NetworkMonitorInner().withLocation("imqaxtmvmycvjpa") + .withTags(mapOf("f", "qvvyjehyv")) + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("btkogfggyl") + .withStationName("olrvwsgseqjt") + .withStationIp("axir") + .withStationPort(633854741) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(221681582) + .withProbeInterval(2015763467) + .withProbeCount(1302418434)) + .withStationNetwork("bamtarirdzd") + .withMonitoredNetworks(Arrays.asList("oflzuk", "gougxpypbmz", "sxblmnxrxkuly")) + .withExportPolicy(BmpExportPolicy.ALL) + .withExportPolicyConfiguration(new BmpExportPolicyProperties() + .withExportPolicies(Arrays.asList(BmpExportPolicy.PRE_POLICY, BmpExportPolicy.POST_POLICY))) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.IPV6UNICAST, BmpMonitoredAddressFamily.ALL, + BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.VPN_IPV4))) + .withAnnotation("kfrxvlusedpn"); + model = BinaryData.fromObject(model).toObject(NetworkMonitorInner.class); + Assertions.assertEquals("imqaxtmvmycvjpa", model.location()); + Assertions.assertEquals("qvvyjehyv", model.tags().get("f")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("btkogfggyl", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("olrvwsgseqjt", model.bmpConfiguration().stationName()); + Assertions.assertEquals("axir", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(633854741, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(221681582, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(2015763467, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1302418434, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("bamtarirdzd", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("oflzuk", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("kfrxvlusedpn", model.annotation()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java new file mode 100644 index 000000000000..10c6d6da5c9e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"ddj\",\"stationName\":\"pgom\",\"stationIp\":\"kjpajl\",\"stationPort\":913768239,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1447315290,\"probeInterval\":1948930166,\"probeCount\":982276770},\"stationNetwork\":\"cp\",\"monitoredNetworks\":[\"witafj\"],\"exportPolicy\":\"LocalRib\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"vpnIpv6\"]},\"lastOperation\":{\"details\":\"vkparskplqft\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"dcy\"},\"location\":\"ul\",\"tags\":{\"uxyqbm\":\"fwrm\"},\"id\":\"oubxlpkdsnbqoyms\",\"name\":\"lraduhgwa\",\"type\":\"zyrp\"},{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"jribeskkopbksrib\",\"stationName\":\"tmorikczer\",\"stationIp\":\"iq\",\"stationPort\":1031105777,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":583068147,\"probeInterval\":1602047687,\"probeCount\":655366294},\"stationNetwork\":\"ydgmdoqgruc\",\"monitoredNetworks\":[\"yjudhgwjqegly\",\"nrruwsqp\",\"yxkm\",\"mgexqcilfiulgnn\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"Pre-Policy\",\"LocalRib\"]},\"monitoredAddressFamilies\":[\"All\",\"vpnIpv6\"]},\"lastOperation\":{\"details\":\"bamqrbbsnptm\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"kbyjuwhizcbqjxm\"},\"location\":\"dtunpc\",\"tags\":{\"wkoltjdauujjl\":\"lrfo\",\"ehplmqyoduksa\":\"yhddzeykudjzrim\",\"qkrbyyakrjgbnw\":\"znqqkqxkdglse\"},\"id\":\"okrl\",\"name\":\"becan\",\"type\":\"vxouhdcftptfcj\"},{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"xmcxhwkgihifoyo\",\"stationName\":\"gadhmqyufpfoww\",\"stationIp\":\"lszrtngiqc\",\"stationPort\":1748168426,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":494771165,\"probeInterval\":309044563,\"probeCount\":2050745582},\"stationNetwork\":\"ycigcb\",\"monitoredNetworks\":[\"hdtjfrpo\",\"ajzdj\",\"zbrwrfrmhouf\"],\"exportPolicy\":\"Pre-Policy\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"Post-Policy\",\"Pre-Policy\"]},\"monitoredAddressFamilies\":[\"vpnIpv4\"]},\"lastOperation\":{\"details\":\"nqunniklyxd\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"mvpehp\"},\"location\":\"vkyqhrplfqqnw\",\"tags\":{\"xnsvb\":\"rgc\",\"ytuecmgu\":\"hhaq\",\"ex\":\"ywdpuowl\",\"tcidcabn\":\"rpitqzqnbseujc\"},\"id\":\"xhcxct\",\"name\":\"hxoeftfo\",\"type\":\"ylx\"},{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"jzvqp\",\"stationName\":\"mtupyjtr\",\"stationIp\":\"zwdsnqhyef\",\"stationPort\":1642775628,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1024582735,\"probeInterval\":1076087917,\"probeCount\":1784688107},\"stationNetwork\":\"lytjxhx\",\"monitoredNetworks\":[\"ttl\",\"vukvupuplug\",\"lynvpdvctqdapyds\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Pre-Policy\",\"Pre-Policy\",\"Post-Policy\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"vpnIpv6\",\"vpnIpv4\",\"ipv4Unicast\"]},\"lastOperation\":{\"details\":\"yrnzmjrgfbmps\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"u\"},\"location\":\"gaesmaxdwxrwqtbv\",\"tags\":{\"rlk\":\"takx\"},\"id\":\"jho\",\"name\":\"ywly\",\"type\":\"ghhuluqy\"}],\"nextLink\":\"gpqwgiq\"}") + .toObject(NetworkMonitorListResult.class); + Assertions.assertEquals("ul", model.value().get(0).location()); + Assertions.assertEquals("fwrm", model.value().get(0).tags().get("uxyqbm")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.value().get(0).bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("ddj", model.value().get(0).bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("pgom", model.value().get(0).bmpConfiguration().stationName()); + Assertions.assertEquals("kjpajl", model.value().get(0).bmpConfiguration().stationIp()); + Assertions.assertEquals(913768239, model.value().get(0).bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + model.value().get(0).bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1447315290, + model.value().get(0).bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1948930166, + model.value().get(0).bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(982276770, + model.value().get(0).bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("cp", model.value().get(0).bmpConfiguration().stationNetwork()); + Assertions.assertEquals("witafj", model.value().get(0).bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, model.value().get(0).bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + model.value().get(0).bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, + model.value().get(0).bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("dcy", model.value().get(0).annotation()); + Assertions.assertEquals("gpqwgiq", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java new file mode 100644 index 000000000000..77ac8989c94e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorPatchProperties model = BinaryData.fromString( + "{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"rkh\",\"stationName\":\"qcud\",\"stationIp\":\"m\",\"stationPort\":228131796,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1088953470,\"probeInterval\":1078348813,\"probeCount\":552936879},\"stationNetwork\":\"jfpxoygnmjniqwu\",\"monitoredNetworks\":[\"xfknjq\",\"stnwvravntvklkwq\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"Post-Policy\",\"LocalRib\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"vpnIpv6\",\"All\",\"vpnIpv4\",\"ipv4Unicast\"]}}") + .toObject(NetworkMonitorPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("rkh", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("qcud", model.bmpConfiguration().stationName()); + Assertions.assertEquals("m", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(228131796, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1088953470, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1078348813, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(552936879, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("jfpxoygnmjniqwu", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("xfknjq", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorPatchProperties model = new NetworkMonitorPatchProperties().withBmpConfiguration( + new BmpConfigurationPatchProperties().withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("rkh") + .withStationName("qcud") + .withStationIp("m") + .withStationPort(228131796) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties( + new StationConnectionPatchProperties().withKeepaliveIdleTime(1088953470) + .withProbeInterval(1078348813) + .withProbeCount(552936879)) + .withStationNetwork("jfpxoygnmjniqwu") + .withMonitoredNetworks(Arrays.asList("xfknjq", "stnwvravntvklkwq")) + .withExportPolicy(BmpExportPolicy.ALL) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.POST_POLICY, + BmpExportPolicy.POST_POLICY, BmpExportPolicy.LOCAL_RIB, BmpExportPolicy.POST_POLICY))) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.ALL, + BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.IPV4UNICAST))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("rkh", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("qcud", model.bmpConfiguration().stationName()); + Assertions.assertEquals("m", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(228131796, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1088953470, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1078348813, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(552936879, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("jfpxoygnmjniqwu", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("xfknjq", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java new file mode 100644 index 000000000000..a98bcf02055a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorPatch model = BinaryData.fromString( + "{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"qcqyzmrtfdl\",\"stationName\":\"ryyjlikalbcyuwah\",\"stationIp\":\"agvaidzceph\",\"stationPort\":1247830495,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":276088276,\"probeInterval\":867682398,\"probeCount\":1584995270},\"stationNetwork\":\"mrwpe\",\"monitoredNetworks\":[\"rjbpertjpair\",\"wjmcgi\",\"sywpejt\",\"qopugrse\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\"]},\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"vpnIpv4\",\"ipv4Unicast\"]}},\"tags\":{\"cbcendidhue\":\"td\",\"asgukq\":\"ikwcx\",\"kiwmqnwmytcc\":\"kiynbf\",\"mcgvjb\":\"irgyutexnzh\"}}") + .toObject(NetworkMonitorPatch.class); + Assertions.assertEquals("td", model.tags().get("cbcendidhue")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("qcqyzmrtfdl", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("ryyjlikalbcyuwah", model.bmpConfiguration().stationName()); + Assertions.assertEquals("agvaidzceph", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(1247830495, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(276088276, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(867682398, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1584995270, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("mrwpe", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("rjbpertjpair", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.ALL, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorPatch model = new NetworkMonitorPatch() + .withTags(mapOf("cbcendidhue", "td", "asgukq", "ikwcx", "kiwmqnwmytcc", "kiynbf", "mcgvjb", "irgyutexnzh")) + .withBmpConfiguration(new BmpConfigurationPatchProperties() + .withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("qcqyzmrtfdl") + .withStationName("ryyjlikalbcyuwah") + .withStationIp("agvaidzceph") + .withStationPort(1247830495) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(276088276) + .withProbeInterval(867682398) + .withProbeCount(1584995270)) + .withStationNetwork("mrwpe") + .withMonitoredNetworks(Arrays.asList("rjbpertjpair", "wjmcgi", "sywpejt", "qopugrse")) + .withExportPolicy(BmpExportPolicy.ALL) + .withExportPolicyConfiguration( + new BmpExportPolicyPatchProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.ALL))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV6UNICAST, + BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.IPV4UNICAST))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorPatch.class); + Assertions.assertEquals("td", model.tags().get("cbcendidhue")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("qcqyzmrtfdl", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("ryyjlikalbcyuwah", model.bmpConfiguration().stationName()); + Assertions.assertEquals("agvaidzceph", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(1247830495, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(276088276, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(867682398, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1584995270, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("mrwpe", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("rjbpertjpair", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.ALL, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java new file mode 100644 index 000000000000..4e2392e1c09b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorProperties model = BinaryData.fromString( + "{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"enbphy\",\"stationName\":\"uzgzr\",\"stationIp\":\"dusebkcfetxp\",\"stationPort\":1241849051,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":370909009,\"probeInterval\":1471026300,\"probeCount\":1624743024},\"stationNetwork\":\"n\",\"monitoredNetworks\":[\"ubqwxvsxrbiyzjl\",\"rwjbsycukbocsits\"],\"exportPolicy\":\"Pre-Policy\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\"]},\"monitoredAddressFamilies\":[\"All\"]},\"lastOperation\":{\"details\":\"xjkctyqstta\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"mubplzoepeqlhb\"}") + .toObject(NetworkMonitorProperties.class); + Assertions.assertEquals("mubplzoepeqlhb", model.annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("enbphy", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("uzgzr", model.bmpConfiguration().stationName()); + Assertions.assertEquals("dusebkcfetxp", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(1241849051, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(370909009, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1471026300, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1624743024, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("n", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("ubqwxvsxrbiyzjl", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.ALL, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorProperties model + = new NetworkMonitorProperties().withAnnotation("mubplzoepeqlhb") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("enbphy") + .withStationName("uzgzr") + .withStationIp("dusebkcfetxp") + .withStationPort(1241849051) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(370909009) + .withProbeInterval(1471026300) + .withProbeCount(1624743024)) + .withStationNetwork("n") + .withMonitoredNetworks(Arrays.asList("ubqwxvsxrbiyzjl", "rwjbsycukbocsits")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.LOCAL_RIB))) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.ALL))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorProperties.class); + Assertions.assertEquals("mubplzoepeqlhb", model.annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("enbphy", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("uzgzr", model.bmpConfiguration().stationName()); + Assertions.assertEquals("dusebkcfetxp", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(1241849051, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(370909009, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1471026300, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1624743024, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("n", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("ubqwxvsxrbiyzjl", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + model.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.ALL, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java new file mode 100644 index 000000000000..5687de3412bf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicyProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"zbp\",\"stationName\":\"kg\",\"stationIp\":\"spxhhnv\",\"stationPort\":1247096611,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":837373700,\"probeInterval\":1404952445,\"probeCount\":2030531187},\"stationNetwork\":\"efstize\",\"monitoredNetworks\":[\"gzc\"],\"exportPolicy\":\"LocalRib\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"LocalRib\",\"All\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"ipv4Unicast\",\"vpnIpv6\"]},\"lastOperation\":{\"details\":\"jjpxpw\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"goeillszdg\"},\"location\":\"ozkm\",\"tags\":{\"dvbux\":\"uilyn\",\"vwmybokqpfhs\":\"jiqyrwdmgrfhvew\"},\"id\":\"bpjzoyzy\",\"name\":\"ly\",\"type\":\"zthpnwzpkisefygd\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkMonitor response + = manager.networkMonitors() + .define("ulvkisyhnfqne") + .withRegion("r") + .withExistingResourceGroup("kwridroidh") + .withTags(mapOf("xdi", "ecktcwgnkxjd", "wotpiaklefw", "ndz")) + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("deahfg") + .withStationName("ahnsmktkhlq") + .withStationIp("jd") + .withStationPort(488618854) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(1813104290) + .withProbeInterval(470891326) + .withProbeCount(2030199154)) + .withStationNetwork("r") + .withMonitoredNetworks(Arrays.asList("ntcbl", "bzoqtfb")) + .withExportPolicy(BmpExportPolicy.LOCAL_RIB) + .withExportPolicyConfiguration( + new BmpExportPolicyProperties().withExportPolicies(Arrays.asList(BmpExportPolicy.POST_POLICY, + BmpExportPolicy.POST_POLICY, BmpExportPolicy.PRE_POLICY, BmpExportPolicy.LOCAL_RIB))) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.IPV6UNICAST, + BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.VPN_IPV4))) + .withAnnotation("wmmqzb") + .create(); + + Assertions.assertEquals("ozkm", response.location()); + Assertions.assertEquals("uilyn", response.tags().get("dvbux")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + response.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("zbp", response.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("kg", response.bmpConfiguration().stationName()); + Assertions.assertEquals("spxhhnv", response.bmpConfiguration().stationIp()); + Assertions.assertEquals(1247096611, response.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, response.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(837373700, + response.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1404952445, response.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(2030531187, response.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("efstize", response.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("gzc", response.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, response.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, + response.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + response.bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("goeillszdg", response.annotation()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..0edaace19c13 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"jh\",\"stationName\":\"nyoktcgmcthjgb\",\"stationIp\":\"mxqskemtajjfmkw\",\"stationPort\":81177491,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1566020904,\"probeInterval\":380519040,\"probeCount\":1486559764},\"stationNetwork\":\"cmjiibtvwa\",\"monitoredNetworks\":[\"woptiqf\",\"iavtapc\",\"smapddmmwylr\"],\"exportPolicy\":\"LocalRib\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\",\"LocalRib\",\"All\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"vpnIpv4\",\"All\",\"ipv4Unicast\"]},\"lastOperation\":{\"details\":\"mtnrcvovhyqexuj\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"qbsythycdckcpfom\"},\"location\":\"fwxthrcmgsimgos\",\"tags\":{\"asenye\":\"jgckkb\",\"sahgcchz\":\"mwzgfankeolor\"},\"id\":\"apkhfhuuizyey\",\"name\":\"kinidyjf\",\"type\":\"puuykyvbpneyml\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkMonitor response = manager.networkMonitors() + .getByResourceGroupWithResponse("bsaaxstnziv", "ccgtujiwzbzed", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("fwxthrcmgsimgos", response.location()); + Assertions.assertEquals("jgckkb", response.tags().get("asenye")); + Assertions.assertEquals(StationConfigurationState.ENABLED, + response.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("jh", response.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("nyoktcgmcthjgb", response.bmpConfiguration().stationName()); + Assertions.assertEquals("mxqskemtajjfmkw", response.bmpConfiguration().stationIp()); + Assertions.assertEquals(81177491, response.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, response.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1566020904, + response.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(380519040, response.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1486559764, response.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("cmjiibtvwa", response.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("woptiqf", response.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.LOCAL_RIB, response.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.ALL, + response.bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + response.bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("qbsythycdckcpfom", response.annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..f6711899d1a3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"axuvazzptlda\",\"stationName\":\"glxhb\",\"stationIp\":\"y\",\"stationPort\":361870828,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":256996951,\"probeInterval\":1733397082,\"probeCount\":136668240},\"stationNetwork\":\"tvnedcclpb\",\"monitoredNetworks\":[\"oiviue\"],\"exportPolicy\":\"All\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"Post-Policy\",\"LocalRib\"]},\"monitoredAddressFamilies\":[\"ipv4Unicast\",\"vpnIpv6\"]},\"lastOperation\":{\"details\":\"dtnllkyiqjtxvxgr\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"annotation\":\"vhivvoczsry\"},\"location\":\"vii\",\"tags\":{\"bbxkeygmq\":\"qp\",\"cwfcbug\":\"uyusnhnnekhfdlbc\",\"ftp\":\"cccydldavozmibtk\"},\"id\":\"l\",\"name\":\"srran\",\"type\":\"xxwt\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.networkMonitors().listByResourceGroup("tnnsjc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("vii", response.iterator().next().location()); + Assertions.assertEquals("fakeTokenPlaceholder", response.iterator().next().tags().get("bbxkeygmq")); + Assertions.assertEquals(StationConfigurationState.DISABLED, + response.iterator().next().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("axuvazzptlda", response.iterator().next().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("glxhb", response.iterator().next().bmpConfiguration().stationName()); + Assertions.assertEquals("y", response.iterator().next().bmpConfiguration().stationIp()); + Assertions.assertEquals(361870828, response.iterator().next().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + response.iterator().next().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(256996951, + response.iterator().next().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1733397082, + response.iterator().next().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(136668240, + response.iterator().next().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("tvnedcclpb", response.iterator().next().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("oiviue", response.iterator().next().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, response.iterator().next().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + response.iterator().next().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV4UNICAST, + response.iterator().next().bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("vhivvoczsry", response.iterator().next().annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java new file mode 100644 index 000000000000..50703b5ee380 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"lkgzczjwizrulrk\",\"stationName\":\"ldttggc\",\"stationIp\":\"mkpobenaahdjnmy\",\"stationPort\":1522172955,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":76390565,\"probeInterval\":1049683223,\"probeCount\":795609687},\"stationNetwork\":\"bv\",\"monitoredNetworks\":[\"hpphjimoecqpqk\",\"nvsu\",\"izxdlrjspx\"],\"exportPolicy\":\"Post-Policy\",\"exportPolicyConfiguration\":{\"exportPolicies\":[\"All\",\"Post-Policy\"]},\"monitoredAddressFamilies\":[\"All\",\"ipv4Unicast\",\"All\"]},\"lastOperation\":{\"details\":\"dsftmllc\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"annotation\":\"g\"},\"location\":\"cforuwqbendz\",\"tags\":{\"qqsvofocppph\":\"scbsttjdioevif\",\"xsofsirit\":\"vduuzpiooac\",\"nouxevizzcjnf\":\"qqpynr\",\"numpna\":\"ubctwnfnq\"},\"id\":\"fpkleieafpvbslly\",\"name\":\"riad\",\"type\":\"nbofeucctppbgzf\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.networkMonitors().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("cforuwqbendz", response.iterator().next().location()); + Assertions.assertEquals("scbsttjdioevif", response.iterator().next().tags().get("qqsvofocppph")); + Assertions.assertEquals(StationConfigurationState.ENABLED, + response.iterator().next().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("lkgzczjwizrulrk", response.iterator().next().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("ldttggc", response.iterator().next().bmpConfiguration().stationName()); + Assertions.assertEquals("mkpobenaahdjnmy", response.iterator().next().bmpConfiguration().stationIp()); + Assertions.assertEquals(1522172955, response.iterator().next().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + response.iterator().next().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(76390565, + response.iterator().next().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1049683223, + response.iterator().next().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(795609687, + response.iterator().next().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("bv", response.iterator().next().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("hpphjimoecqpqk", + response.iterator().next().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, + response.iterator().next().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpExportPolicy.ALL, + response.iterator().next().bmpConfiguration().exportPolicyConfiguration().exportPolicies().get(0)); + Assertions.assertEquals(BmpMonitoredAddressFamily.ALL, + response.iterator().next().bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("g", response.iterator().next().annotation()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java index a80fa3f8e5ea..dada8091355e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java @@ -1,11 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,22 +17,27 @@ public final class NetworkPacketBrokerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkPacketBrokerInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"khglaqjsg\",\"networkDeviceIds\":[\"tujrzxrkn\",\"fdrld\",\"yehi\",\"ittugyu\"],\"sourceInterfaceIds\":[\"lda\",\"urf\",\"azcsozjvx\"],\"networkTapIds\":[\"iggbnv\",\"xofwalzy\",\"whoea\"],\"neighborGroupIds\":[\"obdoey\"],\"provisioningState\":\"Canceled\"},\"location\":\"imtwuuhau\",\"tags\":{\"zjy\":\"kwmnfeub\",\"nqd\":\"kwfugiphrrkuu\",\"opueo\":\"rhzz\"},\"id\":\"usvwluj\",\"name\":\"pwnibittozt\",\"type\":\"dqumqvfm\"}") + "{\"properties\":{\"networkFabricId\":\"oqwb\",\"networkDeviceIds\":[\"lqbzbwb\",\"wzhbhflj\",\"yodpiovnlhrwy\",\"kzu\"],\"sourceInterfaceIds\":[\"pwxsvdeatjiobni\"],\"networkTapIds\":[\"extqd\",\"wtgntimznupb\",\"tbsetko\",\"sqvhe\"],\"neighborGroupIds\":[\"kghcrzmmmj\",\"vdhdgdiwmlgs\"],\"lastOperation\":{\"details\":\"etqjisjm\"},\"provisioningState\":\"Deleting\",\"configurationState\":\"Rejected\"},\"identity\":{\"principalId\":\"kakhgkrv\",\"tenantId\":\"ycvytv\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zvoortc\":{\"principalId\":\"wfusqp\",\"clientId\":\"xkczbdypbbimhjb\"},\"lkv\":{\"principalId\":\"h\",\"clientId\":\"cyuzlybqscibv\"},\"viulbyl\":{\"principalId\":\"cafn\",\"clientId\":\"hawvc\"}}},\"location\":\"jzrycwpb\",\"tags\":{\"pucknsastlp\":\"whm\",\"j\":\"mgomicttrvlv\",\"xamqecjrzvlcivqx\":\"xok\"},\"id\":\"emklphx\",\"name\":\"wwlojkbgnf\",\"type\":\"rzjv\"}") .toObject(NetworkPacketBrokerInner.class); - Assertions.assertEquals("imtwuuhau", model.location()); - Assertions.assertEquals("kwmnfeub", model.tags().get("zjy")); - Assertions.assertEquals("khglaqjsg", model.networkFabricId()); + Assertions.assertEquals("jzrycwpb", model.location()); + Assertions.assertEquals("whm", model.tags().get("pucknsastlp")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("oqwb", model.networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerInner model = new NetworkPacketBrokerInner().withLocation("imtwuuhau") - .withTags(mapOf("zjy", "kwmnfeub", "nqd", "kwfugiphrrkuu", "opueo", "rhzz")) - .withNetworkFabricId("khglaqjsg"); + NetworkPacketBrokerInner model = new NetworkPacketBrokerInner().withLocation("jzrycwpb") + .withTags(mapOf("pucknsastlp", "whm", "j", "mgomicttrvlv", "xamqecjrzvlcivqx", "xok")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("zvoortc", new UserAssignedIdentity(), "lkv", + new UserAssignedIdentity(), "viulbyl", new UserAssignedIdentity()))) + .withNetworkFabricId("oqwb"); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerInner.class); - Assertions.assertEquals("imtwuuhau", model.location()); - Assertions.assertEquals("kwmnfeub", model.tags().get("zjy")); - Assertions.assertEquals("khglaqjsg", model.networkFabricId()); + Assertions.assertEquals("jzrycwpb", model.location()); + Assertions.assertEquals("whm", model.tags().get("pucknsastlp")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("oqwb", model.networkFabricId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java index a82e7898f13d..182f0ab00438 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java @@ -1,11 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -13,16 +16,21 @@ public final class NetworkPacketBrokerPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkPacketBrokerPatch model = BinaryData.fromString("{\"tags\":{\"vxfaqufqizj\":\"cweakfec\"}}") + NetworkPacketBrokerPatch model = BinaryData.fromString( + "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xnyprijyoxxj\":{\"principalId\":\"fbgynzfwv\",\"clientId\":\"teqjmyqxuhgk\"}}},\"tags\":{\"pjmspau\":\"owrrlcckly\"}}") .toObject(NetworkPacketBrokerPatch.class); - Assertions.assertEquals("cweakfec", model.tags().get("vxfaqufqizj")); + Assertions.assertEquals("owrrlcckly", model.tags().get("pjmspau")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerPatch model = new NetworkPacketBrokerPatch().withTags(mapOf("vxfaqufqizj", "cweakfec")); + NetworkPacketBrokerPatch model = new NetworkPacketBrokerPatch().withTags(mapOf("pjmspau", "owrrlcckly")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("xnyprijyoxxj", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerPatch.class); - Assertions.assertEquals("cweakfec", model.tags().get("vxfaqufqizj")); + Assertions.assertEquals("owrrlcckly", model.tags().get("pjmspau")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java index 31d5abbdc2a1..28828f0a4ac3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,15 +12,15 @@ public final class NetworkPacketBrokerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkPacketBrokerProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"caddtgc\",\"networkDeviceIds\":[\"gtvgwyu\",\"be\",\"fnzzryizwbxg\"],\"sourceInterfaceIds\":[\"xlayunomir\",\"p\",\"abenqlamwmg\",\"way\"],\"networkTapIds\":[\"nbcpjstbhemhcucs\",\"snxfbxu\",\"eapdrbzyv\"],\"neighborGroupIds\":[\"adulpodkaxp\",\"obkzhmhjdqltdel\",\"qrojadhfztlray\",\"rkgzkyhudbkuw\"],\"provisioningState\":\"Succeeded\"}") + "{\"networkFabricId\":\"sunhaevlah\",\"networkDeviceIds\":[\"ywywuahwcorewcn\",\"aaxqjfda\"],\"sourceInterfaceIds\":[\"gim\"],\"networkTapIds\":[\"gewdqbxexfyzn\"],\"neighborGroupIds\":[\"suqkslwsfx\",\"yzqbye\"],\"lastOperation\":{\"details\":\"mohnrtl\"},\"provisioningState\":\"Updating\",\"configurationState\":\"ErrorProvisioning\"}") .toObject(NetworkPacketBrokerProperties.class); - Assertions.assertEquals("caddtgc", model.networkFabricId()); + Assertions.assertEquals("sunhaevlah", model.networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerProperties model = new NetworkPacketBrokerProperties().withNetworkFabricId("caddtgc"); + NetworkPacketBrokerProperties model = new NetworkPacketBrokerProperties().withNetworkFabricId("sunhaevlah"); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerProperties.class); - Assertions.assertEquals("caddtgc", model.networkFabricId()); + Assertions.assertEquals("sunhaevlah", model.networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java index 42301f6b4209..98dfd5f0de10 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -23,26 +26,30 @@ public final class NetworkPacketBrokersCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"skuqgneorqtr\",\"networkDeviceIds\":[\"ikqvaagnzb\",\"qqbjcdaucs\",\"mzvgj\",\"nuwcquepanqdmm\"],\"sourceInterfaceIds\":[\"p\",\"tblmxblcbwvsqp\",\"avlcbb\"],\"networkTapIds\":[\"pcgirsfil\",\"usyzcnxjvipeh\",\"lbburbx\",\"vgjipbnnghsjxwjn\"],\"neighborGroupIds\":[\"xenhpyixibrsaeu\"],\"provisioningState\":\"Succeeded\"},\"location\":\"blyygfticu\",\"tags\":{\"aotrbnvoepht\":\"swqmteuyqtzo\",\"l\":\"oqoafdvxrlrsrfrx\"},\"id\":\"djpspipkpcvhqa\",\"name\":\"jcasncgq\",\"type\":\"ixuqvat\"}"; + = "{\"properties\":{\"networkFabricId\":\"sjxf\",\"networkDeviceIds\":[\"oartvkhufktqgtjf\",\"ctreotzgkokfztrv\"],\"sourceInterfaceIds\":[\"tnnwamk\"],\"networkTapIds\":[\"skmhdwsbz\"],\"neighborGroupIds\":[\"gerwotlp\"],\"lastOperation\":{\"details\":\"oslqmftkqzafjy\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"Accepted\"},\"identity\":{\"principalId\":\"aboee\",\"tenantId\":\"lecqyzdyz\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ksoqzzyrovvnac\":{\"principalId\":\"kbtnhiaqegjvhyv\",\"clientId\":\"bhclb\"},\"gvydtjebb\":{\"principalId\":\"jmhclhcqcjngwmb\",\"clientId\":\"gsidasovlrj\"}}},\"location\":\"scirztsapxxbkx\",\"tags\":{\"mlgsghcnyb\":\"fhecpstfekbsly\",\"zogs\":\"vzltbgwjaepjmkr\"},\"id\":\"zoqjbnfaxcdcmqej\",\"name\":\"sirotj\",\"type\":\"ltugobscpt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkPacketBroker response = manager.networkPacketBrokers() - .define("yhoemsdnmmpv") - .withRegion("ultybww") - .withExistingResourceGroup("iglehylbnayyps") - .withNetworkFabricId("pvfgukrx") - .withTags(mapOf("n", "smkjalorxeegiczr")) + .define("myr") + .withRegion("qekqtiuveaz") + .withExistingResourceGroup("qegerxmlfnug") + .withNetworkFabricId("rt") + .withTags(mapOf("lspih", "wbiwygwpwquxiqg", "fizef", "xgvviotvoolk", "fwaehs", "brndaquxvuf")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("nrys", new UserAssignedIdentity(), "ddvnobesowbtnfq", + new UserAssignedIdentity(), "ajiotlcxofqjninr", new UserAssignedIdentity()))) .create(); - Assertions.assertEquals("blyygfticu", response.location()); - Assertions.assertEquals("swqmteuyqtzo", response.tags().get("aotrbnvoepht")); - Assertions.assertEquals("skuqgneorqtr", response.networkFabricId()); + Assertions.assertEquals("scirztsapxxbkx", response.location()); + Assertions.assertEquals("fhecpstfekbsly", response.tags().get("mlgsghcnyb")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("sjxf", response.networkFabricId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java index dc47dcec8728..99d2a6e0ed15 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,21 +22,22 @@ public final class NetworkPacketBrokersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"pgaxpydemccqdss\",\"networkDeviceIds\":[\"ersd\",\"dhnhs\"],\"sourceInterfaceIds\":[\"gzmxtxfuhxyksf\"],\"networkTapIds\":[\"vcknglffnozzf\"],\"neighborGroupIds\":[\"frpjfxsyxcdosyhh\",\"pu\",\"rspreyilqcskxkt\",\"o\"],\"provisioningState\":\"Updating\"},\"location\":\"qt\",\"tags\":{\"nacklyrbvmbd\":\"grddi\",\"psbcxqiy\":\"expnphtqwfp\",\"nrzowcgrzaf\":\"pifcjlfu\",\"agugwxdwtfmfj\":\"sozawqxnhl\"},\"id\":\"rzplhaljomg\",\"name\":\"orprrapt\",\"type\":\"bjenylgebrsnvof\"}"; + = "{\"properties\":{\"networkFabricId\":\"nkkxoicb\",\"networkDeviceIds\":[\"fv\",\"tbocqhvtp\",\"vppvgrigjegr\"],\"sourceInterfaceIds\":[\"oqbzrclar\",\"tfmfkuvybemo\"],\"networkTapIds\":[\"shqvkuqkzvzqh\",\"z\"],\"neighborGroupIds\":[\"nvtdbeani\",\"ozjrc\",\"aq\"],\"lastOperation\":{\"details\":\"almzpfylqevwwvz\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"Provisioning\"},\"identity\":{\"principalId\":\"ropzgjleec\",\"tenantId\":\"bhqkvbins\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bpatwbb\":{\"principalId\":\"egoupdqeflvd\",\"clientId\":\"qcqlexobeekzy\"},\"y\":{\"principalId\":\"dfl\",\"clientId\":\"wohlcahhf\"},\"uzeeb\":{\"principalId\":\"dhitavgayuspz\",\"clientId\":\"vibp\"},\"lhsxeasxs\":{\"principalId\":\"fepwkhruzzwgb\",\"clientId\":\"zivfoyqv\"}}},\"location\":\"uvvscbpkmohd\",\"tags\":{\"uzvmorsyirf\":\"rqyib\"},\"id\":\"xazuboigorwpbbjz\",\"name\":\"vaqoilgkznn\",\"type\":\"pvjwegoviceqyraj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkPacketBroker response = manager.networkPacketBrokers() - .getByResourceGroupWithResponse("cu", "aicx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("hhtttyhypid", "jjjfcysk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qt", response.location()); - Assertions.assertEquals("grddi", response.tags().get("nacklyrbvmbd")); - Assertions.assertEquals("pgaxpydemccqdss", response.networkFabricId()); + Assertions.assertEquals("uvvscbpkmohd", response.location()); + Assertions.assertEquals("rqyib", response.tags().get("uzvmorsyirf")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("nkkxoicb", response.networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java index 4f35e654c0f1..d5a127359f20 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,20 +23,22 @@ public final class NetworkPacketBrokersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"e\",\"networkDeviceIds\":[\"adkbxui\",\"soawxugpu\",\"eqkwxzmuzgueuygp\"],\"sourceInterfaceIds\":[\"u\",\"e\"],\"networkTapIds\":[\"welygxxz\"],\"neighborGroupIds\":[\"nqwdjvlwqzxy\",\"lwsfxqcmejezjcb\",\"iua\",\"ak\"],\"provisioningState\":\"Canceled\"},\"location\":\"wmavllpfjguz\",\"tags\":{\"oxxbzagwnomp\":\"wamhm\",\"ufysalbjfkjex\":\"yiscnz\",\"c\":\"fzmhkridip\",\"pifjqhj\":\"jnn\"},\"id\":\"nbdup\",\"name\":\"pllosadjffllr\",\"type\":\"fghyyeokadzuddc\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"rcazcc\",\"networkDeviceIds\":[\"wc\",\"azztvotf\"],\"sourceInterfaceIds\":[\"yfxkfgxxefzliguw\",\"oszcmfmynljigj\"],\"networkTapIds\":[\"a\",\"m\",\"tivsknewpnp\"],\"neighborGroupIds\":[\"vjbnhbxvvuf\",\"ukjuo\",\"ajqnsrcqd\",\"hmlqamdlcukdm\"],\"lastOperation\":{\"details\":\"ya\"},\"provisioningState\":\"Updating\",\"configurationState\":\"PendingCommit\"},\"identity\":{\"principalId\":\"r\",\"tenantId\":\"r\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"whbmujlsztp\":{\"principalId\":\"bxexacgmtpkxbwo\",\"clientId\":\"vexsnm\"},\"mkc\":{\"principalId\":\"q\",\"clientId\":\"dlxsn\"},\"nb\":{\"principalId\":\"ksfejzmyv\",\"clientId\":\"zmngxzp\"},\"imyizdglzzaufin\":{\"principalId\":\"vhddvtnbtv\",\"clientId\":\"kjfkaoe\"}}},\"location\":\"yxy\",\"tags\":{\"nhwbbhwrncxw\":\"ngntjgpyvjgsjy\",\"piniopbfkmfbru\":\"uerrvpam\"},\"id\":\"hylqgeovnlb\",\"name\":\"fsol\",\"type\":\"rqu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkPacketBrokers().listByResourceGroup("yzvbploazccgh", com.azure.core.util.Context.NONE); + = manager.networkPacketBrokers().listByResourceGroup("vvsaatyyp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wmavllpfjguz", response.iterator().next().location()); - Assertions.assertEquals("wamhm", response.iterator().next().tags().get("oxxbzagwnomp")); - Assertions.assertEquals("e", response.iterator().next().networkFabricId()); + Assertions.assertEquals("yxy", response.iterator().next().location()); + Assertions.assertEquals("ngntjgpyvjgsjy", response.iterator().next().tags().get("nhwbbhwrncxw")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("rcazcc", response.iterator().next().networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java index d1a33e707932..c75b595deb50 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,20 +23,22 @@ public final class NetworkPacketBrokersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"c\",\"networkDeviceIds\":[\"flcxxp\"],\"sourceInterfaceIds\":[\"pktgslkokqa\",\"gzcojgdq\"],\"networkTapIds\":[\"fe\",\"jgpjnydkkgbvsqks\",\"gkvga\",\"nrhrqqiwfysujcv\"],\"neighborGroupIds\":[\"gpexrxy\",\"pw\",\"sm\"],\"provisioningState\":\"Failed\"},\"location\":\"p\",\"tags\":{\"uncnf\":\"pcifdvt\",\"kymjdwirglqibj\":\"yjwjmyubhtmlgjai\"},\"id\":\"vmkaw\",\"name\":\"uxbzfhurrw\",\"type\":\"cwwitzmx\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"lnhxr\",\"networkDeviceIds\":[\"hicvrmwbgpcalqb\",\"ppvpgsrfshk\",\"gspboaevtxibroo\"],\"sourceInterfaceIds\":[\"jiqwxwpub\",\"hqnprbvruhdjziv\",\"axiimqnqmbfptz\"],\"networkTapIds\":[\"ksxxbdtjvv\",\"gnvkkzulmqxf\",\"cinwij\",\"eyxt\"],\"neighborGroupIds\":[\"xttobosjxbnyt\",\"e\"],\"lastOperation\":{\"details\":\"ditumyycvtya\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"ErrorDeprovisioning\"},\"identity\":{\"principalId\":\"pjqhivxblq\",\"tenantId\":\"hj\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"drdxoutkgezuln\":{\"principalId\":\"eoutqo\",\"clientId\":\"btqibqbougcwzgd\"},\"poeoywykhhavwhr\":{\"principalId\":\"pbarejxjhl\",\"clientId\":\"lj\"},\"eearbbxaneviqk\":{\"principalId\":\"vzrccy\",\"clientId\":\"xlsypwu\"},\"jhdlx\":{\"principalId\":\"pvidzhjcppqcgbp\",\"clientId\":\"ni\"}}},\"location\":\"tbtlhar\",\"tags\":{\"ngdulvdenhg\":\"kpasuug\",\"snljduwkbozlmrh\":\"vaimkoyrp\",\"tevvowiyp\":\"ghvlvdjxbjqiab\",\"cfta\":\"ljzkxkdfyv\"},\"id\":\"ydcrjlh\",\"name\":\"neykxewemtazmrej\",\"type\":\"px\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkPacketBrokers().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("pcifdvt", response.iterator().next().tags().get("uncnf")); - Assertions.assertEquals("c", response.iterator().next().networkFabricId()); + Assertions.assertEquals("tbtlhar", response.iterator().next().location()); + Assertions.assertEquals("kpasuug", response.iterator().next().tags().get("ngdulvdenhg")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("lnhxr", response.iterator().next().networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java index 8cecc5d73eb3..f1f27b5ebdbc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java @@ -1,58 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokersListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokersListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class NetworkPacketBrokersListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkPacketBrokersListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"wo\",\"networkDeviceIds\":[\"eyyjmjj\",\"izxpxhnzlsle\",\"cttgzkjt\",\"qpdwad\"],\"sourceInterfaceIds\":[\"ztldsvczdjiah\"],\"networkTapIds\":[\"mjzucwwme\",\"jqhddwvmqxiyoo\"],\"neighborGroupIds\":[\"ozkbnzxbypfq\",\"gaixwrgrkkd\"],\"provisioningState\":\"Deleting\"},\"location\":\"swqi\",\"tags\":{\"g\":\"pw\",\"d\":\"gicwnxhtfmcqbs\"},\"id\":\"pgchzpgfqum\",\"name\":\"djxh\",\"type\":\"ghgodkynrceq\"},{\"properties\":{\"networkFabricId\":\"v\",\"networkDeviceIds\":[\"dfmmxjdnajuopjy\",\"qmkw\"],\"sourceInterfaceIds\":[\"cwlo\",\"dejkluxxrwzobuz\"],\"networkTapIds\":[\"g\"],\"neighborGroupIds\":[\"dtkwppth\",\"zdprmimrljdpoqfx\",\"emhkftbaewht\"],\"provisioningState\":\"Updating\"},\"location\":\"amfmxtllfl\",\"tags\":{\"amklilirwdv\":\"qcnrrfijhggabqb\"},\"id\":\"fhsdpzouhkt\",\"name\":\"rxqwqnjxrd\",\"type\":\"ddtullygta\"},{\"properties\":{\"networkFabricId\":\"czcxdfw\",\"networkDeviceIds\":[\"yf\",\"lxrljphraspifl\"],\"sourceInterfaceIds\":[\"ixlmdbgic\"],\"networkTapIds\":[\"gs\",\"drjuqbp\",\"tokljmtznpaxw\"],\"neighborGroupIds\":[\"yyqiprcltungbsol\",\"ckmiig\",\"b\",\"uck\"],\"provisioningState\":\"Failed\"},\"location\":\"ksw\",\"tags\":{\"sswoykdnona\":\"qqcqikclsmal\",\"lei\":\"xwmgzrujlqcwnyn\"},\"id\":\"bcbgv\",\"name\":\"btsertoxa\",\"type\":\"hxuvjhxm\"}],\"nextLink\":\"qstjc\"}") + "{\"value\":[{\"properties\":{\"networkFabricId\":\"qom\",\"networkDeviceIds\":[\"lknuyapvibzicyvi\",\"hcaptkhjx\",\"rkbn\",\"fcck\"],\"sourceInterfaceIds\":[\"znfgvlx\"],\"networkTapIds\":[\"nctigpksywi\",\"k\"],\"neighborGroupIds\":[\"gk\"],\"lastOperation\":{\"details\":\"tqjytdc\"},\"provisioningState\":\"Updating\",\"configurationState\":\"Deprovisioned\"},\"identity\":{\"principalId\":\"wbvjsbgmlamoa\",\"tenantId\":\"ayt\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"bvepvlryszfhd\":{\"principalId\":\"pbltc\",\"clientId\":\"exheeocnqo\"},\"slcof\":{\"principalId\":\"fhxohz\",\"clientId\":\"hhavzfuxnvk\"}}},\"location\":\"tfuehouisak\",\"tags\":{\"sspmjvailfauyv\":\"fddxqfussub\",\"wlkqdgwbztrthl\":\"p\",\"dhg\":\"wvoglff\"},\"id\":\"lor\",\"name\":\"hbtofc\",\"type\":\"xk\"},{\"properties\":{\"networkFabricId\":\"lhcnsdylmnqunk\",\"networkDeviceIds\":[\"ptmsgk\",\"edw\",\"xtzhgbgbhud\",\"rpjimvrrqfi\"],\"sourceInterfaceIds\":[\"wmam\",\"lfi\",\"judd\"],\"networkTapIds\":[\"hupngyhylqyafew\"],\"neighborGroupIds\":[\"dxwuuy\"],\"lastOperation\":{\"details\":\"xrqxrtzea\"},\"provisioningState\":\"Accepted\",\"configurationState\":\"ErrorProvisioning\"},\"identity\":{\"principalId\":\"bjhmvpjxs\",\"tenantId\":\"w\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"mwg\":{\"principalId\":\"bffqc\",\"clientId\":\"ynepkt\"},\"okbskkyporsy\":{\"principalId\":\"onysebjijfhpxni\",\"clientId\":\"uoxfa\"},\"tvjfqreeoxvqj\":{\"principalId\":\"eunbydlg\",\"clientId\":\"phwuubwtsayn\"}}},\"location\":\"nblihs\",\"tags\":{\"miaoaweacfx\":\"bmdivixzhpjgq\",\"dckhsq\":\"ubuhruetcnxriqz\",\"rxmyokohlsf\":\"rrjsurnowobw\",\"uvkqxqkvadmj\":\"fouqjpzhea\"},\"id\":\"ymudj\",\"name\":\"aajzdebhsermcl\",\"type\":\"qwwuhyqkaaptbs\"},{\"properties\":{\"networkFabricId\":\"vkbcbptwyb\",\"networkDeviceIds\":[\"cuhp\"],\"sourceInterfaceIds\":[\"bnsshvq\"],\"networkTapIds\":[\"zbeuybutcdzjf\",\"tvpeyxdyuxurxr\",\"tqmmijgpqfkwna\",\"ikczscymqfv\"],\"neighborGroupIds\":[\"pqnyumzapdok\"],\"lastOperation\":{\"details\":\"pe\"},\"provisioningState\":\"Failed\",\"configurationState\":\"ErrorProvisioning\"},\"identity\":{\"principalId\":\"zbflbqmhbiyxx\",\"tenantId\":\"edhagqbbse\",\"type\":\"None\",\"userAssignedIdentities\":{\"bo\":{\"principalId\":\"flmsy\",\"clientId\":\"dcrolrze\"},\"uszbdjrdfeuj\":{\"principalId\":\"h\",\"clientId\":\"ymunwjivt\"},\"zmdahyclxrs\":{\"principalId\":\"dalisdeqn\",\"clientId\":\"aydzinlooulp\"},\"rtnhrevimxmax\":{\"principalId\":\"oebld\",\"clientId\":\"iaffj\"}}},\"location\":\"ppitygvd\",\"tags\":{\"nqekwankl\":\"oqtbfkvuozbzc\",\"rwiyndurdonkgobx\":\"urlcydjhtkjs\",\"olenrswknpdr\":\"lr\",\"fqckie\":\"nmzaofro\"},\"id\":\"yr\",\"name\":\"jyoybkqftusdw\",\"type\":\"nrtv\"}],\"nextLink\":\"ucnnrovom\"}") .toObject(NetworkPacketBrokersListResult.class); - Assertions.assertEquals("swqi", model.value().get(0).location()); - Assertions.assertEquals("pw", model.value().get(0).tags().get("g")); - Assertions.assertEquals("wo", model.value().get(0).networkFabricId()); - Assertions.assertEquals("qstjc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkPacketBrokersListResult model = new NetworkPacketBrokersListResult().withValue(Arrays.asList( - new NetworkPacketBrokerInner().withLocation("swqi") - .withTags(mapOf("g", "pw", "d", "gicwnxhtfmcqbs")) - .withNetworkFabricId("wo"), - new NetworkPacketBrokerInner().withLocation("amfmxtllfl") - .withTags(mapOf("amklilirwdv", "qcnrrfijhggabqb")) - .withNetworkFabricId("v"), - new NetworkPacketBrokerInner().withLocation("ksw") - .withTags(mapOf("sswoykdnona", "qqcqikclsmal", "lei", "xwmgzrujlqcwnyn")) - .withNetworkFabricId("czcxdfw"))) - .withNextLink("qstjc"); - model = BinaryData.fromObject(model).toObject(NetworkPacketBrokersListResult.class); - Assertions.assertEquals("swqi", model.value().get(0).location()); - Assertions.assertEquals("pw", model.value().get(0).tags().get("g")); - Assertions.assertEquals("wo", model.value().get(0).networkFabricId()); - Assertions.assertEquals("qstjc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("tfuehouisak", model.value().get(0).location()); + Assertions.assertEquals("fddxqfussub", model.value().get(0).tags().get("sspmjvailfauyv")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("qom", model.value().get(0).networkFabricId()); + Assertions.assertEquals("ucnnrovom", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java index 092764a51b3f..53e861272006 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,28 +15,29 @@ public final class NetworkRackInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkRackInner model = BinaryData.fromString( - "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"wmlgicvnpv\",\"networkDevices\":[\"gjnaqyqipsl\",\"mvcdsvmwbitek\"],\"provisioningState\":\"Deleting\",\"annotation\":\"bvfiybxqi\"},\"location\":\"gybfzdqekiv\",\"tags\":{\"ulrqtbht\":\"zcvdi\"},\"id\":\"ezp\",\"name\":\"lpryf\",\"type\":\"xmdutzfkgilnou\"}") + "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"wsicvwqzoc\",\"networkDevices\":[\"hennmsgpywdib\",\"gvnrgalvwrhr\",\"ibrbknuubxc\",\"ojtu\"],\"lastOperation\":{\"details\":\"vnpyeevffifujgtd\"},\"provisioningState\":\"Updating\",\"configurationState\":\"Provisioning\",\"annotation\":\"efc\"},\"location\":\"bpchrtc\",\"tags\":{\"djlgkuirxxeuwii\":\"cujyznvyrj\",\"dviw\":\"rcvnfg\",\"xbvxgx\":\"ohktxagfujdbqjny\",\"asfeooq\":\"q\"},\"id\":\"tpvev\",\"name\":\"arp\",\"type\":\"klqlii\"}") .toObject(NetworkRackInner.class); - Assertions.assertEquals("gybfzdqekiv", model.location()); - Assertions.assertEquals("zcvdi", model.tags().get("ulrqtbht")); + Assertions.assertEquals("bpchrtc", model.location()); + Assertions.assertEquals("cujyznvyrj", model.tags().get("djlgkuirxxeuwii")); Assertions.assertEquals(NetworkRackType.COMBINED, model.networkRackType()); - Assertions.assertEquals("wmlgicvnpv", model.networkFabricId()); - Assertions.assertEquals("bvfiybxqi", model.annotation()); + Assertions.assertEquals("wsicvwqzoc", model.networkFabricId()); + Assertions.assertEquals("efc", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkRackInner model = new NetworkRackInner().withLocation("gybfzdqekiv") - .withTags(mapOf("ulrqtbht", "zcvdi")) + NetworkRackInner model = new NetworkRackInner().withLocation("bpchrtc") + .withTags( + mapOf("djlgkuirxxeuwii", "cujyznvyrj", "dviw", "rcvnfg", "xbvxgx", "ohktxagfujdbqjny", "asfeooq", "q")) .withNetworkRackType(NetworkRackType.COMBINED) - .withNetworkFabricId("wmlgicvnpv") - .withAnnotation("bvfiybxqi"); + .withNetworkFabricId("wsicvwqzoc") + .withAnnotation("efc"); model = BinaryData.fromObject(model).toObject(NetworkRackInner.class); - Assertions.assertEquals("gybfzdqekiv", model.location()); - Assertions.assertEquals("zcvdi", model.tags().get("ulrqtbht")); + Assertions.assertEquals("bpchrtc", model.location()); + Assertions.assertEquals("cujyznvyrj", model.tags().get("djlgkuirxxeuwii")); Assertions.assertEquals(NetworkRackType.COMBINED, model.networkRackType()); - Assertions.assertEquals("wmlgicvnpv", model.networkFabricId()); - Assertions.assertEquals("bvfiybxqi", model.annotation()); + Assertions.assertEquals("wsicvwqzoc", model.networkFabricId()); + Assertions.assertEquals("efc", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java new file mode 100644 index 000000000000..e8f4e3628a87 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkRackPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkRackPatch model = BinaryData.fromString( + "{\"tags\":{\"jogcphivfhrmte\":\"edogzougxbxx\",\"usrjzhdtrsyfezf\":\"fdvdoeary\",\"jdzyyrwnmwtq\":\"my\",\"fphfxaqjyihjcww\":\"ljknnkynkstdtfwh\"}}") + .toObject(NetworkRackPatch.class); + Assertions.assertEquals("edogzougxbxx", model.tags().get("jogcphivfhrmte")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkRackPatch model = new NetworkRackPatch().withTags(mapOf("jogcphivfhrmte", "edogzougxbxx", + "usrjzhdtrsyfezf", "fdvdoeary", "jdzyyrwnmwtq", "my", "fphfxaqjyihjcww", "ljknnkynkstdtfwh")); + model = BinaryData.fromObject(model).toObject(NetworkRackPatch.class); + Assertions.assertEquals("edogzougxbxx", model.tags().get("jogcphivfhrmte")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java index a316ca31f7e9..a358bd6441cd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,21 +13,21 @@ public final class NetworkRackPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkRackProperties model = BinaryData.fromString( - "{\"networkRackType\":\"Compute\",\"networkFabricId\":\"gndj\",\"networkDevices\":[\"r\",\"ggqqyeqfcb\"],\"provisioningState\":\"Updating\",\"annotation\":\"yuf\"}") + "{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"n\",\"networkDevices\":[\"jno\"],\"lastOperation\":{\"details\":\"jydgseb\"},\"provisioningState\":\"Accepted\",\"configurationState\":\"PendingAdministrativeUpdate\",\"annotation\":\"vaebzmwywhrjke\"}") .toObject(NetworkRackProperties.class); - Assertions.assertEquals("yuf", model.annotation()); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.networkRackType()); - Assertions.assertEquals("gndj", model.networkFabricId()); + Assertions.assertEquals("vaebzmwywhrjke", model.annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.networkRackType()); + Assertions.assertEquals("n", model.networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkRackProperties model = new NetworkRackProperties().withAnnotation("yuf") - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("gndj"); + NetworkRackProperties model = new NetworkRackProperties().withAnnotation("vaebzmwywhrjke") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId("n"); model = BinaryData.fromObject(model).toObject(NetworkRackProperties.class); - Assertions.assertEquals("yuf", model.annotation()); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.networkRackType()); - Assertions.assertEquals("gndj", model.networkFabricId()); + Assertions.assertEquals("vaebzmwywhrjke", model.annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.networkRackType()); + Assertions.assertEquals("n", model.networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java index 88e19c65b406..9f4194d809eb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; @@ -24,30 +24,30 @@ public final class NetworkRacksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"riettnmi\",\"networkDevices\":[\"b\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"mbyqyekuw\"},\"location\":\"xz\",\"tags\":{\"ydogr\":\"u\",\"qjdxiiqwqbvanvg\":\"fwzecgbxrcse\",\"xnksmae\":\"xnaaiitnkruyw\",\"ovbgrqwfuxntuegy\":\"drxjsmrseaux\"},\"id\":\"leketk\",\"name\":\"iptqhatfg\",\"type\":\"hhbxgfhgkdm\"}"; + = "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"t\",\"networkDevices\":[\"edlmfw\",\"b\"],\"lastOperation\":{\"details\":\"we\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"Provisioning\",\"annotation\":\"sxidazslwhuyik\"},\"location\":\"cilinbuokp\",\"tags\":{\"hqrdvqvalo\":\"rheiplzms\"},\"id\":\"u\",\"name\":\"woigofumbpmzed\",\"type\":\"fjgklmyomav\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkRack response = manager.networkRacks() - .define("uhhnrmmfzfkhfnz") - .withRegion("fupnypluiv") - .withExistingResourceGroup("yhx") - .withNetworkFabricId("ajhtvbskgciedlq") - .withTags(mapOf("pespebiegzxru", "elauz")) + .define("gbmzdnyrmolmae") + .withRegion("s") + .withExistingResourceGroup("lmdosiyzfdcczk") + .withNetworkFabricId("umckcbsakoucss") + .withTags(mapOf("emlozjyovrllv", "vpagwohkromzs", "ez", "bgkgjp", "nan", "hflgpsal")) .withNetworkRackType(NetworkRackType.AGGREGATE) - .withAnnotation("buugchjtpszc") + .withAnnotation("pvwx") .create(); - Assertions.assertEquals("xz", response.location()); - Assertions.assertEquals("u", response.tags().get("ydogr")); + Assertions.assertEquals("cilinbuokp", response.location()); + Assertions.assertEquals("rheiplzms", response.tags().get("hqrdvqvalo")); Assertions.assertEquals(NetworkRackType.COMBINED, response.networkRackType()); - Assertions.assertEquals("riettnmi", response.networkFabricId()); - Assertions.assertEquals("mbyqyekuw", response.annotation()); + Assertions.assertEquals("t", response.networkFabricId()); + Assertions.assertEquals("sxidazslwhuyik", response.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java index 39ece42bef0d..5e3dcd235996 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; @@ -22,23 +22,23 @@ public final class NetworkRacksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"jgptxvzhyun\",\"networkDevices\":[\"fjjsel\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"f\"},\"location\":\"pn\",\"tags\":{\"tytrivfle\":\"wfmf\"},\"id\":\"vefnzv\",\"name\":\"miwbaksz\",\"type\":\"cmscezasjyil\"}"; + = "{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"jpfsmdgrhd\",\"networkDevices\":[\"ehhqxyj\",\"bkwvrrptbls\"],\"lastOperation\":{\"details\":\"kzgryfxwwqbey\"},\"provisioningState\":\"Accepted\",\"configurationState\":\"Succeeded\",\"annotation\":\"jieskuim\"},\"location\":\"iyicxnxcimalvz\",\"tags\":{\"ifbi\":\"npaesraire\",\"ev\":\"ljhgqqjmfrm\",\"lg\":\"cbrmmweeuyohjhpx\"},\"id\":\"urmlirnadqeqf\",\"name\":\"zcxvpo\",\"type\":\"rtk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkRack response = manager.networkRacks() - .getByResourceGroupWithResponse("tkvoivcktjscjkex", "bx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("kgqyuvhlpmjpzgjn", "ifoznfdboumpks", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pn", response.location()); - Assertions.assertEquals("wfmf", response.tags().get("tytrivfle")); + Assertions.assertEquals("iyicxnxcimalvz", response.location()); + Assertions.assertEquals("npaesraire", response.tags().get("ifbi")); Assertions.assertEquals(NetworkRackType.AGGREGATE, response.networkRackType()); - Assertions.assertEquals("jgptxvzhyun", response.networkFabricId()); - Assertions.assertEquals("f", response.annotation()); + Assertions.assertEquals("jpfsmdgrhd", response.networkFabricId()); + Assertions.assertEquals("jieskuim", response.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java index 911f8802a3ec..e05ef55b9c25 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; @@ -23,22 +23,22 @@ public final class NetworkRacksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"ddxe\",\"networkDevices\":[\"mxbyzfjgrep\"],\"provisioningState\":\"Canceled\",\"annotation\":\"crtv\"},\"location\":\"wpvqrexlu\",\"tags\":{\"jdrf\":\"lqwbrfiovpdl\"},\"id\":\"werlbc\",\"name\":\"trvirdfs\",\"type\":\"swpvnloopzyz\"}]}"; + = "{\"value\":[{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"wsyqxfowfnsyyeyt\",\"networkDevices\":[\"ojhmgvmee\",\"jazqlmigkxtgs\",\"a\",\"nholkoyxm\"],\"lastOperation\":{\"details\":\"dsqwvzunrqvu\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"ErrorProvisioning\",\"annotation\":\"qzdfjwo\"},\"location\":\"zifrmoftilhoyemh\",\"tags\":{\"rcdtkv\":\"pgdd\",\"ubmhsxtry\":\"rifcqmfv\"},\"id\":\"rvwmmuovturdhnn\",\"name\":\"hrizwmptsygqztn\",\"type\":\"vuei\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkRacks().listByResourceGroup("vtrox", com.azure.core.util.Context.NONE); + = manager.networkRacks().listByResourceGroup("itkwokefdeep", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wpvqrexlu", response.iterator().next().location()); - Assertions.assertEquals("lqwbrfiovpdl", response.iterator().next().tags().get("jdrf")); - Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().networkRackType()); - Assertions.assertEquals("ddxe", response.iterator().next().networkFabricId()); - Assertions.assertEquals("crtv", response.iterator().next().annotation()); + Assertions.assertEquals("zifrmoftilhoyemh", response.iterator().next().location()); + Assertions.assertEquals("pgdd", response.iterator().next().tags().get("rcdtkv")); + Assertions.assertEquals(NetworkRackType.AGGREGATE, response.iterator().next().networkRackType()); + Assertions.assertEquals("wsyqxfowfnsyyeyt", response.iterator().next().networkFabricId()); + Assertions.assertEquals("qzdfjwo", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java index 4168798ab32a..7f5da95f9433 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; @@ -23,21 +23,21 @@ public final class NetworkRacksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"htabhacjlfq\",\"networkDevices\":[\"lvvwvpf\",\"tpvzhmlnfvy\",\"dhf\",\"nsd\"],\"provisioningState\":\"Canceled\",\"annotation\":\"bxnlkmazhlewyr\"},\"location\":\"sayehfz\",\"tags\":{\"tkgmwxzlphzujkqa\":\"yqtmdhb\"},\"id\":\"bejhxopehel\",\"name\":\"sykhdapxdiibjj\",\"type\":\"uekhh\"}]}"; + = "{\"value\":[{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"pgqxekbv\",\"networkDevices\":[\"umqoqwv\",\"b\"],\"lastOperation\":{\"details\":\"eigngrzvegxm\"},\"provisioningState\":\"Canceled\",\"configurationState\":\"Deprovisioned\",\"annotation\":\"zewlww\"},\"location\":\"pvpc\",\"tags\":{\"vfctsfujdapc\":\"ovzkwhdtf\",\"tddydbat\":\"gamgbnktg\",\"rwsdy\":\"xkwcolna\"},\"id\":\"ahnidpcpmv\",\"name\":\"zhdsaqmekgtkoj\",\"type\":\"ruhzvveerwlehs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkRacks().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("sayehfz", response.iterator().next().location()); - Assertions.assertEquals("yqtmdhb", response.iterator().next().tags().get("tkgmwxzlphzujkqa")); + Assertions.assertEquals("pvpc", response.iterator().next().location()); + Assertions.assertEquals("ovzkwhdtf", response.iterator().next().tags().get("vfctsfujdapc")); Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().networkRackType()); - Assertions.assertEquals("htabhacjlfq", response.iterator().next().networkFabricId()); - Assertions.assertEquals("bxnlkmazhlewyr", response.iterator().next().annotation()); + Assertions.assertEquals("pgqxekbv", response.iterator().next().networkFabricId()); + Assertions.assertEquals("zewlww", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java index 941224059bb6..2d565fa579e4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java @@ -1,70 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRacksListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacksListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class NetworkRacksListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkRacksListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkRackType\":\"Compute\",\"networkFabricId\":\"htujcyohigimwdc\",\"networkDevices\":[\"kqnqvkixnmbzme\"],\"provisioningState\":\"Accepted\",\"annotation\":\"zwimbzayspz\"},\"location\":\"i\",\"tags\":{\"pvdvatlzmgs\":\"fphmdzxplg\"},\"id\":\"hnzrsbkkzovlzdm\",\"name\":\"fmfws\",\"type\":\"afofu\"},{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"immovzwd\",\"networkDevices\":[\"kmvhzfo\",\"anyrvaprtgelgwe\",\"ikfyaqandm\",\"mnqoqjum\"],\"provisioningState\":\"Deleting\",\"annotation\":\"bpbvzopaxmf\"},\"location\":\"smcwoxfaxd\",\"tags\":{\"bsat\":\"i\"},\"id\":\"oiauesugmocpcj\",\"name\":\"cboe\",\"type\":\"rgttw\"},{\"properties\":{\"networkRackType\":\"Compute\",\"networkFabricId\":\"siuorinikcedpk\",\"networkDevices\":[\"wmmtmqrxrzq\"],\"provisioningState\":\"Canceled\",\"annotation\":\"zyayubtgmbxi\"},\"location\":\"hragpxmib\",\"tags\":{\"ovyzt\":\"upoyryefqm\",\"ceeg\":\"lnomfpb\",\"ukkrehyh\":\"yieztkutnjil\",\"fvulxfaryr\":\"mjodu\"},\"id\":\"jlgdez\",\"name\":\"jqwahoyi\",\"type\":\"axqvjweiwtczkddn\"}],\"nextLink\":\"vbooqbmdqrxy\"}") + "{\"value\":[{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"ckfavhkh\",\"networkDevices\":[\"wweifdy\",\"aoex\",\"guwnrdpuzlai\",\"sujtgg\"],\"lastOperation\":{\"details\":\"zam\"},\"provisioningState\":\"Succeeded\",\"configurationState\":\"Provisioned\",\"annotation\":\"dcliqwzu\"},\"location\":\"yelrnh\",\"tags\":{\"syovqmqc\":\"vhqsz\"},\"id\":\"dp\",\"name\":\"oqwrnfckjthlok\",\"type\":\"xw\"}],\"nextLink\":\"fubkngejjx\"}") .toObject(NetworkRacksListResult.class); - Assertions.assertEquals("i", model.value().get(0).location()); - Assertions.assertEquals("fphmdzxplg", model.value().get(0).tags().get("pvdvatlzmgs")); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.value().get(0).networkRackType()); - Assertions.assertEquals("htujcyohigimwdc", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zwimbzayspz", model.value().get(0).annotation()); - Assertions.assertEquals("vbooqbmdqrxy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRacksListResult model = new NetworkRacksListResult().withValue(Arrays.asList( - new NetworkRackInner().withLocation("i") - .withTags(mapOf("pvdvatlzmgs", "fphmdzxplg")) - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("htujcyohigimwdc") - .withAnnotation("zwimbzayspz"), - new NetworkRackInner().withLocation("smcwoxfaxd") - .withTags(mapOf("bsat", "i")) - .withNetworkRackType(NetworkRackType.AGGREGATE) - .withNetworkFabricId("immovzwd") - .withAnnotation("bpbvzopaxmf"), - new NetworkRackInner().withLocation("hragpxmib") - .withTags( - mapOf("ovyzt", "upoyryefqm", "ceeg", "lnomfpb", "ukkrehyh", "yieztkutnjil", "fvulxfaryr", "mjodu")) - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("siuorinikcedpk") - .withAnnotation("zyayubtgmbxi"))) - .withNextLink("vbooqbmdqrxy"); - model = BinaryData.fromObject(model).toObject(NetworkRacksListResult.class); - Assertions.assertEquals("i", model.value().get(0).location()); - Assertions.assertEquals("fphmdzxplg", model.value().get(0).tags().get("pvdvatlzmgs")); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.value().get(0).networkRackType()); - Assertions.assertEquals("htujcyohigimwdc", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zwimbzayspz", model.value().get(0).annotation()); - Assertions.assertEquals("vbooqbmdqrxy", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("yelrnh", model.value().get(0).location()); + Assertions.assertEquals("vhqsz", model.value().get(0).tags().get("syovqmqc")); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.value().get(0).networkRackType()); + Assertions.assertEquals("ckfavhkh", model.value().get(0).networkFabricId()); + Assertions.assertEquals("dcliqwzu", model.value().get(0).annotation()); + Assertions.assertEquals("fubkngejjx", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java index 81a9aaf2012d..6c6c63c09234 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,63 +23,73 @@ public final class NetworkTapInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapInner model = BinaryData.fromString( - "{\"properties\":{\"networkPacketBrokerId\":\"gage\",\"sourceTapRuleId\":\"qbugihcdv\",\"destinations\":[{\"name\":\"zorbloejzsax\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"wvdeppjnaphifkf\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"bpebrmj\",\"nfpgh\"]},\"destinationTapRuleId\":\"ttpkims\"},{\"name\":\"nkkhbykr\",\"destinationType\":\"Direct\",\"destinationId\":\"cmelycpgokut\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"zbnv\",\"sh\"]},\"destinationTapRuleId\":\"zzlapyixlvzc\"},{\"name\":\"laebxiau\",\"destinationType\":\"Direct\",\"destinationId\":\"tessjlwjta\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"kx\",\"xqayg\",\"slkvcvwp\"]},\"destinationTapRuleId\":\"cj\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"onbwhi\"},\"location\":\"yozvrcwfpucw\",\"tags\":{\"oarx\":\"gqefgzjvbxqcb\"},\"id\":\"uuciagvkdlhu\",\"name\":\"u\",\"type\":\"lbjo\"}") + "{\"properties\":{\"networkPacketBrokerId\":\"qswsychdcj\",\"sourceTapRuleId\":\"cmpncjqbgbnoqn\",\"networkFabricIds\":[\"fxeytzgwjekyqi\"],\"destinations\":[{\"name\":\"cpo\",\"destinationType\":\"Direct\",\"destinationId\":\"vgppp\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"xlfhlzzga\"]},\"destinationTapRuleId\":\"pxwwblscrmzqu\"},{\"name\":\"zywkgouxn\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"yhthesywywnvgyo\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"cwuejmxlfzln\",\"yrgr\",\"hchraunjovlx\"]},\"destinationTapRuleId\":\"vm\"},{\"name\":\"zpniqwx\",\"destinationType\":\"Direct\",\"destinationId\":\"gmnkgtlh\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ioiyecz\",\"vzmsvzngheq\"]},\"destinationTapRuleId\":\"ehgvmmnoyz\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"pluzypkf\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"annotation\":\"vxotnoilqc\"},\"identity\":{\"principalId\":\"yefqhxytsqmbwca\",\"tenantId\":\"aaq\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"qlreqbrcmmdts\":{\"principalId\":\"y\",\"clientId\":\"xra\"},\"owrcyrnm\":{\"principalId\":\"umxu\",\"clientId\":\"nba\"},\"phr\":{\"principalId\":\"ko\",\"clientId\":\"qzkkagvejhmn\"}}},\"location\":\"mpe\",\"tags\":{\"mzfntteyrf\":\"zypavam\",\"pjdr\":\"xytja\"},\"id\":\"lijk\",\"name\":\"vbfaehjji\",\"type\":\"vjqxav\"}") .toObject(NetworkTapInner.class); - Assertions.assertEquals("yozvrcwfpucw", model.location()); - Assertions.assertEquals("gqefgzjvbxqcb", model.tags().get("oarx")); - Assertions.assertEquals("gage", model.networkPacketBrokerId()); - Assertions.assertEquals("zorbloejzsax", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); - Assertions.assertEquals("wvdeppjnaphifkf", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("mpe", model.location()); + Assertions.assertEquals("zypavam", model.tags().get("mzfntteyrf")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("qswsychdcj", model.networkPacketBrokerId()); + Assertions.assertEquals("cpo", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); + Assertions.assertEquals("vgppp", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("bpebrmj", + Assertions.assertEquals("xlfhlzzga", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ttpkims", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("pxwwblscrmzqu", model.destinations().get(0).destinationTapRuleId()); Assertions.assertEquals(PollingType.PULL, model.pollingType()); - Assertions.assertEquals("onbwhi", model.annotation()); + Assertions.assertEquals("vxotnoilqc", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapInner model = new NetworkTapInner().withLocation("yozvrcwfpucw") - .withTags(mapOf("oarx", "gqefgzjvbxqcb")) - .withNetworkPacketBrokerId("gage") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("zorbloejzsax") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("wvdeppjnaphifkf") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("bpebrmj", "nfpgh"))) - .withDestinationTapRuleId("ttpkims"), - new NetworkTapPropertiesDestinationsItem().withName("nkkhbykr") + NetworkTapInner model + = new NetworkTapInner().withLocation("mpe") + .withTags(mapOf("mzfntteyrf", "zypavam", "pjdr", "xytja")) + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("qlreqbrcmmdts", new UserAssignedIdentity(), "owrcyrnm", + new UserAssignedIdentity(), "phr", new UserAssignedIdentity()))) + .withNetworkPacketBrokerId("qswsychdcj") + .withDestinations(Arrays.asList(new DestinationProperties() + .withName("cpo") .withDestinationType(DestinationType.DIRECT) - .withDestinationId("cmelycpgokut") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("zbnv", "sh"))) - .withDestinationTapRuleId("zzlapyixlvzc"), - new NetworkTapPropertiesDestinationsItem().withName("laebxiau") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("tessjlwjta") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("kx", "xqayg", "slkvcvwp"))) - .withDestinationTapRuleId("cj"))) - .withPollingType(PollingType.PULL) - .withAnnotation("onbwhi"); + .withDestinationId("vgppp") + .withIsolationDomainProperties( + new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("xlfhlzzga"))) + .withDestinationTapRuleId("pxwwblscrmzqu"), + new DestinationProperties().withName("zywkgouxn") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("yhthesywywnvgyo") + .withIsolationDomainProperties(new IsolationDomainProperties() + .withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("cwuejmxlfzln", "yrgr", "hchraunjovlx"))) + .withDestinationTapRuleId("vm"), + new DestinationProperties().withName("zpniqwx") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("gmnkgtlh") + .withIsolationDomainProperties( + new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("ioiyecz", "vzmsvzngheq"))) + .withDestinationTapRuleId("ehgvmmnoyz"))) + .withPollingType(PollingType.PULL) + .withAnnotation("vxotnoilqc"); model = BinaryData.fromObject(model).toObject(NetworkTapInner.class); - Assertions.assertEquals("yozvrcwfpucw", model.location()); - Assertions.assertEquals("gqefgzjvbxqcb", model.tags().get("oarx")); - Assertions.assertEquals("gage", model.networkPacketBrokerId()); - Assertions.assertEquals("zorbloejzsax", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); - Assertions.assertEquals("wvdeppjnaphifkf", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("mpe", model.location()); + Assertions.assertEquals("zypavam", model.tags().get("mzfntteyrf")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("qswsychdcj", model.networkPacketBrokerId()); + Assertions.assertEquals("cpo", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); + Assertions.assertEquals("vgppp", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("bpebrmj", + Assertions.assertEquals("xlfhlzzga", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ttpkims", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("pxwwblscrmzqu", model.destinations().get(0).destinationTapRuleId()); Assertions.assertEquals(PollingType.PULL, model.pollingType()); - Assertions.assertEquals("onbwhi", model.annotation()); + Assertions.assertEquals("vxotnoilqc", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java new file mode 100644 index 000000000000..03f31bb9ff04 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapPatchProperties model = BinaryData.fromString( + "{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"mjkykqflkm\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"mysmkbndnrihpj\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"ejnoignyd\"]},\"destinationTapRuleId\":\"rnpsbnmrmhkipjar\"},{\"name\":\"dpfg\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"iae\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"clun\",\"dvjlpbjszqjfs\"]},\"destinationTapRuleId\":\"vaycxrwk\"},{\"name\":\"bghyp\",\"destinationType\":\"Direct\",\"destinationId\":\"iypzcyh\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"p\",\"vutbsusfd\"]},\"destinationTapRuleId\":\"qrqco\"},{\"name\":\"endgr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"lxqqnugt\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"n\"]},\"destinationTapRuleId\":\"d\"}],\"annotation\":\"jticw\"}") + .toObject(NetworkTapPatchProperties.class); + Assertions.assertEquals("jticw", model.annotation()); + Assertions.assertEquals(PollingType.PUSH, model.pollingType()); + Assertions.assertEquals("mjkykqflkm", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("mysmkbndnrihpj", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("ejnoignyd", + model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("rnpsbnmrmhkipjar", model.destinations().get(0).destinationTapRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapPatchProperties model = new NetworkTapPatchProperties().withAnnotation("jticw") + .withPollingType(PollingType.PUSH) + .withDestinations(Arrays.asList(new DestinationPatchProperties().withName("mjkykqflkm") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("mysmkbndnrihpj") + .withIsolationDomainProperties(new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("ejnoignyd"))) + .withDestinationTapRuleId("rnpsbnmrmhkipjar"), + new DestinationPatchProperties().withName("dpfg") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("iae") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("clun", "dvjlpbjszqjfs"))) + .withDestinationTapRuleId("vaycxrwk"), + new DestinationPatchProperties().withName("bghyp") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("iypzcyh") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("p", "vutbsusfd"))) + .withDestinationTapRuleId("qrqco"), + new DestinationPatchProperties().withName("endgr") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("lxqqnugt") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("n"))) + .withDestinationTapRuleId("d"))); + model = BinaryData.fromObject(model).toObject(NetworkTapPatchProperties.class); + Assertions.assertEquals("jticw", model.annotation()); + Assertions.assertEquals(PollingType.PUSH, model.pollingType()); + Assertions.assertEquals("mjkykqflkm", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("mysmkbndnrihpj", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("ejnoignyd", + model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("rnpsbnmrmhkipjar", model.destinations().get(0).destinationTapRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java index 26f91ba02dcd..0eeee876521b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,58 +23,61 @@ public final class NetworkTapPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapPatch model = BinaryData.fromString( - "{\"properties\":{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"zsyqagqllcbrvaid\",\"destinationType\":\"Direct\",\"destinationId\":\"htrrqwfy\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"jrnogykugdl\",\"vsa\",\"gthkslgeu\",\"fkbzbfbxjblajy\"]},\"destinationTapRuleId\":\"nbycs\"},{\"name\":\"oisaz\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"fsvpzxg\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"mlfjymgw\"]},\"destinationTapRuleId\":\"szcfyzqpeqreg\"},{\"name\":\"rdpagknxmaovr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"nzf\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ycjcgeipqxxsdy\",\"fwtyd\"]},\"destinationTapRuleId\":\"mabhgc\"}],\"annotation\":\"jqzhpvhxpba\"},\"tags\":{\"qscjpvqerqxk\":\"eullgfyog\",\"zlhcu\":\"mwdz\",\"qpwwvmbjecfwlbgh\":\"x\"}}") + "{\"properties\":{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"xrdeexw\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"uvnxbohpzur\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"beadyfen\",\"ozoijoxcbpkiw\",\"eacbtaxdrp\"]},\"destinationTapRuleId\":\"hsxw\"},{\"name\":\"rztdacrqcwk\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"syajmmczupd\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"sdbk\"]},\"destinationTapRuleId\":\"kdium\"}],\"annotation\":\"ivxwkscwbshfih\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"yi\":{\"principalId\":\"lau\",\"clientId\":\"ue\"},\"fyhsb\":{\"principalId\":\"ztyecxd\",\"clientId\":\"spgnnd\"},\"vzr\":{\"principalId\":\"wlvsvsyl\",\"clientId\":\"prqtfk\"}}},\"tags\":{\"kkmvz\":\"onxdwfcuhbgftfvq\",\"dqrjylwqqsemjhh\":\"neg\",\"hztb\":\"lsub\",\"zwufi\":\"jrdzwyktdp\"}}") .toObject(NetworkTapPatch.class); - Assertions.assertEquals("eullgfyog", model.tags().get("qscjpvqerqxk")); + Assertions.assertEquals("onxdwfcuhbgftfvq", model.tags().get("kkmvz")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("htrrqwfy", model.destinations().get(0).destinationId()); + Assertions.assertEquals("xrdeexw", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("uvnxbohpzur", model.destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("jrnogykugdl", + Assertions.assertEquals("beadyfen", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("nbycs", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals("jqzhpvhxpba", model.annotation()); + Assertions.assertEquals("hsxw", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("ivxwkscwbshfih", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapPatch model = new NetworkTapPatch() - .withTags(mapOf("qscjpvqerqxk", "eullgfyog", "zlhcu", "mwdz", "qpwwvmbjecfwlbgh", "x")) + .withTags( + mapOf("kkmvz", "onxdwfcuhbgftfvq", "dqrjylwqqsemjhh", "neg", "hztb", "lsub", "zwufi", "jrdzwyktdp")) + .withIdentity( + new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("yi", new UserAssignedIdentity(), "fyhsb", + new UserAssignedIdentity(), "vzr", new UserAssignedIdentity()))) .withPollingType(PollingType.PUSH) .withDestinations(Arrays.asList( - new NetworkTapPatchableParametersDestinationsItem().withName("zsyqagqllcbrvaid") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("htrrqwfy") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("jrnogykugdl", "vsa", "gthkslgeu", "fkbzbfbxjblajy"))) - .withDestinationTapRuleId("nbycs"), - new NetworkTapPatchableParametersDestinationsItem().withName("oisaz") + new DestinationPatchProperties().withName("xrdeexw") .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("fsvpzxg") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("mlfjymgw"))) - .withDestinationTapRuleId("szcfyzqpeqreg"), - new NetworkTapPatchableParametersDestinationsItem().withName("rdpagknxmaovr") + .withDestinationId("uvnxbohpzur") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("beadyfen", "ozoijoxcbpkiw", "eacbtaxdrp"))) + .withDestinationTapRuleId("hsxw"), + new DestinationPatchProperties().withName("rztdacrqcwk") .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("nzf") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("ycjcgeipqxxsdy", "fwtyd"))) - .withDestinationTapRuleId("mabhgc"))) - .withAnnotation("jqzhpvhxpba"); + .withDestinationId("syajmmczupd") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("sdbk"))) + .withDestinationTapRuleId("kdium"))) + .withAnnotation("ivxwkscwbshfih"); model = BinaryData.fromObject(model).toObject(NetworkTapPatch.class); - Assertions.assertEquals("eullgfyog", model.tags().get("qscjpvqerqxk")); + Assertions.assertEquals("onxdwfcuhbgftfvq", model.tags().get("kkmvz")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("htrrqwfy", model.destinations().get(0).destinationId()); + Assertions.assertEquals("xrdeexw", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("uvnxbohpzur", model.destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("jrnogykugdl", + Assertions.assertEquals("beadyfen", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("nbycs", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals("jqzhpvhxpba", model.annotation()); + Assertions.assertEquals("hsxw", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("ivxwkscwbshfih", model.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java deleted file mode 100644 index d457f97ccc28..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPatchableParametersDestinationsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPatchableParametersDestinationsItem model = BinaryData.fromString( - "{\"name\":\"agwiijc\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"whxpsbapial\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"uzudegefxl\"]},\"destinationTapRuleId\":\"ggo\"}") - .toObject(NetworkTapPatchableParametersDestinationsItem.class); - Assertions.assertEquals("agwiijc", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("whxpsbapial", model.destinationId()); - Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("uzudegefxl", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ggo", model.destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPatchableParametersDestinationsItem model - = new NetworkTapPatchableParametersDestinationsItem().withName("agwiijc") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("whxpsbapial") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("uzudegefxl"))) - .withDestinationTapRuleId("ggo"); - model = BinaryData.fromObject(model).toObject(NetworkTapPatchableParametersDestinationsItem.class); - Assertions.assertEquals("agwiijc", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("whxpsbapial", model.destinationId()); - Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("uzudegefxl", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ggo", model.destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java deleted file mode 100644 index 13094a5a6cb4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchableParameters; -import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.PollingType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPatchableParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPatchableParameters model = BinaryData.fromString( - "{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"oh\",\"destinationType\":\"Direct\",\"destinationId\":\"njzpchiypbfhmi\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"zewbrsrjzgkbr\",\"uxboufqnnqbjxgj\"]},\"destinationTapRuleId\":\"rerukbuudrizw\"},{\"name\":\"kjxl\",\"destinationType\":\"Direct\",\"destinationId\":\"dikqelssybz\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"rommkiqhypwt\",\"zyjj\"]},\"destinationTapRuleId\":\"t\"}],\"annotation\":\"zql\"}") - .toObject(NetworkTapPatchableParameters.class); - Assertions.assertEquals("zql", model.annotation()); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("oh", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("njzpchiypbfhmi", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("zewbrsrjzgkbr", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rerukbuudrizw", model.destinations().get(0).destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPatchableParameters model = new NetworkTapPatchableParameters().withAnnotation("zql") - .withPollingType(PollingType.PUSH) - .withDestinations(Arrays.asList( - new NetworkTapPatchableParametersDestinationsItem().withName("oh") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("njzpchiypbfhmi") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("zewbrsrjzgkbr", "uxboufqnnqbjxgj"))) - .withDestinationTapRuleId("rerukbuudrizw"), - new NetworkTapPatchableParametersDestinationsItem().withName("kjxl") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("dikqelssybz") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("rommkiqhypwt", "zyjj"))) - .withDestinationTapRuleId("t"))); - model = BinaryData.fromObject(model).toObject(NetworkTapPatchableParameters.class); - Assertions.assertEquals("zql", model.annotation()); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("oh", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("njzpchiypbfhmi", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("zewbrsrjzgkbr", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rerukbuudrizw", model.destinations().get(0).destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java deleted file mode 100644 index f2324ee16ece..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPropertiesDestinationsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPropertiesDestinationsItem model = BinaryData.fromString( - "{\"name\":\"cfvvtdpcbpzfo\",\"destinationType\":\"Direct\",\"destinationId\":\"ugbrhfiwltkfys\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"klx\"]},\"destinationTapRuleId\":\"cvasyyh\"}") - .toObject(NetworkTapPropertiesDestinationsItem.class); - Assertions.assertEquals("cfvvtdpcbpzfo", model.name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); - Assertions.assertEquals("ugbrhfiwltkfys", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("klx", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("cvasyyh", model.destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPropertiesDestinationsItem model - = new NetworkTapPropertiesDestinationsItem().withName("cfvvtdpcbpzfo") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("ugbrhfiwltkfys") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("klx"))) - .withDestinationTapRuleId("cvasyyh"); - model = BinaryData.fromObject(model).toObject(NetworkTapPropertiesDestinationsItem.class); - Assertions.assertEquals("cfvvtdpcbpzfo", model.name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); - Assertions.assertEquals("ugbrhfiwltkfys", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("klx", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("cvasyyh", model.destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java index 0301397688db..4e23e7edb19b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,50 +18,50 @@ public final class NetworkTapPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapProperties model = BinaryData.fromString( - "{\"networkPacketBrokerId\":\"fmjfexulv\",\"sourceTapRuleId\":\"pknarse\",\"destinations\":[{\"name\":\"csqoacbuqdgs\",\"destinationType\":\"Direct\",\"destinationId\":\"q\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"vsz\",\"lvyakeszsuuvul\",\"qcwggchxvl\"]},\"destinationTapRuleId\":\"fbrvecicaovphirl\"},{\"name\":\"ipiunnepkwzzzku\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"cjomipvwkaujtt\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"bwofxxdplr\",\"lfkvga\",\"cbtuxlbpxrhrfjen\"]},\"destinationTapRuleId\":\"zwefiktlhqas\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"annotation\":\"secigzzdwj\"}") + "{\"networkPacketBrokerId\":\"mdmracfsffdralih\",\"sourceTapRuleId\":\"scygyzhcvlavyr\",\"networkFabricIds\":[\"dxrmyzvti\",\"jtpdru\",\"xaxoyj\",\"h\"],\"destinations\":[{\"name\":\"we\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"givkteccxfnatntm\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"mfhjikqcnbd\",\"itgh\",\"melzvrch\",\"yucgrmwyvhdiypl\"]},\"destinationTapRuleId\":\"qqgrbrhhvipgti\"},{\"name\":\"aaoylwhfmkbwe\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"gypjixdmobadydw\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"clsxdqdchnzibix\",\"gsrwxxqkwarg\",\"b\"]},\"destinationTapRuleId\":\"gosijiqexqwqy\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"flhdhoxu\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"annotation\":\"hwtamvmbg\"}") .toObject(NetworkTapProperties.class); - Assertions.assertEquals("secigzzdwj", model.annotation()); - Assertions.assertEquals("fmjfexulv", model.networkPacketBrokerId()); - Assertions.assertEquals("csqoacbuqdgs", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("q", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("hwtamvmbg", model.annotation()); + Assertions.assertEquals("mdmracfsffdralih", model.networkPacketBrokerId()); + Assertions.assertEquals("we", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("givkteccxfnatntm", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("vsz", + Assertions.assertEquals("mfhjikqcnbd", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("fbrvecicaovphirl", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("qqgrbrhhvipgti", model.destinations().get(0).destinationTapRuleId()); Assertions.assertEquals(PollingType.PULL, model.pollingType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapProperties model = new NetworkTapProperties().withAnnotation("secigzzdwj") - .withNetworkPacketBrokerId("fmjfexulv") + NetworkTapProperties model = new NetworkTapProperties().withAnnotation("hwtamvmbg") + .withNetworkPacketBrokerId("mdmracfsffdralih") .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("csqoacbuqdgs") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("q") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("vsz", "lvyakeszsuuvul", "qcwggchxvl"))) - .withDestinationTapRuleId("fbrvecicaovphirl"), - new NetworkTapPropertiesDestinationsItem().withName("ipiunnepkwzzzku") + new DestinationProperties().withName("we") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("givkteccxfnatntm") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("mfhjikqcnbd", "itgh", "melzvrch", "yucgrmwyvhdiypl"))) + .withDestinationTapRuleId("qqgrbrhhvipgti"), + new DestinationProperties().withName("aaoylwhfmkbwe") .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("cjomipvwkaujtt") + .withDestinationId("gypjixdmobadydw") .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("bwofxxdplr", "lfkvga", "cbtuxlbpxrhrfjen"))) - .withDestinationTapRuleId("zwefiktlhqas"))) + .withNeighborGroupIds(Arrays.asList("clsxdqdchnzibix", "gsrwxxqkwarg", "b"))) + .withDestinationTapRuleId("gosijiqexqwqy"))) .withPollingType(PollingType.PULL); model = BinaryData.fromObject(model).toObject(NetworkTapProperties.class); - Assertions.assertEquals("secigzzdwj", model.annotation()); - Assertions.assertEquals("fmjfexulv", model.networkPacketBrokerId()); - Assertions.assertEquals("csqoacbuqdgs", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("q", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("hwtamvmbg", model.annotation()); + Assertions.assertEquals("mdmracfsffdralih", model.networkPacketBrokerId()); + Assertions.assertEquals("we", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("givkteccxfnatntm", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("vsz", + Assertions.assertEquals("mfhjikqcnbd", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("fbrvecicaovphirl", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("qqgrbrhhvipgti", model.destinations().get(0).destinationTapRuleId()); Assertions.assertEquals(PollingType.PULL, model.pollingType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java new file mode 100644 index 000000000000..bbcfebb7929e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleActionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleActionPatch model = BinaryData.fromString( + "{\"type\":\"Drop\",\"truncate\":\"kmzv\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"fblsxyfqgtodg\",\"matchConfigurationName\":\"lefmizdcsr\"}") + .toObject(NetworkTapRuleActionPatch.class); + Assertions.assertEquals(TapRuleActionType.DROP, model.type()); + Assertions.assertEquals("kmzv", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); + Assertions.assertEquals("fblsxyfqgtodg", model.destinationId()); + Assertions.assertEquals("lefmizdcsr", model.matchConfigurationName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleActionPatch model = new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("kmzv") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("fblsxyfqgtodg") + .withMatchConfigurationName("lefmizdcsr"); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleActionPatch.class); + Assertions.assertEquals(TapRuleActionType.DROP, model.type()); + Assertions.assertEquals("kmzv", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); + Assertions.assertEquals("fblsxyfqgtodg", model.destinationId()); + Assertions.assertEquals("lefmizdcsr", model.matchConfigurationName()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java index ab844a58b0e1..e853714e81e9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,27 +14,27 @@ public final class NetworkTapRuleActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleAction model = BinaryData.fromString( - "{\"type\":\"Mirror\",\"truncate\":\"hczygpmg\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"lojhhyl\",\"matchConfigurationName\":\"evfiyymotu\"}") + "{\"type\":\"Redirect\",\"truncate\":\"law\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"qabjropxfqdmllz\",\"matchConfigurationName\":\"jyuwq\"}") .toObject(NetworkTapRuleAction.class); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.type()); - Assertions.assertEquals("hczygpmg", model.truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); - Assertions.assertEquals("lojhhyl", model.destinationId()); - Assertions.assertEquals("evfiyymotu", model.matchConfigurationName()); + Assertions.assertEquals(TapRuleActionType.REDIRECT, model.type()); + Assertions.assertEquals("law", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("qabjropxfqdmllz", model.destinationId()); + Assertions.assertEquals("jyuwq", model.matchConfigurationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleAction model = new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("hczygpmg") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("lojhhyl") - .withMatchConfigurationName("evfiyymotu"); + NetworkTapRuleAction model = new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) + .withTruncate("law") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("qabjropxfqdmllz") + .withMatchConfigurationName("jyuwq"); model = BinaryData.fromObject(model).toObject(NetworkTapRuleAction.class); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.type()); - Assertions.assertEquals("hczygpmg", model.truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); - Assertions.assertEquals("lojhhyl", model.destinationId()); - Assertions.assertEquals("evfiyymotu", model.matchConfigurationName()); + Assertions.assertEquals(TapRuleActionType.REDIRECT, model.type()); + Assertions.assertEquals("law", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("qabjropxfqdmllz", model.destinationId()); + Assertions.assertEquals("jyuwq", model.matchConfigurationName()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java index e32700320141..c733a9d2d134 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,17 +10,22 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; @@ -32,167 +37,229 @@ public final class NetworkTapRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleInner model = BinaryData.fromString( - "{\"properties\":{\"networkTapId\":\"ae\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-09-15T09:06:41Z\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"tapRulesUrl\":\"fooy\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dtzcqi\",\"sequenceNumber\":3768764619279475619,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"xlantolamlbijuxk\",\"llczipvwdt\",\"ckzdqiqdlra\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"wxsuy\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"rfgslglhpry\",\"matchConfigurationName\":\"zihuioaeo\"}]},{\"matchConfigurationName\":\"ajtfey\",\"sequenceNumber\":8432449142241405654,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"beuuqutkzwtjwwg\",\"zytijcx\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"dydhqkkkb\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"catuqbhpowcnx\",\"matchConfigurationName\":\"zdlys\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"katprytgrhzbq\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wrp\"]}],\"vlanGroups\":[{\"name\":\"ht\",\"vlans\":[\"zcttbqgdirdam\"]},{\"name\":\"zjgcfjfx\",\"vlans\":[\"jjirmuydgftt\",\"dofgeoagfuoftnx\"]},{\"name\":\"wxmdaj\",\"vlans\":[\"g\",\"gsevmdm\"]},{\"name\":\"nlrstgf\",\"vlans\":[\"j\",\"n\",\"idt\",\"vamyyznmrgcdo\"]}],\"portGroups\":[{\"name\":\"cgytoxuw\",\"ports\":[\"nzqsaqmebgszpl\",\"sdekpdzz\"]}]},{\"ipGroups\":[{\"name\":\"pgvokyejidbd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nycwz\",\"lv\",\"wsnmrkkyjt\",\"epwpwfk\"]},{\"name\":\"uxuva\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dofuckclb\"]},{\"name\":\"luevsolzwilfng\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ebuuxjx\",\"fxfjwp\",\"kktpmbmxbmbr\",\"gzzxljbkhxsd\"]},{\"name\":\"au\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"weqjfyxydgto\",\"vq\",\"vwglgwzpv\",\"akglhpsesrfga\"]}],\"vlanGroups\":[{\"name\":\"dvxcgdhyhgoqgsoy\",\"vlans\":[\"yjrcbqpb\",\"spglq\",\"o\"]},{\"name\":\"dahneaoovty\",\"vlans\":[\"ivfwjlofze\",\"fsr\"]}],\"portGroups\":[{\"name\":\"la\",\"ports\":[\"foc\",\"hapejov\"]},{\"name\":\"wxn\",\"ports\":[\"hnoyrzaaoeeh\",\"mjenvjeatea\",\"xc\"]},{\"name\":\"oxdjxldnaryy\",\"ports\":[\"kd\",\"lrndwdbvxvza\",\"edoyqxlunkft\",\"mcxqqxmyzklao\"]}]},{\"ipGroups\":[{\"name\":\"hrvmzrqrazadi\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"aslkskhjqjpvba\",\"hxjtgzgtai\"]},{\"name\":\"b\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"gbsfsgsaenwldf\",\"hljqlxsp\",\"rjc\"]}],\"vlanGroups\":[{\"name\":\"dsxebuhsxrz\",\"vlans\":[\"sdaluyckhefrbhs\",\"uerbgpxebjl\",\"dcaytujraxd\"]}],\"portGroups\":[{\"name\":\"jmgtnsew\",\"ports\":[\"ly\"]},{\"name\":\"vvyljurkepose\",\"ports\":[\"ylmpctwjwdsd\",\"zmk\",\"erxxxoteehkhowgo\",\"vvh\"]},{\"name\":\"wpcbapnpxr\",\"ports\":[\"wbmpspfeylqloc\",\"vujex\"]}]}],\"annotation\":\"glxrkgjnm\"},\"location\":\"aslavxj\",\"tags\":{\"pieidzlvssqy\":\"o\"},\"id\":\"jopackyhydv\",\"name\":\"kmfngpmillxgjs\",\"type\":\"izwgsoriobijeiyd\"}") + "{\"properties\":{\"annotation\":\"owynj\",\"configurationType\":\"File\",\"tapRulesUrl\":\"zmxuktdrsjtmnk\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"w\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"dtstia\",\"sequenceNumber\":6699511414705281945,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"qbcmlroiomme\",\"soq\",\"blcyeqdobobaq\",\"abebckc\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"pjcxbjgfm\",\"qyyfrridzfpsfyak\",\"dfhmlx\",\"q\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"afzvptriysjrg\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"puqpsrcekdvvo\",\"matchConfigurationName\":\"wedggwgc\"}]},{\"matchConfigurationName\":\"bwatz\",\"sequenceNumber\":2676877168964118174,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"SCTP\"},\"protocolTypes\":[\"rwiemzcyni\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"rqw\",\"pz\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"tkmlfupjzcxx\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"yxjg\",\"matchConfigurationName\":\"xuerrda\"},{\"type\":\"Goto\",\"truncate\":\"tkbcer\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"pvfqjckmpwyv\",\"matchConfigurationName\":\"nhhcikh\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ylsacagif\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"otohzwtoidhbx\"]},{\"name\":\"rapwzhlutjsj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"iemv\",\"pmeakosysycv\",\"de\",\"hcbsaipusuo\"]}],\"vlanGroups\":[{\"name\":\"bvbbdledff\",\"vlans\":[\"sluazz\",\"f\",\"veugpx\"]},{\"name\":\"empupbscboxra\",\"vlans\":[\"zmrjgo\",\"ekxeheowseca\",\"drzzbskiwrjsb\"]}],\"portGroups\":[{\"name\":\"eesacuicnvqiqsu\",\"ports\":[\"r\",\"aptndrmmnlhnk\",\"xrqkekcdavi\"]},{\"name\":\"beqrfzavqymcwts\",\"ports\":[\"eplbrzgkuorwpqbs\",\"weobptscr\",\"ykk\",\"elayynoyjyfls\"]},{\"name\":\"bnlyoifgdfzj\",\"ports\":[\"ykcv\",\"evcw\",\"zotkx\"]},{\"name\":\"wwooxgbsdzcg\",\"ports\":[\"pjhubdmgo\"]}]},{\"ipGroups\":[{\"name\":\"ujcqgzwvxwiu\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jklqrljdcukyla\",\"rjiqoqovqhgphgxu\",\"ud\"]},{\"name\":\"yqruvumryddnqiva\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"njze\",\"picciyoypoe\",\"ks\",\"w\"]},{\"name\":\"bpybqeigxuyxsxte\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nf\",\"fnhcg\",\"aqsr\",\"rfqd\"]}],\"vlanGroups\":[{\"name\":\"g\",\"vlans\":[\"obpmgqlw\",\"qznbb\",\"zposzfu\"]},{\"name\":\"pbygbnbcmoiq\",\"vlans\":[\"pvqewflwz\",\"xzuxerxh\",\"wl\",\"kqsqvvdkfp\"]}],\"portGroups\":[{\"name\":\"jd\",\"ports\":[\"mxxyfrdjid\",\"etfvgwfw\",\"ld\",\"gwouppvyddqsvc\"]},{\"name\":\"snxfrppwwqc\",\"ports\":[\"mtfx\",\"epzpxzxlcqzfxai\",\"iqmcjb\",\"mkirpqn\"]},{\"name\":\"udmhkcomeobwk\",\"ports\":[\"ltenlbfxlm\",\"ozesn\",\"oduomtxjbrixym\"]},{\"name\":\"ikkqyvurhwishyfm\",\"ports\":[\"qfev\",\"kyakcktehognsddj\",\"kde\",\"esu\"]}]},{\"ipGroups\":[{\"name\":\"fcnxc\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tcqxmyvkxixypavi\"]},{\"name\":\"czgo\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wichmxczby\"]},{\"name\":\"ocgmzdcts\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"rngtwgxr\",\"lwvpl\",\"sdksut\"]}],\"vlanGroups\":[{\"name\":\"tih\",\"vlans\":[\"shbvjh\"]},{\"name\":\"pmqququxl\",\"vlans\":[\"grxlexoweorocrqi\"]}],\"portGroups\":[{\"name\":\"tgbqpfyrv\",\"ports\":[\"ijvwmrgcnzhrp\",\"cxfmbzquuutqmhb\",\"qyzycgcm\",\"kygvxjdqosxzmd\"]},{\"name\":\"ybqfufkekzfkicxh\",\"ports\":[\"mnkg\",\"hvsr\",\"jokvlwvbjsa\",\"xsv\"]},{\"name\":\"pabwbpzgfgqpudhg\",\"ports\":[\"eabbfpxxavlo\",\"ukgsn\",\"hw\",\"xj\"]}]}],\"networkTapId\":\"maxcebnb\",\"networkTapIds\":[\"kemqqerwqx\",\"jpvemdfkht\",\"uo\"],\"pollingIntervalInSeconds\":1810756619,\"lastSyncedTime\":\"2021-07-05T17:18:43Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"bjkjge\"},\"lastOperation\":{\"details\":\"t\"},\"networkFabricIds\":[\"bvbmnhtwofxfmhl\",\"yqnslbqrmlqkiekh\",\"gq\"],\"configurationState\":\"Provisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"identity\":{\"principalId\":\"c\",\"tenantId\":\"msptluwozfvzas\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"cmcgmlmpnvq\":{\"principalId\":\"gx\",\"clientId\":\"wioq\"},\"xo\":{\"principalId\":\"yiarzn\",\"clientId\":\"qseypdlmajpu\"}}},\"location\":\"rmzgccynb\",\"tags\":{\"hedmm\":\"si\",\"xtzayqwddig\":\"oneeyrxpa\",\"wwveeozbjkjq\":\"blsplzdss\",\"ltssjdywbnklge\":\"izdnuehx\"},\"id\":\"xa\",\"name\":\"tsawv\",\"type\":\"cimpth\"}") .toObject(NetworkTapRuleInner.class); - Assertions.assertEquals("aslavxj", model.location()); - Assertions.assertEquals("o", model.tags().get("pieidzlvssqy")); - Assertions.assertEquals(PollingIntervalInSeconds.NINE_ZERO, model.pollingIntervalInSeconds()); + Assertions.assertEquals("rmzgccynb", model.location()); + Assertions.assertEquals("si", model.tags().get("hedmm")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("owynj", model.annotation()); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("fooy", model.tapRulesUrl()); - Assertions.assertEquals("dtzcqi", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3768764619279475619L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("zmxuktdrsjtmnk", model.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("w", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("dtstia", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6699511414705281945L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xlantolamlbijuxk", + Assertions.assertEquals("qbcmlroiomme", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, + Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.TCP, + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("wxsuy", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("afzvptriysjrg", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("rfgslglhpry", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("zihuioaeo", + Assertions.assertEquals("puqpsrcekdvvo", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("wedggwgc", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("katprytgrhzbq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("ylsacagif", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wrp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ht", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("zcttbqgdirdam", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("cgytoxuw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nzqsaqmebgszpl", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("glxrkgjnm", model.annotation()); + Assertions.assertEquals("otohzwtoidhbx", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("bvbbdledff", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("sluazz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("eesacuicnvqiqsu", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("r", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(1810756619, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("bjkjge", model.globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleInner model = new NetworkTapRuleInner().withLocation("aslavxj") - .withTags(mapOf("pieidzlvssqy", "o")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.NINE_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("fooy") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("dtzcqi") - .withSequenceNumber(3768764619279475619L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("xlantolamlbijuxk", "llczipvwdt", "ckzdqiqdlra")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("wxsuy") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("rfgslglhpry") - .withMatchConfigurationName("zihuioaeo"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ajtfey") - .withSequenceNumber(8432449142241405654L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("beuuqutkzwtjwwg", "zytijcx")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) - .withTruncate("dydhqkkkb") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("catuqbhpowcnx") - .withMatchConfigurationName("zdlys"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("katprytgrhzbq") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wrp")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ht").withVlans(Arrays.asList("zcttbqgdirdam")), - new VlanGroupProperties().withName("zjgcfjfx") - .withVlans(Arrays.asList("jjirmuydgftt", "dofgeoagfuoftnx")), - new VlanGroupProperties().withName("wxmdaj").withVlans(Arrays.asList("g", "gsevmdm")), - new VlanGroupProperties().withName("nlrstgf") - .withVlans(Arrays.asList("j", "n", "idt", "vamyyznmrgcdo")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("cgytoxuw") - .withPorts(Arrays.asList("nzqsaqmebgszpl", "sdekpdzz")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("pgvokyejidbd") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("nycwz", "lv", "wsnmrkkyjt", "epwpwfk")), - new IpGroupProperties().withName("uxuva") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("dofuckclb")), - new IpGroupProperties().withName("luevsolzwilfng") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("ebuuxjx", "fxfjwp", "kktpmbmxbmbr", "gzzxljbkhxsd")), - new IpGroupProperties().withName("au") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("weqjfyxydgto", "vq", "vwglgwzpv", "akglhpsesrfga")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("dvxcgdhyhgoqgsoy") - .withVlans(Arrays.asList("yjrcbqpb", "spglq", "o")), - new VlanGroupProperties().withName("dahneaoovty") - .withVlans(Arrays.asList("ivfwjlofze", "fsr")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("la").withPorts(Arrays.asList("foc", "hapejov")), - new PortGroupProperties().withName("wxn") - .withPorts(Arrays.asList("hnoyrzaaoeeh", "mjenvjeatea", "xc")), - new PortGroupProperties().withName("oxdjxldnaryy") - .withPorts(Arrays.asList("kd", "lrndwdbvxvza", "edoyqxlunkft", "mcxqqxmyzklao")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("hrvmzrqrazadi") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("aslkskhjqjpvba", "hxjtgzgtai")), - new IpGroupProperties().withName("b") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("gbsfsgsaenwldf", "hljqlxsp", "rjc")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("dsxebuhsxrz") - .withVlans(Arrays.asList("sdaluyckhefrbhs", "uerbgpxebjl", "dcaytujraxd")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("jmgtnsew").withPorts(Arrays.asList("ly")), - new PortGroupProperties().withName("vvyljurkepose") - .withPorts(Arrays.asList("ylmpctwjwdsd", "zmk", "erxxxoteehkhowgo", "vvh")), - new PortGroupProperties().withName("wpcbapnpxr") - .withPorts(Arrays.asList("wbmpspfeylqloc", "vujex")))))) - .withAnnotation("glxrkgjnm"); + NetworkTapRuleInner model + = new NetworkTapRuleInner().withLocation("rmzgccynb") + .withTags(mapOf("hedmm", "si", "xtzayqwddig", "oneeyrxpa", "wwveeozbjkjq", "blsplzdss", + "ltssjdywbnklge", "izdnuehx")) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("cmcgmlmpnvq", new UserAssignedIdentity(), "xo", new UserAssignedIdentity()))) + .withAnnotation("owynj") + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("zmxuktdrsjtmnk") + .withIdentitySelector( + new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("w")) + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("dtstia") + .withSequenceNumber(6699511414705281945L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("qbcmlroiomme", "soq", "blcyeqdobobaq", "abebckc")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("pjcxbjgfm", "qyyfrridzfpsfyak", "dfhmlx", "q")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) + .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) + .withTruncate("afzvptriysjrg") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("puqpsrcekdvvo") + .withMatchConfigurationName("wedggwgc"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("bwatz") + .withSequenceNumber(2676877168964118174L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("rwiemzcyni")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.SCTP)), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("rqw", "pz")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("tkmlfupjzcxx") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("yxjg") + .withMatchConfigurationName("xuerrda"), + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("tkbcer") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("pvfqjckmpwyv") + .withMatchConfigurationName("nhhcikh"))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("ylsacagif") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("otohzwtoidhbx")), + new IpGroupProperties().withName("rapwzhlutjsj") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("iemv", "pmeakosysycv", "de", "hcbsaipusuo")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("bvbbdledff") + .withVlans(Arrays.asList("sluazz", "f", "veugpx")), + new VlanGroupProperties().withName("empupbscboxra") + .withVlans(Arrays.asList("zmrjgo", "ekxeheowseca", "drzzbskiwrjsb")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("eesacuicnvqiqsu") + .withPorts(Arrays.asList("r", "aptndrmmnlhnk", "xrqkekcdavi")), + new PortGroupProperties().withName("beqrfzavqymcwts") + .withPorts(Arrays.asList("eplbrzgkuorwpqbs", "weobptscr", "ykk", "elayynoyjyfls")), + new PortGroupProperties().withName("bnlyoifgdfzj") + .withPorts(Arrays.asList("ykcv", "evcw", "zotkx")), + new PortGroupProperties().withName("wwooxgbsdzcg").withPorts(Arrays.asList("pjhubdmgo")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("ujcqgzwvxwiu") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("jklqrljdcukyla", "rjiqoqovqhgphgxu", "ud")), + new IpGroupProperties().withName("yqruvumryddnqiva") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("njze", "picciyoypoe", "ks", "w")), + new IpGroupProperties().withName("bpybqeigxuyxsxte") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("nf", "fnhcg", "aqsr", "rfqd")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("g") + .withVlans(Arrays.asList("obpmgqlw", "qznbb", "zposzfu")), + new VlanGroupProperties().withName("pbygbnbcmoiq") + .withVlans(Arrays.asList("pvqewflwz", "xzuxerxh", "wl", "kqsqvvdkfp")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("jd") + .withPorts(Arrays.asList("mxxyfrdjid", "etfvgwfw", "ld", "gwouppvyddqsvc")), + new PortGroupProperties().withName("snxfrppwwqc") + .withPorts(Arrays.asList("mtfx", "epzpxzxlcqzfxai", "iqmcjb", "mkirpqn")), + new PortGroupProperties().withName("udmhkcomeobwk") + .withPorts(Arrays.asList("ltenlbfxlm", "ozesn", "oduomtxjbrixym")), + new PortGroupProperties().withName("ikkqyvurhwishyfm") + .withPorts(Arrays.asList("qfev", "kyakcktehognsddj", "kde", "esu")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("fcnxc") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tcqxmyvkxixypavi")), + new IpGroupProperties().withName("czgo") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("wichmxczby")), + new IpGroupProperties().withName("ocgmzdcts") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("rngtwgxr", "lwvpl", "sdksut")))) + .withVlanGroups( + Arrays.asList(new VlanGroupProperties().withName("tih").withVlans(Arrays.asList("shbvjh")), + new VlanGroupProperties().withName("pmqququxl") + .withVlans(Arrays.asList("grxlexoweorocrqi")))) + .withPortGroups( + Arrays.asList( + new PortGroupProperties().withName("tgbqpfyrv") + .withPorts(Arrays.asList("ijvwmrgcnzhrp", "cxfmbzquuutqmhb", "qyzycgcm", + "kygvxjdqosxzmd")), + new PortGroupProperties().withName("ybqfufkekzfkicxh") + .withPorts(Arrays.asList("mnkg", "hvsr", "jokvlwvbjsa", "xsv")), + new PortGroupProperties().withName("pabwbpzgfgqpudhg") + .withPorts(Arrays.asList("eabbfpxxavlo", "ukgsn", "hw", "xj")))))) + .withPollingIntervalInSeconds(1810756619) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("bjkjge")); model = BinaryData.fromObject(model).toObject(NetworkTapRuleInner.class); - Assertions.assertEquals("aslavxj", model.location()); - Assertions.assertEquals("o", model.tags().get("pieidzlvssqy")); - Assertions.assertEquals(PollingIntervalInSeconds.NINE_ZERO, model.pollingIntervalInSeconds()); + Assertions.assertEquals("rmzgccynb", model.location()); + Assertions.assertEquals("si", model.tags().get("hedmm")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("owynj", model.annotation()); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("fooy", model.tapRulesUrl()); - Assertions.assertEquals("dtzcqi", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3768764619279475619L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("zmxuktdrsjtmnk", model.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("w", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("dtstia", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6699511414705281945L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xlantolamlbijuxk", + Assertions.assertEquals("qbcmlroiomme", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, + Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.TCP, + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("wxsuy", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("afzvptriysjrg", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("rfgslglhpry", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("zihuioaeo", + Assertions.assertEquals("puqpsrcekdvvo", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("wedggwgc", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("katprytgrhzbq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("ylsacagif", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wrp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ht", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("zcttbqgdirdam", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("cgytoxuw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nzqsaqmebgszpl", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("glxrkgjnm", model.annotation()); + Assertions.assertEquals("otohzwtoidhbx", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("bvbbdledff", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("sluazz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("eesacuicnvqiqsu", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("r", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(1810756619, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("bjkjge", model.globalNetworkTapRuleActions().truncate()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java new file mode 100644 index 000000000000..5513333e1b7e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleMatchConditionPatch model = BinaryData.fromString( + "{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"bboffgxtae\",\"xt\",\"fcyatbxdwr\",\"yvtkmxvztshnu\"],\"portGroupNames\":[\"peigkflvovri\"]},\"protocolTypes\":[\"z\",\"bkqcgz\",\"gtdjhtbarptxurs\",\"oyyumhzps\"],\"vlanMatchCondition\":{\"vlans\":[\"acvt\"],\"innerVlans\":[\"pbilnszyjbuw\",\"uusydscizv\",\"ayioxpqgqs\",\"l\"],\"vlanGroupNames\":[\"feombodvdgfuakqs\",\"ym\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"yuq\",\"tc\"],\"ipGroupNames\":[\"bpkfnxrlncmlz\",\"vrmesfhqsac\",\"qzr\",\"vfwcbawapndm\"]}}") + .toObject(NetworkTapRuleMatchConditionPatch.class); + Assertions.assertEquals("z", model.protocolTypes().get(0)); + Assertions.assertEquals("acvt", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("pbilnszyjbuw", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("feombodvdgfuakqs", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("yuq", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("bpkfnxrlncmlz", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("bboffgxtae", model.portCondition().ports().get(0)); + Assertions.assertEquals("peigkflvovri", model.portCondition().portGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleMatchConditionPatch model = new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("z", "bkqcgz", "gtdjhtbarptxurs", "oyyumhzps")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("acvt")) + .withInnerVlans(Arrays.asList("pbilnszyjbuw", "uusydscizv", "ayioxpqgqs", "l")) + .withVlanGroupNames(Arrays.asList("feombodvdgfuakqs", "ym"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("yuq", "tc")) + .withIpGroupNames(Arrays.asList("bpkfnxrlncmlz", "vrmesfhqsac", "qzr", "vfwcbawapndm"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("bboffgxtae", "xt", "fcyatbxdwr", "yvtkmxvztshnu")) + .withPortGroupNames(Arrays.asList("peigkflvovri"))); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConditionPatch.class); + Assertions.assertEquals("z", model.protocolTypes().get(0)); + Assertions.assertEquals("acvt", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("pbilnszyjbuw", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("feombodvdgfuakqs", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("yuq", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("bpkfnxrlncmlz", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("bboffgxtae", model.portCondition().ports().get(0)); + Assertions.assertEquals("peigkflvovri", model.portCondition().portGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java index 3a141f3e42e5..095507a038c4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -21,53 +21,53 @@ public final class NetworkTapRuleMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleMatchCondition model = BinaryData.fromString( - "{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"gyxzmxynofxl\"],\"portGroupNames\":[\"oqxt\",\"nzujsji\",\"krpskcjhmm\"]},\"protocolTypes\":[\"nivdqtkyk\",\"axnlsfgnysca\",\"cptbzetxygxxicee\"],\"vlanMatchCondition\":{\"vlans\":[\"yuveoxmpz\",\"wahdrdvhaztkxbi\",\"zfgxmbry\"],\"innerVlans\":[\"ibio\",\"iqsykqfdqwdrt\"],\"vlanGroupNames\":[\"daglmrcok\",\"zertkounz\",\"iywhubymfpop\",\"k\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wt\"],\"ipGroupNames\":[\"w\"]}}") + "{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"vfccozvqxsphtr\",\"i\",\"rmsukx\",\"uytgcptctxpo\"],\"portGroupNames\":[\"ckm\",\"mfvrcclclfkf\",\"yjom\"]},\"protocolTypes\":[\"vpoip\",\"ylxtebvse\"],\"vlanMatchCondition\":{\"vlans\":[\"vpaysqw\",\"zdcyandblkbnt\",\"vpvdfmo\",\"qctfvxu\"],\"innerVlans\":[\"pff\",\"pjpjmsbzzjsnyf\",\"wyjzuakkiubeqk\",\"ttlrglhxs\"],\"vlanGroupNames\":[\"guhbnhogsezreneg\",\"pdtyzp\",\"litw\",\"ejm\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"hskvsdfvhrypezam\",\"pkapvnpeukgnmf\",\"keq\"],\"ipGroupNames\":[\"romlcs\",\"kt\",\"psrowshvf\"]}}") .toObject(NetworkTapRuleMatchCondition.class); - Assertions.assertEquals("nivdqtkyk", model.protocolTypes().get(0)); - Assertions.assertEquals("yuveoxmpz", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ibio", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("daglmrcok", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals("vpoip", model.protocolTypes().get(0)); + Assertions.assertEquals("vpaysqw", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("pff", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("guhbnhogsezreneg", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("wt", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("w", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("gyxzmxynofxl", model.portCondition().ports().get(0)); - Assertions.assertEquals("oqxt", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("hskvsdfvhrypezam", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("romlcs", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.GTPV1, model.encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("vfccozvqxsphtr", model.portCondition().ports().get(0)); + Assertions.assertEquals("ckm", model.portCondition().portGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleMatchCondition model = new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("nivdqtkyk", "axnlsfgnysca", "cptbzetxygxxicee")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("yuveoxmpz", "wahdrdvhaztkxbi", "zfgxmbry")) - .withInnerVlans(Arrays.asList("ibio", "iqsykqfdqwdrt")) - .withVlanGroupNames(Arrays.asList("daglmrcok", "zertkounz", "iywhubymfpop", "k"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("wt")) - .withIpGroupNames(Arrays.asList("w"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("gyxzmxynofxl")) - .withPortGroupNames(Arrays.asList("oqxt", "nzujsji", "krpskcjhmm"))); + NetworkTapRuleMatchCondition model + = new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("vpoip", "ylxtebvse")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("vpaysqw", "zdcyandblkbnt", "vpvdfmo", "qctfvxu")) + .withInnerVlans(Arrays.asList("pff", "pjpjmsbzzjsnyf", "wyjzuakkiubeqk", "ttlrglhxs")) + .withVlanGroupNames(Arrays.asList("guhbnhogsezreneg", "pdtyzp", "litw", "ejm"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("hskvsdfvhrypezam", "pkapvnpeukgnmf", "keq")) + .withIpGroupNames(Arrays.asList("romlcs", "kt", "psrowshvf"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("vfccozvqxsphtr", "i", "rmsukx", "uytgcptctxpo")) + .withPortGroupNames(Arrays.asList("ckm", "mfvrcclclfkf", "yjom"))); model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchCondition.class); - Assertions.assertEquals("nivdqtkyk", model.protocolTypes().get(0)); - Assertions.assertEquals("yuveoxmpz", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ibio", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("daglmrcok", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals("vpoip", model.protocolTypes().get(0)); + Assertions.assertEquals("vpaysqw", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("pff", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("guhbnhogsezreneg", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("wt", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("w", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("gyxzmxynofxl", model.portCondition().ports().get(0)); - Assertions.assertEquals("oqxt", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("hskvsdfvhrypezam", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("romlcs", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.GTPV1, model.encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("vfccozvqxsphtr", model.portCondition().ports().get(0)); + Assertions.assertEquals("ckm", model.portCondition().portGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..91228eda3b20 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleMatchConfigurationPatch model = BinaryData.fromString( + "{\"matchConfigurationName\":\"jxkmpe\",\"sequenceNumber\":371540504965913583,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"rfe\",\"zunbua\"],\"portGroupNames\":[\"ubukqmierzrnob\",\"vequzytapgzdhz\",\"jecdsysxnku\"]},\"protocolTypes\":[\"nlsevzcrrwnkk\",\"dwqymxsfqe\"],\"vlanMatchCondition\":{\"vlans\":[\"eluvmsa\"],\"innerVlans\":[\"iaw\",\"q\"],\"vlanGroupNames\":[\"hvvzfznfgpbc\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"jieask\",\"kqclnfusr\"],\"ipGroupNames\":[\"skkhbm\",\"phlyyuahvyeikb\",\"qzrurgbqa\",\"cpckxjnohafwm\"]}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"xtugpeamet\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"famtxccfegsavbgh\",\"matchConfigurationName\":\"cvka\"},{\"type\":\"Drop\",\"truncate\":\"oimazkmqfwbg\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ybfmpotal\",\"matchConfigurationName\":\"figrxxtrco\"},{\"type\":\"Goto\",\"truncate\":\"ogldmxxb\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"vamsxrwq\",\"matchConfigurationName\":\"dflg\"}]}") + .toObject(NetworkTapRuleMatchConfigurationPatch.class); + Assertions.assertEquals("jxkmpe", model.matchConfigurationName()); + Assertions.assertEquals(371540504965913583L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("nlsevzcrrwnkk", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("eluvmsa", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("iaw", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("hvvzfznfgpbc", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("jieask", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("skkhbm", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("rfe", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("ubukqmierzrnob", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("xtugpeamet", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("famtxccfegsavbgh", model.actions().get(0).destinationId()); + Assertions.assertEquals("cvka", model.actions().get(0).matchConfigurationName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleMatchConfigurationPatch model + = new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("jxkmpe") + .withSequenceNumber(371540504965913583L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("nlsevzcrrwnkk", "dwqymxsfqe")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("eluvmsa")) + .withInnerVlans(Arrays.asList("iaw", "q")) + .withVlanGroupNames(Arrays.asList("hvvzfznfgpbc"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("jieask", "kqclnfusr")) + .withIpGroupNames(Arrays.asList("skkhbm", "phlyyuahvyeikb", "qzrurgbqa", "cpckxjnohafwm"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("rfe", "zunbua")) + .withPortGroupNames(Arrays.asList("ubukqmierzrnob", "vequzytapgzdhz", "jecdsysxnku"))))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.LOG) + .withTruncate("xtugpeamet") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("famtxccfegsavbgh") + .withMatchConfigurationName("cvka"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("oimazkmqfwbg") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("ybfmpotal") + .withMatchConfigurationName("figrxxtrco"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.GOTO) + .withTruncate("ogldmxxb") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("vamsxrwq") + .withMatchConfigurationName("dflg"))); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConfigurationPatch.class); + Assertions.assertEquals("jxkmpe", model.matchConfigurationName()); + Assertions.assertEquals(371540504965913583L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("nlsevzcrrwnkk", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("eluvmsa", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("iaw", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("hvvzfznfgpbc", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("jieask", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("skkhbm", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("rfe", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("ubukqmierzrnob", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.LOG, model.actions().get(0).type()); + Assertions.assertEquals("xtugpeamet", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("famtxccfegsavbgh", model.actions().get(0).destinationId()); + Assertions.assertEquals("cvka", model.actions().get(0).matchConfigurationName()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java index a02a2a2b319a..278bb405368b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -26,125 +26,93 @@ public final class NetworkTapRuleMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleMatchConfiguration model = BinaryData.fromString( - "{\"matchConfigurationName\":\"gajkrdyddtpfcud\",\"sequenceNumber\":6115763777753559706,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"kordw\",\"ejpec\"],\"portGroupNames\":[\"cmbpwdlu\",\"ayprldid\",\"mtffbvtzldzchuba\"]},\"protocolTypes\":[\"l\",\"uvigv\",\"ghfrbzakpjtcq\"],\"vlanMatchCondition\":{\"vlans\":[\"ojpsucm\",\"imcwqxynqjgsa\",\"kyvscbgngcrus\",\"hirc\"],\"innerVlans\":[\"vsvkkjbjolpyo\",\"lkvuznadvh\"],\"vlanGroupNames\":[\"eoigowxxbhtpsyio\",\"emqwtq\",\"zzgyksikawan\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"crbkompnbnfgywe\",\"jbepgcmah\",\"wfryawkchkap\",\"tsk\"],\"ipGroupNames\":[\"yfttibjepzwhju\",\"fdgbggcjxzhbl\",\"vwehsu\",\"ym\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ngkqlgxzduvxd\"],\"portGroupNames\":[\"xatm\",\"mnrs\",\"nxoirxy\"]},\"protocolTypes\":[\"iploisjkzsoxznnt\",\"gkvyoh\"],\"vlanMatchCondition\":{\"vlans\":[\"zupzwwyt\",\"djzghximkg\"],\"innerVlans\":[\"pqkjnpyriwntotcx\",\"mqmtsjky\"],\"vlanGroupNames\":[\"xwdonbexftedau\",\"h\",\"eggzgrn\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"mrtgjq\",\"acan\"],\"ipGroupNames\":[\"yxzxjmkanbclazof\",\"exvtemasp\",\"anydsc\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"bhaah\",\"tofelfhpfixo\"],\"portGroupNames\":[\"z\",\"fivsujybsr\"]},\"protocolTypes\":[\"mr\",\"t\",\"dhmfppinm\",\"ikesmkwtzgfr\"],\"vlanMatchCondition\":{\"vlans\":[\"xerxlobkdb\",\"qhvmmniiqy\",\"olhjnskbggicn\",\"wlctmwp\"],\"innerVlans\":[\"krkqgvxrktjc\",\"igcwtspanbqxase\",\"chefpgeed\"],\"vlanGroupNames\":[\"ruholae\",\"wcgi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"sqqlonbzaow\"],\"ipGroupNames\":[\"dkmbjsmihrijez\",\"fsjwfcz\",\"lkvbgukbsv\",\"wyo\"]}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"nhjgclxaxwcffasp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ucszgh\",\"matchConfigurationName\":\"aqipmnxclfrsbzrn\"},{\"type\":\"Drop\",\"truncate\":\"vp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"dtbfmekjc\",\"matchConfigurationName\":\"inxd\"}]}") + "{\"matchConfigurationName\":\"v\",\"sequenceNumber\":5591618762734770844,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"kjvdryknkxiox\",\"nrjlqdoqejexf\",\"lhuhdkubgyw\"],\"portGroupNames\":[\"klpdyehjrwcflvx\",\"ocaywmfvuhz\",\"olhve\",\"lngsfmh\"]},\"protocolTypes\":[\"qupy\",\"lhklmnj\",\"zmqyn\",\"itrnwqgqrbth\"],\"vlanMatchCondition\":{\"vlans\":[\"qnrjoco\",\"wfvkywzrq\",\"iadd\",\"khuvnl\"],\"innerVlans\":[\"nutiexmi\",\"unzbq\"],\"vlanGroupNames\":[\"ynctfqhh\",\"vwzprjaaaiai\",\"tvavlyaqtl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"vzuzqcrl\",\"o\"],\"ipGroupNames\":[\"zgyhen\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"cowmhn\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ywjiaaosla\",\"matchConfigurationName\":\"gwaakktbjortz\"},{\"type\":\"Goto\",\"truncate\":\"qhsnsejplislxyl\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"dw\",\"matchConfigurationName\":\"jwxgvtkjct\"}]}") .toObject(NetworkTapRuleMatchConfiguration.class); - Assertions.assertEquals("gajkrdyddtpfcud", model.matchConfigurationName()); - Assertions.assertEquals(6115763777753559706L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("l", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("ojpsucm", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vsvkkjbjolpyo", - model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eoigowxxbhtpsyio", + Assertions.assertEquals("v", model.matchConfigurationName()); + Assertions.assertEquals(5591618762734770844L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("qupy", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("qnrjoco", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("nutiexmi", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("ynctfqhh", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("crbkompnbnfgywe", - model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("yfttibjepzwhju", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("vzuzqcrl", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("zgyhen", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("kordw", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("cmbpwdlu", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.REPLICATE, model.actions().get(0).type()); - Assertions.assertEquals("nhjgclxaxwcffasp", model.actions().get(0).truncate()); + Assertions.assertEquals("kjvdryknkxiox", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("klpdyehjrwcflvx", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.MIRROR, model.actions().get(0).type()); + Assertions.assertEquals("cowmhn", model.actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("ucszgh", model.actions().get(0).destinationId()); - Assertions.assertEquals("aqipmnxclfrsbzrn", model.actions().get(0).matchConfigurationName()); + Assertions.assertEquals("ywjiaaosla", model.actions().get(0).destinationId()); + Assertions.assertEquals("gwaakktbjortz", model.actions().get(0).matchConfigurationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapRuleMatchConfiguration model - = new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("gajkrdyddtpfcud") - .withSequenceNumber(6115763777753559706L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("l", "uvigv", "ghfrbzakpjtcq")) + = new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("v") + .withSequenceNumber(5591618762734770844L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions( + Arrays + .asList(new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("qupy", "lhklmnj", "zmqyn", "itrnwqgqrbth")) .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("ojpsucm", "imcwqxynqjgsa", "kyvscbgngcrus", "hirc")) - .withInnerVlans(Arrays.asList("vsvkkjbjolpyo", "lkvuznadvh")) - .withVlanGroupNames(Arrays.asList("eoigowxxbhtpsyio", "emqwtq", "zzgyksikawan"))) + .withVlans(Arrays.asList("qnrjoco", "wfvkywzrq", "iadd", "khuvnl")) + .withInnerVlans(Arrays.asList("nutiexmi", "unzbq")) + .withVlanGroupNames(Arrays.asList("ynctfqhh", "vwzprjaaaiai", "tvavlyaqtl"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("crbkompnbnfgywe", "jbepgcmah", "wfryawkchkap", "tsk")) - .withIpGroupNames(Arrays.asList("yfttibjepzwhju", "fdgbggcjxzhbl", "vwehsu", "ym"))) + .withIpPrefixValues(Arrays.asList("vzuzqcrl", "o")) + .withIpGroupNames(Arrays.asList("zgyhen"))) .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("kordw", "ejpec")) - .withPortGroupNames(Arrays.asList("cmbpwdlu", "ayprldid", "mtffbvtzldzchuba"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("iploisjkzsoxznnt", "gkvyoh")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("zupzwwyt", "djzghximkg")) - .withInnerVlans(Arrays.asList("pqkjnpyriwntotcx", "mqmtsjky")) - .withVlanGroupNames(Arrays.asList("xwdonbexftedau", "h", "eggzgrn"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("mrtgjq", "acan")) - .withIpGroupNames(Arrays.asList("yxzxjmkanbclazof", "exvtemasp", "anydsc"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("ngkqlgxzduvxd")) - .withPortGroupNames(Arrays.asList("xatm", "mnrs", "nxoirxy"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("mr", "t", "dhmfppinm", "ikesmkwtzgfr")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("xerxlobkdb", "qhvmmniiqy", "olhjnskbggicn", "wlctmwp")) - .withInnerVlans(Arrays.asList("krkqgvxrktjc", "igcwtspanbqxase", "chefpgeed")) - .withVlanGroupNames(Arrays.asList("ruholae", "wcgi"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("sqqlonbzaow")) - .withIpGroupNames(Arrays.asList("dkmbjsmihrijez", "fsjwfcz", "lkvbgukbsv", "wyo"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("bhaah", "tofelfhpfixo")) - .withPortGroupNames(Arrays.asList("z", "fivsujybsr"))))) + .withPorts(Arrays.asList("kjvdryknkxiox", "nrjlqdoqejexf", "lhuhdkubgyw")) + .withPortGroupNames( + Arrays.asList("klpdyehjrwcflvx", "ocaywmfvuhz", "olhve", "lngsfmh"))))) .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) - .withTruncate("nhjgclxaxwcffasp") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("ucszgh") - .withMatchConfigurationName("aqipmnxclfrsbzrn"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("vp") + new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) + .withTruncate("cowmhn") .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("dtbfmekjc") - .withMatchConfigurationName("inxd"))); + .withDestinationId("ywjiaaosla") + .withMatchConfigurationName("gwaakktbjortz"), + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("qhsnsejplislxyl") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("dw") + .withMatchConfigurationName("jwxgvtkjct"))); model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConfiguration.class); - Assertions.assertEquals("gajkrdyddtpfcud", model.matchConfigurationName()); - Assertions.assertEquals(6115763777753559706L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("l", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("ojpsucm", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vsvkkjbjolpyo", - model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eoigowxxbhtpsyio", + Assertions.assertEquals("v", model.matchConfigurationName()); + Assertions.assertEquals(5591618762734770844L, model.sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("qupy", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("qnrjoco", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("nutiexmi", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("ynctfqhh", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("crbkompnbnfgywe", - model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("yfttibjepzwhju", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("vzuzqcrl", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("zgyhen", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("kordw", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("cmbpwdlu", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.REPLICATE, model.actions().get(0).type()); - Assertions.assertEquals("nhjgclxaxwcffasp", model.actions().get(0).truncate()); + Assertions.assertEquals("kjvdryknkxiox", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("klpdyehjrwcflvx", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.MIRROR, model.actions().get(0).type()); + Assertions.assertEquals("cowmhn", model.actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("ucszgh", model.actions().get(0).destinationId()); - Assertions.assertEquals("aqipmnxclfrsbzrn", model.actions().get(0).matchConfigurationName()); + Assertions.assertEquals("ywjiaaosla", model.actions().get(0).destinationId()); + Assertions.assertEquals("gwaakktbjortz", model.actions().get(0).matchConfigurationName()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java index 763b77b83308..ee297c4bddc8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java @@ -1,30 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRulePatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -32,420 +35,258 @@ public final class NetworkTapRulePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRulePatchProperties model = BinaryData.fromString( - "{\"configurationType\":\"File\",\"tapRulesUrl\":\"rmhnmizhvpr\",\"matchConfigurations\":[{\"matchConfigurationName\":\"cubleh\",\"sequenceNumber\":1571375428500855687,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"zigh\"],\"portGroupNames\":[\"b\",\"dvucfvvra\"]},\"protocolTypes\":[\"urdeewlsuxp\",\"bwkdwjyjiznioroo\",\"m\"],\"vlanMatchCondition\":{\"vlans\":[\"pmcreihu\",\"trnighm\",\"nuwqxungro\",\"gwfmsxjwdylwxm\"],\"innerVlans\":[\"ow\"],\"vlanGroupNames\":[\"eerclbltbhpw\",\"chy\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"r\",\"vdifkiikg\"],\"ipGroupNames\":[\"ccwmecbtxsytrtex\",\"gwmrqjywiwhvy\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"loqkajwjuri\",\"rsbcl\"],\"portGroupNames\":[\"hzcknjxiz\",\"axdy\",\"zkz\"]},\"protocolTypes\":[\"e\",\"wacyyjmlxppdndzk\"],\"vlanMatchCondition\":{\"vlans\":[\"iiuiibf\"],\"innerVlans\":[\"ytqdcizeqqfop\",\"nopm\",\"tdsfh\",\"xqlyoazyfbkmvl\"],\"vlanGroupNames\":[\"x\",\"jzsvmaigb\",\"kvhyejth\",\"eecbpergwlc\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"sokknpugzjwdizc\",\"jixiujzkc\",\"exgkrsw\"],\"ipGroupNames\":[\"kkbxktxbbwlmnw\",\"okn\",\"uqddlggbqaolgzu\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"cmfnsffet\",\"kmixwewzls\",\"gsmepnqvxgvoh\",\"bthhxmoevvude\"],\"portGroupNames\":[\"hgannvwxqhpjhub\",\"hxvzgayb\",\"rhhogalgxnw\",\"mzvztauebpa\"]},\"protocolTypes\":[\"fcssanybzzghvd\"],\"vlanMatchCondition\":{\"vlans\":[\"yj\",\"v\",\"dhlywkho\"],\"innerVlans\":[\"unzxezriw\",\"oewapcqksaaapxjh\",\"itibenwsdf\"],\"vlanGroupNames\":[\"aahlfr\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"pireszyaqgomlbmf\",\"geokfekcjj\"],\"ipGroupNames\":[\"yeahhhutpulnrfcq\",\"fmcihpinowr\",\"rjpxptch\"]}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"dqimlgbbfjm\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xlhmpmhef\",\"matchConfigurationName\":\"aphqeofytl\"},{\"type\":\"Goto\",\"truncate\":\"wmcm\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"uanccq\",\"matchConfigurationName\":\"fdgfqpmquxpj\"},{\"type\":\"Log\",\"truncate\":\"arad\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"mufzgugrbl\",\"matchConfigurationName\":\"l\"},{\"type\":\"Mirror\",\"truncate\":\"nqebaotbptgc\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xxrwqfmdqecvtamq\",\"matchConfigurationName\":\"mnobfeww\"}]},{\"matchConfigurationName\":\"ibxovu\",\"sequenceNumber\":7832491699982446512,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"cvtqnzjcyqqzhemb\",\"bwna\",\"ba\"],\"portGroupNames\":[\"sjdle\"]},\"protocolTypes\":[\"mvvlooubs\",\"xipjeopskgocjom\",\"upfazusj\",\"dhuslgdwz\"],\"vlanMatchCondition\":{\"vlans\":[\"yxajc\",\"grcavqc\"],\"innerVlans\":[\"oqzkmqcwwsjnki\"],\"vlanGroupNames\":[\"pbntqqwwgf\",\"sqxile\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ne\",\"uqynttwk\"],\"ipGroupNames\":[\"jksb\",\"yogjmqjh\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"vjbssfcriqxz\",\"xtdlxwmvcdkucp\"],\"portGroupNames\":[\"afr\",\"rgorogeuvmkrspn\"]},\"protocolTypes\":[\"semlzofrsnq\",\"ljpetexutikelpmw\"],\"vlanMatchCondition\":{\"vlans\":[\"bwudhvosgjzs\"],\"innerVlans\":[\"zalivdfwgq\",\"hewcffrx\",\"gezkhzpriqisse\"],\"vlanGroupNames\":[\"rusyzai\",\"npsjnpc\",\"plujyduonb\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"vvm\",\"bkxjar\",\"bbdddwokqx\"],\"ipGroupNames\":[\"xqkdyqjvzvcgrds\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"uhvz\",\"lbrouszxac\",\"wukokgoojj\"],\"portGroupNames\":[\"tubcmu\",\"h\",\"btzvxxv\"]},\"protocolTypes\":[\"uufkrfnkcnihkswx\",\"furqm\"],\"vlanMatchCondition\":{\"vlans\":[\"pntumotahb\",\"svnkxmyt\",\"u\"],\"innerVlans\":[\"rlhxgcqmyrhkv\",\"zzmiemqyft\"],\"vlanGroupNames\":[\"oswgfqvj\",\"ghpakbqyhlsorn\",\"b\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"jm\"],\"ipGroupNames\":[\"yevztnjaw\",\"hul\",\"mmqmbwppx\",\"rxbkitzmnhitax\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"lxsgcemegdz\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"jubvfjyzuf\",\"matchConfigurationName\":\"ifnivlut\"},{\"type\":\"Count\",\"truncate\":\"acxauh\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xhklsqxt\",\"matchConfigurationName\":\"yygktsrjyxxoxwf\"}]},{\"matchConfigurationName\":\"kvecnxfx\",\"sequenceNumber\":6127027006710190293,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"uwmsu\",\"ustihtgrafjajvky\",\"mmjczvog\",\"derjennmk\"],\"portGroupNames\":[\"uwqdwxhhlbmyphf\"]},\"protocolTypes\":[\"pdhewokyqs\",\"kx\",\"sy\"],\"vlanMatchCondition\":{\"vlans\":[\"qbtodjfy\",\"bvkvwzdmvdd\",\"wcrugyozzz\",\"wnjdvvlrh\"],\"innerVlans\":[\"kkvxu\",\"dqzbvbpsuvqhx\",\"ozf\"],\"vlanGroupNames\":[\"wbkurklpiigf\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"pjclzjwaqdzqyd\",\"wuwxyllz\",\"zevtzqwczoc\"],\"ipGroupNames\":[\"ekmuynfpkyvnhiy\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"raqkiwlw\"],\"portGroupNames\":[\"la\",\"wmwqoguflte\",\"t\"]},\"protocolTypes\":[\"ef\",\"jxnjtqbgy\"],\"vlanMatchCondition\":{\"vlans\":[\"hnvxwtd\",\"tcbjdbtqy\",\"kxunsaujqgbb\",\"vovoa\"],\"innerVlans\":[\"js\",\"bc\"],\"vlanGroupNames\":[\"ygsa\",\"d\",\"d\",\"e\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kzvzuatqhgzuyxtr\",\"fdbqskgqjbvitp\"],\"ipGroupNames\":[\"sffavdhpiwrmuwk\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"bwxyldqtmggcpd\",\"megaj\",\"zctwymzsk\",\"qkkge\"],\"portGroupNames\":[\"phgliupqscoobk\",\"lcaxsqcomjiqi\"]},\"protocolTypes\":[\"evxxkdevpximzii\",\"meqmduvtvodqxxpq\",\"ml\",\"ibtblmcvrjazno\"],\"vlanMatchCondition\":{\"vlans\":[\"qvpbq\",\"dqk\",\"sb\",\"sbbmitaftazgcx\"],\"innerVlans\":[\"lcqufylamxow\"],\"vlanGroupNames\":[\"joyutehlkarvtipq\",\"ksxiknsgofunswh\",\"cekggvmfnnb\",\"xn\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"etxtpw\",\"vgifws\",\"njzijaciwm\"],\"ipGroupNames\":[\"tqdonbzzs\",\"fzyviiwsua\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"uifkzqqhb\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ilm\",\"matchConfigurationName\":\"beoiip\"},{\"type\":\"Goto\",\"truncate\":\"vyvuoikdlpsx\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"fwimqnryclocfmv\",\"matchConfigurationName\":\"xvjeleifqhdxtww\"},{\"type\":\"Drop\",\"truncate\":\"ybpaevykbyjecrq\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"kchsfoul\",\"matchConfigurationName\":\"rcxuibsdqbdyblp\"},{\"type\":\"Mirror\",\"truncate\":\"m\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"eoqhbjql\",\"matchConfigurationName\":\"bleru\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"hjucihbymjj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rxvjeazrahelhb\"]}],\"vlanGroups\":[{\"name\":\"ieqamcthtpqgf\",\"vlans\":[\"sizkdiuvflg\",\"hcw\"]},{\"name\":\"wahcrxofgrutv\",\"vlans\":[\"cxzivxpmhz\"]},{\"name\":\"hhkvnnjdtujqz\",\"vlans\":[\"jvpmxnht\",\"zstqlf\"]}],\"portGroups\":[{\"name\":\"wvtlgxy\",\"ports\":[\"wequfl\",\"yyopoaytwwgw\",\"ubotbvufrkw\",\"iemimdtn\"]},{\"name\":\"wew\",\"ports\":[\"reeedddrftfquul\",\"clhsiigeeuw\"]}]},{\"ipGroups\":[{\"name\":\"yxfedqnetd\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"oqgvbzpggp\",\"meyobqajejirvavr\",\"kgpogplbjuvlnh\"]},{\"name\":\"rnjhinaeges\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"qmjmoplukfyk\"]}],\"vlanGroups\":[{\"name\":\"ovadkrmjx\",\"vlans\":[\"pdkesjqbzkqmx\",\"poriwbwggijtspzj\",\"rrh\",\"kwsbzrhdugquh\"]},{\"name\":\"gzfrunjfhrjhi\",\"vlans\":[\"ause\",\"nczk\",\"ihvtuwyjsqw\"]},{\"name\":\"zoszjg\",\"vlans\":[\"kfnyskwwunqhc\",\"avoj\",\"slhip\"]}],\"portGroups\":[{\"name\":\"bljp\",\"ports\":[\"rvchyluqalp\"]},{\"name\":\"fjjfxtizt\",\"ports\":[\"tahhhsa\",\"xxsri\",\"rcwbaae\",\"yyefmxwoqotiiqb\"]},{\"name\":\"asrvrmtist\",\"ports\":[\"jhorlxkpy\",\"k\",\"nnycntrqxxwtd\"]}]},{\"ipGroups\":[{\"name\":\"tsuhqhtoxtd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"x\",\"qmzxsyaks\",\"npaami\"]},{\"name\":\"bgh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"bgchcgsfzhbjkiy\",\"qbjsdjpgxeysgw\",\"cfferznzc\"]},{\"name\":\"voveomkhfeqcoop\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"imgckycjpeebznbz\",\"xsuloutnpb\"]}],\"vlanGroups\":[{\"name\":\"qo\",\"vlans\":[\"ncdmwkh\",\"pfhsldqdza\",\"iunyevdyzdsytc\"]},{\"name\":\"swhcamwuy\",\"vlans\":[\"kcgsfcmvh\",\"drp\",\"atvyrkljqkqws\",\"jtvjkowggxawwd\"]}],\"portGroups\":[{\"name\":\"nkteiidlbovwbclp\",\"ports\":[\"gani\",\"kjcnerek\"]}]}],\"annotation\":\"uls\"}") + "{\"annotation\":\"voqatdjkaldpmec\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"zynf\",\"matchConfigurations\":[{\"matchConfigurationName\":\"qkkp\",\"sequenceNumber\":7534471053431600184,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"yvdsqxkjwd\"],\"portGroupNames\":[\"irzyudrq\",\"xrxhxmlfouqp\"]},\"protocolTypes\":[\"andbp\",\"rrhyjxcqcaczzvwa\",\"ztt\"],\"vlanMatchCondition\":{\"vlans\":[\"fydqlyyslg\",\"f\",\"bdsvkllrzhshhkb\",\"hcazkgdjth\"],\"innerVlans\":[\"fwhfzhhrurmrfyy\",\"jcnibz\",\"rsddcuqddldaoyv\"],\"vlanGroupNames\":[\"qewqjojesxjht\",\"zzw\",\"ocygoyineuaxpmez\",\"trgu\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"oafzdypzlxlmndh\",\"whlbpjuajz\",\"xav\"],\"ipGroupNames\":[\"nwlyhbujysvdty\",\"ddbhatmabt\"]}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"tn\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"wihcig\",\"matchConfigurationName\":\"hmdfspkdn\"},{\"type\":\"Replicate\",\"truncate\":\"xtert\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"wsciclhdwienv\",\"matchConfigurationName\":\"lzj\"}]},{\"matchConfigurationName\":\"kr\",\"sequenceNumber\":5377046984950331601,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ihbmwrvpvdr\",\"h\"],\"portGroupNames\":[\"bkabhvxjuaivx\"]},\"protocolTypes\":[\"rnygti\",\"kg\",\"obmkphvdlorxz\"],\"vlanMatchCondition\":{\"vlans\":[\"tudcltfci\",\"il\"],\"innerVlans\":[\"wtkehl\"],\"vlanGroupNames\":[\"jsxvbbwsgikkmi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"pwtgzwmzhcmrloqa\",\"styzavkyjjlu\"],\"ipGroupNames\":[\"bjqbngzldvvdkopt\",\"th\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"erwhemvids\",\"sfzsgzgus\"],\"portGroupNames\":[\"omeqg\",\"hwispsogd\"]},\"protocolTypes\":[\"jsbaqxaxtuxir\",\"pbiichlygkv\"],\"vlanMatchCondition\":{\"vlans\":[\"onkrni\",\"dxywabk\",\"tnipaptgv\",\"aqyjukkajnne\"],\"innerVlans\":[\"onopf\",\"emiwfhhawbabhzbf\",\"di\"],\"vlanGroupNames\":[\"xydgzfoi\",\"zsuspaywvslq\",\"ronzeafkxfmuwdb\",\"ytqavouymkdeu\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"kaxgbi\",\"pgo\",\"qlktthbmrrmtrx\"],\"ipGroupNames\":[\"pdvr\",\"zwawpewajc\",\"sdjuzmuijtickzo\"]}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"pxhhboigzxkop\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"htoc\",\"matchConfigurationName\":\"f\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"atzw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"iitvjcmimbmsw\",\"kbbbjoypplod\",\"qr\",\"kp\"]},{\"name\":\"ffsobg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"r\",\"ax\",\"mb\",\"tvt\"]},{\"name\":\"lmlplgt\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hxjvoysxaqqjhdfh\",\"aobqnjc\",\"bozvc\",\"qwssyd\"]}],\"vlanGroups\":[{\"name\":\"bivyw\",\"vlans\":[\"njuvtz\",\"j\",\"dlxbaeyocpkv\",\"tjfdzfmnpbdrc\"]}],\"portGroups\":[{\"name\":\"nnno\",\"ports\":[\"h\",\"dtuoamqobqe\",\"spshtis\"]},{\"name\":\"f\",\"ports\":[\"trzjwnzwckzebm\",\"vwdxgyypmxqzlm\",\"nxrcatkuhskegdk\",\"vii\"]}]},{\"ipGroups\":[{\"name\":\"hoxfzz\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"busxyugozwp\",\"xzgzum\"]},{\"name\":\"tiixkkbygbgi\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hybbnhttyizonzs\"]},{\"name\":\"qcojasfzhzzcarc\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ipdthjfvnhwsgns\",\"utfelfchn\",\"fssjgbfbbachxx\"]}],\"vlanGroups\":[{\"name\":\"nfnbphceeivkb\",\"vlans\":[\"epgh\",\"nuqhqp\",\"t\"]}],\"portGroups\":[{\"name\":\"sclggagygn\",\"ports\":[\"ytnhdni\",\"uzzj\",\"zvwgbzdt\"]},{\"name\":\"biwny\",\"ports\":[\"pxctsucrxd\"]}]},{\"ipGroups\":[{\"name\":\"bjzrlwtid\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"g\",\"pupjhltylyuudvbg\"]}],\"vlanGroups\":[{\"name\":\"jsbkpcut\",\"vlans\":[\"iydpoknseaimb\",\"qraokdarluobbval\",\"wzknyujxysv\",\"lfjyclvi\"]},{\"name\":\"lffll\",\"vlans\":[\"mtxfqpfi\",\"dcgbfouzf\",\"pgcryvidbzdylbvj\",\"tgngwnxjftecg\"]},{\"name\":\"zsqmpdqcakzbyqh\",\"vlans\":[\"hxoyxuu\"]},{\"name\":\"lusyruxrz\",\"vlans\":[\"hrvmgsbpgmncr\",\"tpiforomppz\",\"a\",\"qmeu\"]}],\"portGroups\":[{\"name\":\"cmpu\",\"ports\":[\"goce\",\"tlyspjymwicc\",\"rncfu\",\"lakgixhqjqhgqwbb\"]},{\"name\":\"wtwfgoclalvem\",\"ports\":[\"ugabkyydsyweoh\",\"mtsnvo\"]},{\"name\":\"bftswcd\",\"ports\":[\"s\",\"ptvdti\",\"caflgzw\"]},{\"name\":\"pxdkbtwoqhgppwxn\",\"ports\":[\"zrxxfnduvqzjnnu\",\"wvjzrfxa\",\"tbcqj\"]}]}],\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"urxrjwyz\"},\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"qmlzuwtbdz\"}}") .toObject(NetworkTapRulePatchProperties.class); - Assertions.assertEquals("uls", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("rmhnmizhvpr", model.tapRulesUrl()); - Assertions.assertEquals("cubleh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1571375428500855687L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("voqatdjkaldpmec", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("zynf", model.tapRulesUrl()); + Assertions.assertEquals("qkkp", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7534471053431600184L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("urdeewlsuxp", + Assertions.assertEquals("andbp", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmcreihu", + Assertions.assertEquals("fydqlyyslg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ow", + Assertions.assertEquals("fwhfzhhrurmrfyy", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eerclbltbhpw", + Assertions.assertEquals("qewqjojesxjht", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("r", + Assertions.assertEquals("oafzdypzlxlmndh", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ccwmecbtxsytrtex", + Assertions.assertEquals("nwlyhbujysvdty", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("zigh", + Assertions.assertEquals("yvdsqxkjwd", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("b", + Assertions.assertEquals("irzyudrq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("dqimlgbbfjm", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals("tn", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("xlhmpmhef", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("aphqeofytl", + Assertions.assertEquals("wihcig", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("hmdfspkdn", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("hjucihbymjj", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("atzw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("rxvjeazrahelhb", + Assertions.assertEquals("iitvjcmimbmsw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ieqamcthtpqgf", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("sizkdiuvflg", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wvtlgxy", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("wequfl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("bivyw", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("njuvtz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("nnno", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("h", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("urxrjwyz", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("qmlzuwtbdz", model.globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRulePatchProperties model - = new NetworkTapRulePatchProperties().withAnnotation("uls") - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("rmhnmizhvpr") - .withMatchConfigurations( - Arrays - .asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("cubleh") - .withSequenceNumber(1571375428500855687L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions( - Arrays.asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("urdeewlsuxp", "bwkdwjyjiznioroo", "m")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("pmcreihu", "trnighm", "nuwqxungro", - "gwfmsxjwdylwxm")) - .withInnerVlans(Arrays.asList("ow")) - .withVlanGroupNames(Arrays.asList("eerclbltbhpw", "chy"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("r", "vdifkiikg")) - .withIpGroupNames(Arrays.asList("ccwmecbtxsytrtex", "gwmrqjywiwhvy"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("zigh")) - .withPortGroupNames(Arrays.asList("b", "dvucfvvra"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("e", "wacyyjmlxppdndzk")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("iiuiibf")) - .withInnerVlans( - Arrays.asList("ytqdcizeqqfop", "nopm", "tdsfh", "xqlyoazyfbkmvl")) - .withVlanGroupNames( - Arrays.asList("x", "jzsvmaigb", "kvhyejth", "eecbpergwlc"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("sokknpugzjwdizc", "jixiujzkc", "exgkrsw")) - .withIpGroupNames( - Arrays.asList("kkbxktxbbwlmnw", "okn", "uqddlggbqaolgzu"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("loqkajwjuri", "rsbcl")) - .withPortGroupNames(Arrays.asList("hzcknjxiz", "axdy", "zkz"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("fcssanybzzghvd")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("yj", "v", "dhlywkho")) - .withInnerVlans( - Arrays.asList("unzxezriw", "oewapcqksaaapxjh", "itibenwsdf")) - .withVlanGroupNames(Arrays.asList("aahlfr"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("pireszyaqgomlbmf", "geokfekcjj")) - .withIpGroupNames( - Arrays.asList("yeahhhutpulnrfcq", "fmcihpinowr", "rjpxptch"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition( - new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("cmfnsffet", "kmixwewzls", "gsmepnqvxgvoh", - "bthhxmoevvude")) - .withPortGroupNames(Arrays.asList("hgannvwxqhpjhub", "hxvzgayb", - "rhhogalgxnw", "mzvztauebpa"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction() - .withType(TapRuleActionType.DROP) - .withTruncate("dqimlgbbfjm") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xlhmpmhef") - .withMatchConfigurationName("aphqeofytl"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("wmcm") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("uanccq") - .withMatchConfigurationName("fdgfqpmquxpj"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("arad") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("mufzgugrbl") - .withMatchConfigurationName("l"), - new NetworkTapRuleAction() - .withType(TapRuleActionType.MIRROR) - .withTruncate("nqebaotbptgc") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xxrwqfmdqecvtamq") - .withMatchConfigurationName("mnobfeww"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ibxovu") - .withSequenceNumber(7832491699982446512L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("mvvlooubs", "xipjeopskgocjom", - "upfazusj", "dhuslgdwz")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("yxajc", "grcavqc")) - .withInnerVlans(Arrays.asList("oqzkmqcwwsjnki")) - .withVlanGroupNames(Arrays.asList("pbntqqwwgf", "sqxile"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ne", "uqynttwk")) - .withIpGroupNames(Arrays.asList("jksb", "yogjmqjh"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("cvtqnzjcyqqzhemb", "bwna", "ba")) - .withPortGroupNames(Arrays.asList("sjdle"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("semlzofrsnq", "ljpetexutikelpmw")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("bwudhvosgjzs")) - .withInnerVlans( - Arrays.asList("zalivdfwgq", "hewcffrx", "gezkhzpriqisse")) - .withVlanGroupNames( - Arrays.asList("rusyzai", "npsjnpc", "plujyduonb"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("vvm", "bkxjar", "bbdddwokqx")) - .withIpGroupNames(Arrays.asList("xqkdyqjvzvcgrds"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("vjbssfcriqxz", "xtdlxwmvcdkucp")) - .withPortGroupNames(Arrays.asList("afr", "rgorogeuvmkrspn"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("uufkrfnkcnihkswx", "furqm")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("pntumotahb", "svnkxmyt", "u")) - .withInnerVlans(Arrays.asList("rlhxgcqmyrhkv", "zzmiemqyft")) - .withVlanGroupNames(Arrays.asList("oswgfqvj", "ghpakbqyhlsorn", - "b"))) - .withIpCondition(new IpMatchCondition().withType( - SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("jm")) - .withIpGroupNames(Arrays.asList("yevztnjaw", "hul", "mmqmbwppx", - "rxbkitzmnhitax"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition( - new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("uhvz", "lbrouszxac", "wukokgoojj")) - .withPortGroupNames(Arrays.asList("tubcmu", "h", "btzvxxv"))))) - .withActions(Arrays - .asList( - new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("lxsgcemegdz") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("jubvfjyzuf") - .withMatchConfigurationName("ifnivlut"), - new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("acxauh") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xhklsqxt") - .withMatchConfigurationName("yygktsrjyxxoxwf"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("kvecnxfx") - .withSequenceNumber(6127027006710190293L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("pdhewokyqs", "kx", "sy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("qbtodjfy", "bvkvwzdmvdd", "wcrugyozzz", - "wnjdvvlrh")) - .withInnerVlans(Arrays.asList("kkvxu", "dqzbvbpsuvqhx", "ozf")) - .withVlanGroupNames(Arrays.asList("wbkurklpiigf"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("pjclzjwaqdzqyd", "wuwxyllz", "zevtzqwczoc")) - .withIpGroupNames(Arrays.asList("ekmuynfpkyvnhiy"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays - .asList("uwmsu", "ustihtgrafjajvky", "mmjczvog", "derjennmk")) - .withPortGroupNames(Arrays.asList("uwqdwxhhlbmyphf"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("ef", "jxnjtqbgy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans( - Arrays.asList("hnvxwtd", "tcbjdbtqy", "kxunsaujqgbb", "vovoa")) - .withInnerVlans(Arrays.asList("js", "bc")) - .withVlanGroupNames(Arrays.asList("ygsa", "d", "d", "e"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("kzvzuatqhgzuyxtr", "fdbqskgqjbvitp")) - .withIpGroupNames(Arrays.asList("sffavdhpiwrmuwk"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("raqkiwlw")) - .withPortGroupNames(Arrays.asList("la", "wmwqoguflte", "t"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("evxxkdevpximzii", "meqmduvtvodqxxpq", - "ml", "ibtblmcvrjazno")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("qvpbq", "dqk", "sb", "sbbmitaftazgcx")) - .withInnerVlans(Arrays.asList("lcqufylamxow")) - .withVlanGroupNames(Arrays.asList("joyutehlkarvtipq", - "ksxiknsgofunswh", "cekggvmfnnb", "xn"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("etxtpw", "vgifws", "njzijaciwm")) - .withIpGroupNames(Arrays.asList("tqdonbzzs", "fzyviiwsua"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts( - Arrays.asList("bwxyldqtmggcpd", "megaj", "zctwymzsk", "qkkge")) - .withPortGroupNames( - Arrays.asList("phgliupqscoobk", "lcaxsqcomjiqi"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("uifkzqqhb") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("ilm") - .withMatchConfigurationName("beoiip"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("vyvuoikdlpsx") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("fwimqnryclocfmv") - .withMatchConfigurationName("xvjeleifqhdxtww"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("ybpaevykbyjecrq") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("kchsfoul") - .withMatchConfigurationName("rcxuibsdqbdyblp"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("m") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("eoqhbjql") - .withMatchConfigurationName("bleru"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("hjucihbymjj") + NetworkTapRulePatchProperties model = new NetworkTapRulePatchProperties().withAnnotation("voqatdjkaldpmec") + .withConfigurationType(ConfigurationType.INLINE) + .withTapRulesUrl("zynf") + .withMatchConfigurations( + Arrays.asList(new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("qkkp") + .withSequenceNumber(7534471053431600184L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("andbp", "rrhyjxcqcaczzvwa", "ztt")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("fydqlyyslg", "f", "bdsvkllrzhshhkb", "hcazkgdjth")) + .withInnerVlans(Arrays.asList("fwhfzhhrurmrfyy", "jcnibz", "rsddcuqddldaoyv")) + .withVlanGroupNames(Arrays.asList("qewqjojesxjht", "zzw", "ocygoyineuaxpmez", "trgu"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("oafzdypzlxlmndh", "whlbpjuajz", "xav")) + .withIpGroupNames(Arrays.asList("nwlyhbujysvdty", "ddbhatmabt"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("yvdsqxkjwd")) + .withPortGroupNames(Arrays.asList("irzyudrq", "xrxhxmlfouqp"))))) + .withActions( + Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("tn") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("wihcig") + .withMatchConfigurationName("hmdfspkdn"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.REPLICATE) + .withTruncate("xtert") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("wsciclhdwienv") + .withMatchConfigurationName("lzj"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("kr") + .withSequenceNumber(5377046984950331601L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("rnygti", "kg", "obmkphvdlorxz")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("tudcltfci", "il")) + .withInnerVlans(Arrays.asList("wtkehl")) + .withVlanGroupNames(Arrays.asList("jsxvbbwsgikkmi"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("pwtgzwmzhcmrloqa", "styzavkyjjlu")) + .withIpGroupNames(Arrays.asList("bjqbngzldvvdkopt", "th"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("ihbmwrvpvdr", "h")) + .withPortGroupNames(Arrays.asList("bkabhvxjuaivx"))), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("jsbaqxaxtuxir", "pbiichlygkv")) + .withVlanMatchCondition( + new VlanMatchConditionPatch() + .withVlans(Arrays.asList("onkrni", "dxywabk", "tnipaptgv", "aqyjukkajnne")) + .withInnerVlans(Arrays.asList("onopf", "emiwfhhawbabhzbf", "di")) + .withVlanGroupNames(Arrays.asList("xydgzfoi", "zsuspaywvslq", "ronzeafkxfmuwdb", + "ytqavouymkdeu"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("kaxgbi", "pgo", "qlktthbmrrmtrx")) + .withIpGroupNames(Arrays.asList("pdvr", "zwawpewajc", "sdjuzmuijtickzo"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("erwhemvids", "sfzsgzgus")) + .withPortGroupNames(Arrays.asList("omeqg", "hwispsogd"))))) + .withActions(Arrays.asList(new NetworkTapRuleActionPatch().withType(TapRuleActionType.REDIRECT) + .withTruncate("pxhhboigzxkop") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("htoc") + .withMatchConfigurationName("f"))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("atzw") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("iitvjcmimbmsw", "kbbbjoypplod", "qr", "kp")), + new IpGroupPatchProperties().withName("ffsobg") .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rxvjeazrahelhb")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ieqamcthtpqgf") - .withVlans(Arrays.asList("sizkdiuvflg", "hcw")), - new VlanGroupProperties().withName("wahcrxofgrutv").withVlans(Arrays.asList("cxzivxpmhz")), - new VlanGroupProperties().withName("hhkvnnjdtujqz") - .withVlans(Arrays.asList("jvpmxnht", "zstqlf")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("wvtlgxy") - .withPorts(Arrays.asList("wequfl", "yyopoaytwwgw", "ubotbvufrkw", "iemimdtn")), - new PortGroupProperties().withName("wew") - .withPorts(Arrays.asList("reeedddrftfquul", "clhsiigeeuw")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("yxfedqnetd") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("oqgvbzpggp", "meyobqajejirvavr", "kgpogplbjuvlnh")), - new IpGroupProperties().withName("rnjhinaeges") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("qmjmoplukfyk")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ovadkrmjx") - .withVlans(Arrays.asList("pdkesjqbzkqmx", "poriwbwggijtspzj", "rrh", "kwsbzrhdugquh")), - new VlanGroupProperties().withName("gzfrunjfhrjhi") - .withVlans(Arrays.asList("ause", "nczk", "ihvtuwyjsqw")), - new VlanGroupProperties().withName("zoszjg") - .withVlans(Arrays.asList("kfnyskwwunqhc", "avoj", "slhip")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("bljp").withPorts(Arrays.asList("rvchyluqalp")), - new PortGroupProperties().withName("fjjfxtizt") - .withPorts(Arrays.asList("tahhhsa", "xxsri", "rcwbaae", "yyefmxwoqotiiqb")), - new PortGroupProperties().withName("asrvrmtist") - .withPorts(Arrays.asList("jhorlxkpy", "k", "nnycntrqxxwtd")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("tsuhqhtoxtd") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("x", "qmzxsyaks", "npaami")), - new IpGroupProperties().withName("bgh") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("bgchcgsfzhbjkiy", "qbjsdjpgxeysgw", "cfferznzc")), - new IpGroupProperties().withName("voveomkhfeqcoop") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("imgckycjpeebznbz", "xsuloutnpb")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("qo") - .withVlans(Arrays.asList("ncdmwkh", "pfhsldqdza", "iunyevdyzdsytc")), - new VlanGroupProperties().withName("swhcamwuy") - .withVlans(Arrays.asList("kcgsfcmvh", "drp", "atvyrkljqkqws", "jtvjkowggxawwd")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("nkteiidlbovwbclp") - .withPorts(Arrays.asList("gani", "kjcnerek")))))); + .withIpPrefixes(Arrays.asList("r", "ax", "mb", "tvt")), + new IpGroupPatchProperties().withName("lmlplgt") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("hxjvoysxaqqjhdfh", "aobqnjc", "bozvc", "qwssyd")))) + .withVlanGroups(Arrays.asList(new VlanGroupPatchProperties().withName("bivyw") + .withVlans(Arrays.asList("njuvtz", "j", "dlxbaeyocpkv", "tjfdzfmnpbdrc")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("nnno") + .withPorts(Arrays.asList("h", "dtuoamqobqe", "spshtis")), + new PortGroupPatchProperties().withName("f") + .withPorts(Arrays.asList("trzjwnzwckzebm", "vwdxgyypmxqzlm", "nxrcatkuhskegdk", "vii")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("hoxfzz") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("busxyugozwp", "xzgzum")), + new IpGroupPatchProperties().withName("tiixkkbygbgi") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("hybbnhttyizonzs")), + new IpGroupPatchProperties().withName("qcojasfzhzzcarc") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("ipdthjfvnhwsgns", "utfelfchn", "fssjgbfbbachxx")))) + .withVlanGroups(Arrays.asList(new VlanGroupPatchProperties().withName("nfnbphceeivkb") + .withVlans(Arrays.asList("epgh", "nuqhqp", "t")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("sclggagygn") + .withPorts(Arrays.asList("ytnhdni", "uzzj", "zvwgbzdt")), + new PortGroupPatchProperties().withName("biwny").withPorts(Arrays.asList("pxctsucrxd")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("bjzrlwtid") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("g", "pupjhltylyuudvbg")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("jsbkpcut") + .withVlans(Arrays.asList("iydpoknseaimb", "qraokdarluobbval", "wzknyujxysv", "lfjyclvi")), + new VlanGroupPatchProperties().withName("lffll") + .withVlans(Arrays.asList("mtxfqpfi", "dcgbfouzf", "pgcryvidbzdylbvj", "tgngwnxjftecg")), + new VlanGroupPatchProperties().withName("zsqmpdqcakzbyqh").withVlans(Arrays.asList("hxoyxuu")), + new VlanGroupPatchProperties().withName("lusyruxrz") + .withVlans(Arrays.asList("hrvmgsbpgmncr", "tpiforomppz", "a", "qmeu")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("cmpu") + .withPorts(Arrays.asList("goce", "tlyspjymwicc", "rncfu", "lakgixhqjqhgqwbb")), + new PortGroupPatchProperties().withName("wtwfgoclalvem") + .withPorts(Arrays.asList("ugabkyydsyweoh", "mtsnvo")), + new PortGroupPatchProperties().withName("bftswcd") + .withPorts(Arrays.asList("s", "ptvdti", "caflgzw")), + new PortGroupPatchProperties().withName("pxdkbtwoqhgppwxn") + .withPorts(Arrays.asList("zrxxfnduvqzjnnu", "wvjzrfxa", "tbcqj")))))) + .withIdentitySelector( + new IdentitySelectorPatch().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("urxrjwyz")) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("qmlzuwtbdz")); model = BinaryData.fromObject(model).toObject(NetworkTapRulePatchProperties.class); - Assertions.assertEquals("uls", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("rmhnmizhvpr", model.tapRulesUrl()); - Assertions.assertEquals("cubleh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1571375428500855687L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("voqatdjkaldpmec", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("zynf", model.tapRulesUrl()); + Assertions.assertEquals("qkkp", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7534471053431600184L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("urdeewlsuxp", + Assertions.assertEquals("andbp", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmcreihu", + Assertions.assertEquals("fydqlyyslg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ow", + Assertions.assertEquals("fwhfzhhrurmrfyy", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eerclbltbhpw", + Assertions.assertEquals("qewqjojesxjht", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("r", + Assertions.assertEquals("oafzdypzlxlmndh", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ccwmecbtxsytrtex", + Assertions.assertEquals("nwlyhbujysvdty", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("zigh", + Assertions.assertEquals("yvdsqxkjwd", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("b", + Assertions.assertEquals("irzyudrq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("dqimlgbbfjm", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals("tn", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("xlhmpmhef", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("aphqeofytl", + Assertions.assertEquals("wihcig", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("hmdfspkdn", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("hjucihbymjj", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("atzw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("rxvjeazrahelhb", + Assertions.assertEquals("iitvjcmimbmsw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ieqamcthtpqgf", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("sizkdiuvflg", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wvtlgxy", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("wequfl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("bivyw", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("njuvtz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("nnno", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("h", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("urxrjwyz", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("qmlzuwtbdz", model.globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java index 06f2cf8ace6f..9be67c89d9ce 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java @@ -1,27 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -31,188 +36,299 @@ public final class NetworkTapRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRulePatch model = BinaryData.fromString( - "{\"properties\":{\"configurationType\":\"Inline\",\"tapRulesUrl\":\"jmtf\",\"matchConfigurations\":[{\"matchConfigurationName\":\"lnirupkq\",\"sequenceNumber\":1991980702958146147,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"wmehfxrttxbmsenn\",\"fab\",\"camalect\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"xmsynbkd\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"fxuzmsvzyqrbrn\",\"matchConfigurationName\":\"jtlxfikjkxara\"},{\"type\":\"Mirror\",\"truncate\":\"asnjeglht\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"zpcjcnwjzbqblxr\",\"matchConfigurationName\":\"vdsvoqizawwsds\"},{\"type\":\"Goto\",\"truncate\":\"hjxsa\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"uffhxf\",\"matchConfigurationName\":\"mwzrdqyoybmr\"}]},{\"matchConfigurationName\":\"to\",\"sequenceNumber\":8522857147817918154,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"qphkv\",\"yzadcrxylaypdt\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Goto\",\"truncate\":\"huriwhjdfr\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"h\",\"matchConfigurationName\":\"nkcclpctuog\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"s\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"oebnxsqcowscuyfq\",\"amfbqh\",\"u\"]},{\"name\":\"afuzpnxqpwnik\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"grb\",\"ct\",\"vgoo\",\"qsazmzlpcxi\"]},{\"name\":\"hxxrqicf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"dthkvpyeyoafinm\"]},{\"name\":\"qup\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"fwkyluobdxw\"]}],\"vlanGroups\":[{\"name\":\"clcvqs\",\"vlans\":[\"ay\"]},{\"name\":\"vwbzmfxlrymf\",\"vlans\":[\"piywqnp\",\"ydrf\",\"gcnyxbyxmkhm\",\"ync\"]},{\"name\":\"u\",\"vlans\":[\"styygjq\",\"ulmwqgmhmqmiwx\",\"fvvzucqfgufjnbx\"]}],\"portGroups\":[{\"name\":\"dukinhlxh\",\"ports\":[\"kekzouyveww\",\"zrdwcg\",\"dohgcandxfhhhte\",\"tdqtdnnckkplj\"]},{\"name\":\"hvvfkdxccyijjimh\",\"ports\":[\"rqnjxmvvsduydwnw\",\"ruhhqldrdymnswx\"]},{\"name\":\"xqwqnghxnim\",\"ports\":[\"jrxgunnq\",\"ypu\",\"tnylqu\"]}]},{\"ipGroups\":[{\"name\":\"vyumgmmueb\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gsqufmjxcyo\",\"eqcazisvbrqgcy\",\"pgawepk\",\"on\"]},{\"name\":\"pghlr\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"lxb\",\"ibrv\",\"ztaflvsmfj\"]},{\"name\":\"vfjcqrttjfuqm\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"feqb\",\"vdostwyg\"]},{\"name\":\"mw\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wzz\"]}],\"vlanGroups\":[{\"name\":\"lcjgpvcqzvzrbvg\",\"vlans\":[\"lxrmxvm\"]},{\"name\":\"wynbgovazoymd\",\"vlans\":[\"plkhwwdkatveqmg\",\"cswzeyxrye\",\"r\"]},{\"name\":\"p\",\"vlans\":[\"kl\",\"smfasgtlv\"]}],\"portGroups\":[{\"name\":\"ilosjaemcezevft\",\"ports\":[\"l\"]}]},{\"ipGroups\":[{\"name\":\"yghz\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wtpcflcezswwvw\"]},{\"name\":\"tdjtvbfpfhru\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cjnqs\",\"xd\"]},{\"name\":\"umxquk\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hclqddnhfkne\",\"weddpnyzc\",\"yjsmkaq\",\"dqabnwvpaq\"]}],\"vlanGroups\":[{\"name\":\"bbigcfd\",\"vlans\":[\"xnfbmjyyrqa\",\"dwovocyt\"]}],\"portGroups\":[{\"name\":\"ayokrwfmihw\",\"ports\":[\"hedb\",\"o\",\"dczvothmkh\",\"aozvbwfcnjhbpoel\"]},{\"name\":\"cmyhrhjvszfqb\",\"ports\":[\"dwpppqwojoe\",\"zz\"]},{\"name\":\"ytdxmlynz\",\"ports\":[\"apbkrbuoggtdl\",\"lcuhaizi\",\"vaylz\",\"ohlpsftqkr\"]},{\"name\":\"hvbvvcpwtqsus\",\"ports\":[\"mzy\"]}]}],\"annotation\":\"fetev\"},\"tags\":{\"hfhfsat\":\"fknwacycsyotct\"}}") + "{\"properties\":{\"annotation\":\"hqdoxdegacded\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"to\",\"matchConfigurations\":[{\"matchConfigurationName\":\"cidpda\",\"sequenceNumber\":2043565802321449899,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"lsaqifepdureeviv\",\"iglioklsuff\",\"xeswctl\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"vnpbgcesfddfclmo\",\"urofo\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"weob\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"q\",\"matchConfigurationName\":\"ixccnkfsog\"},{\"type\":\"Log\",\"truncate\":\"myqzyqepgbbzdsl\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"ev\",\"matchConfigurationName\":\"dddpwmgwxwukfj\"},{\"type\":\"Count\",\"truncate\":\"axseisvv\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"hheovejk\",\"matchConfigurationName\":\"lecztl\"}]},{\"matchConfigurationName\":\"rtzpuvfssr\",\"sequenceNumber\":1072366039973700305,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"urmuzembqq\",\"ehdhjofywwna\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"slqcxuthv\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"yyhrgmabspmlut\",\"matchConfigurationName\":\"ukkedputocrbfg\"}]},{\"matchConfigurationName\":\"cmdrgcuzjmvkrw\",\"sequenceNumber\":6973749545284154281,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"qimybqjvfio\",\"hcaqpv\",\"szopeuku\",\"dswbsskgq\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{},\"protocolTypes\":[\"sjbpwjwzqgipdzy\",\"zkhxfp\",\"cuudqhadxjvvl\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"gtxlzncoqxtvytzq\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{},\"protocolTypes\":[\"xyrazz\",\"tjvcszbdbr\",\"bozltyola\",\"bibtkeiecupmwx\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"peylf\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ddgiq\",\"matchConfigurationName\":\"hcxwwwvun\"},{\"type\":\"Replicate\",\"truncate\":\"vxhxrmeatrtcq\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"ifbmojt\",\"matchConfigurationName\":\"qyo\"},{\"type\":\"Mirror\",\"truncate\":\"oufkqmbhukdfp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"iv\",\"matchConfigurationName\":\"jezchmeo\"}]},{\"matchConfigurationName\":\"zjlrknc\",\"sequenceNumber\":7838151286765806739,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{},\"protocolTypes\":[\"hfvsf\",\"sstw\",\"p\",\"cachdtezgfctu\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"None\",\"portCondition\":{},\"protocolTypes\":[\"uxnxauohshzultd\",\"vmjdhypn\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{},\"protocolTypes\":[\"ivptb\",\"zsuzgrzu\",\"ekytkzvtv\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{},\"protocolTypes\":[\"yce\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"xsbyplskhwfjud\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"psezs\",\"matchConfigurationName\":\"dpftfcbrtsr\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"zaci\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"guzliyv\",\"bfsin\",\"abdjuljgxotu\",\"a\"]},{\"name\":\"i\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hulzugifgsp\"]},{\"name\":\"dlnoc\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"mi\",\"lukjbwmgksrl\",\"spppoeszthj\"]},{\"name\":\"yjskdiylg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xpsyb\",\"owgvm\",\"wbohxdhkoexb\",\"h\"]}],\"vlanGroups\":[{\"name\":\"ajwscmneev\",\"vlans\":[\"qeumz\",\"yhmgq\",\"eivjqutxr\",\"gbzgfhzdzahktxv\"]},{\"name\":\"icf\",\"vlans\":[\"hotbkjwhztpxjvtw\",\"yjdpayx\"]},{\"name\":\"qiwu\",\"vlans\":[\"qztjfkgb\",\"qqjobsyn\",\"en\",\"onjqhdheosx\"]},{\"name\":\"fudmpfhwyp\",\"vlans\":[\"jtntcwgpdbbg\",\"aecct\"]}],\"portGroups\":[{\"name\":\"pvjrdspkvrmpr\",\"ports\":[\"pt\",\"jwiyyeohg\",\"cmdjmvphwfnugsl\",\"fzzi\"]},{\"name\":\"bgomvue\",\"ports\":[\"m\",\"fxnwcgzuoxixtxxx\"]}]},{\"ipGroups\":[{\"name\":\"hbknnrnkyjfawpcb\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hczbnivco\",\"sxvppkjealkdb\",\"who\",\"vbmyzuqfdqdktrj\"]},{\"name\":\"qszhhqngjndkv\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"f\",\"gdodnkqyipgk\"]},{\"name\":\"tdazmdzesim\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rfzjlflzagvdavab\",\"iefcorzbida\",\"beznicew\",\"fajw\"]}],\"vlanGroups\":[{\"name\":\"i\",\"vlans\":[\"pwwsrzeqxu\",\"cuuuexsmnteevfg\"]},{\"name\":\"fezraqs\",\"vlans\":[\"odkgxqfkyrxgmz\",\"eglwdzfsspfeg\"]}],\"portGroups\":[{\"name\":\"ddkkraj\",\"ports\":[\"k\"]}]},{\"ipGroups\":[{\"name\":\"lmzpyq\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"cxhgsingmhpavsfg\",\"rvqrwwbdrwroqk\",\"jnzpqhqqsa\",\"kyu\"]},{\"name\":\"ameaasjqen\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"zvgeytlplslfc\",\"e\",\"ksuowt\",\"lkyqfnjo\"]},{\"name\":\"hnxzmfvmw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"srawwhyxfshmby\",\"mvwnbunsodtevzsh\",\"ykebmpshaez\"]}],\"vlanGroups\":[{\"name\":\"ck\",\"vlans\":[\"vqdmhcejstfsm\",\"cjakgkqwx\",\"dsoqzhxwdjoxwkb\"]},{\"name\":\"sobvcnsb\",\"vlans\":[\"znlf\"]}],\"portGroups\":[{\"name\":\"xtfzqyugtkxncwd\",\"ports\":[\"lrlcm\",\"bejywwwv\"]}]}],\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rmqevrhhafqf\"},\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"iruqvgnjxiakg\"}},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"ryhmmglv\":{\"principalId\":\"gikyluyu\",\"clientId\":\"brdcvoloxtvqcb\"}}},\"tags\":{\"tfgfbhnkxasomaf\":\"nkpsvokkyankxvc\",\"autfzptrcdzy\":\"gazhlrdxpc\",\"wenbqvpr\":\"rtffvpkdxcy\"}}") .toObject(NetworkTapRulePatch.class); - Assertions.assertEquals("fknwacycsyotct", model.tags().get("hfhfsat")); + Assertions.assertEquals("nkpsvokkyankxvc", model.tags().get("tfgfbhnkxasomaf")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("hqdoxdegacded", model.annotation()); Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("jmtf", model.tapRulesUrl()); - Assertions.assertEquals("lnirupkq", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1991980702958146147L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("wmehfxrttxbmsenn", + Assertions.assertEquals("to", model.tapRulesUrl()); + Assertions.assertEquals("cidpda", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(2043565802321449899L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("lsaqifepdureeviv", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("xmsynbkd", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("weob", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("fxuzmsvzyqrbrn", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("jtlxfikjkxara", + Assertions.assertEquals("q", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("ixccnkfsog", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("s", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("zaci", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("oebnxsqcowscuyfq", + Assertions.assertEquals("guzliyv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("clcvqs", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ay", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("dukinhlxh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("kekzouyveww", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("fetev", model.annotation()); + Assertions.assertEquals("ajwscmneev", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("qeumz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("pvjrdspkvrmpr", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("pt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("rmqevrhhafqf", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("iruqvgnjxiakg", model.globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapRulePatch model - = new NetworkTapRulePatch().withTags(mapOf("hfhfsat", "fknwacycsyotct")) + = new NetworkTapRulePatch() + .withTags(mapOf("tfgfbhnkxasomaf", "nkpsvokkyankxvc", "autfzptrcdzy", "gazhlrdxpc", "wenbqvpr", + "rtffvpkdxcy")) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("ryhmmglv", new UserAssignedIdentity()))) + .withAnnotation("hqdoxdegacded") .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("jmtf") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("lnirupkq") - .withSequenceNumber(1991980702958146147L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("wmehfxrttxbmsenn", "fab", "camalect")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("xmsynbkd") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("fxuzmsvzyqrbrn") - .withMatchConfigurationName("jtlxfikjkxara"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("asnjeglht") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("zpcjcnwjzbqblxr") - .withMatchConfigurationName("vdsvoqizawwsds"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("hjxsa") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("uffhxf") - .withMatchConfigurationName("mwzrdqyoybmr"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("to") - .withSequenceNumber(8522857147817918154L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("qphkv", "yzadcrxylaypdt")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("huriwhjdfr") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("h") - .withMatchConfigurationName("nkcclpctuog"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("s") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("oebnxsqcowscuyfq", "amfbqh", "u")), - new IpGroupProperties().withName("afuzpnxqpwnik") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("grb", "ct", "vgoo", "qsazmzlpcxi")), - new IpGroupProperties().withName("hxxrqicf") + .withTapRulesUrl("to") + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("cidpda") + .withSequenceNumber(2043565802321449899L) .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("dthkvpyeyoafinm")), - new IpGroupProperties().withName("qup") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("fwkyluobdxw")))) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties().withName("clcvqs").withVlans(Arrays.asList("ay")), - new VlanGroupProperties().withName("vwbzmfxlrymf") - .withVlans(Arrays.asList("piywqnp", "ydrf", "gcnyxbyxmkhm", "ync")), - new VlanGroupProperties().withName("u") - .withVlans(Arrays.asList("styygjq", "ulmwqgmhmqmiwx", "fvvzucqfgufjnbx")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("dukinhlxh") - .withPorts(Arrays.asList("kekzouyveww", "zrdwcg", "dohgcandxfhhhte", "tdqtdnnckkplj")), - new PortGroupProperties().withName("hvvfkdxccyijjimh") - .withPorts(Arrays.asList("rqnjxmvvsduydwnw", "ruhhqldrdymnswx")), - new PortGroupProperties().withName("xqwqnghxnim") - .withPorts(Arrays.asList("jrxgunnq", "ypu", "tnylqu")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("vyumgmmueb") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("gsqufmjxcyo", "eqcazisvbrqgcy", "pgawepk", "on")), - new IpGroupProperties().withName("pghlr") + .withMatchConditions( + Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("lsaqifepdureeviv", "iglioklsuff", "xeswctl")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("vnpbgcesfddfclmo", "urofo")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("weob") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("q") + .withMatchConfigurationName("ixccnkfsog"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.LOG) + .withTruncate("myqzyqepgbbzdsl") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("ev") + .withMatchConfigurationName("dddpwmgwxwukfj"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.COUNT) + .withTruncate("axseisvv") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("hheovejk") + .withMatchConfigurationName("lecztl"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("rtzpuvfssr") + .withSequenceNumber(1072366039973700305L) .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("lxb", "ibrv", "ztaflvsmfj")), - new IpGroupProperties().withName("vfjcqrttjfuqm") + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("urmuzembqq", "ehdhjofywwna")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.REPLICATE) + .withTruncate("slqcxuthv") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("yyhrgmabspmlut") + .withMatchConfigurationName("ukkedputocrbfg"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("cmdrgcuzjmvkrw") + .withSequenceNumber(6973749545284154281L) .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("feqb", "vdostwyg")), - new IpGroupProperties().withName("mw") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wzz")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("lcjgpvcqzvzrbvg").withVlans(Arrays.asList("lxrmxvm")), - new VlanGroupProperties().withName("wynbgovazoymd") - .withVlans(Arrays.asList("plkhwwdkatveqmg", "cswzeyxrye", "r")), - new VlanGroupProperties().withName("p").withVlans(Arrays.asList("kl", "smfasgtlv")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("ilosjaemcezevft").withPorts(Arrays.asList("l")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("yghz") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wtpcflcezswwvw")), - new IpGroupProperties().withName("tdjtvbfpfhru") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("cjnqs", "xd")), - new IpGroupProperties().withName("umxquk") + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("qimybqjvfio", "hcaqpv", "szopeuku", "dswbsskgq")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("sjbpwjwzqgipdzy", "zkhxfp", "cuudqhadxjvvl")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("gtxlzncoqxtvytzq")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("xyrazz", "tjvcszbdbr", "bozltyola", "bibtkeiecupmwx")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.COUNT) + .withTruncate("peylf") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("ddgiq") + .withMatchConfigurationName("hcxwwwvun"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.REPLICATE) + .withTruncate("vxhxrmeatrtcq") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("ifbmojt") + .withMatchConfigurationName("qyo"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.MIRROR) + .withTruncate("oufkqmbhukdfp") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("iv") + .withMatchConfigurationName("jezchmeo"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("zjlrknc") + .withSequenceNumber(7838151286765806739L) .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("hclqddnhfkne", "weddpnyzc", "yjsmkaq", "dqabnwvpaq")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("bbigcfd") - .withVlans(Arrays.asList("xnfbmjyyrqa", "dwovocyt")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("ayokrwfmihw") - .withPorts(Arrays.asList("hedb", "o", "dczvothmkh", "aozvbwfcnjhbpoel")), - new PortGroupProperties().withName("cmyhrhjvszfqb") - .withPorts(Arrays.asList("dwpppqwojoe", "zz")), - new PortGroupProperties().withName("ytdxmlynz") - .withPorts(Arrays.asList("apbkrbuoggtdl", "lcuhaizi", "vaylz", "ohlpsftqkr")), - new PortGroupProperties().withName("hvbvvcpwtqsus").withPorts(Arrays.asList("mzy")))))) - .withAnnotation("fetev"); + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("hfvsf", "sstw", "p", "cachdtezgfctu")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("uxnxauohshzultd", "vmjdhypn")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("ivptb", "zsuzgrzu", "ekytkzvtv")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch().withProtocolTypes(Arrays.asList("yce")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.MIRROR) + .withTruncate("xsbyplskhwfjud") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("psezs") + .withMatchConfigurationName("dpftfcbrtsr"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("zaci") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("guzliyv", "bfsin", "abdjuljgxotu", "a")), + new IpGroupPatchProperties().withName("i") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("hulzugifgsp")), + new IpGroupPatchProperties().withName("dlnoc") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("mi", "lukjbwmgksrl", "spppoeszthj")), + new IpGroupPatchProperties().withName("yjskdiylg") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("xpsyb", "owgvm", "wbohxdhkoexb", "h")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("ajwscmneev") + .withVlans(Arrays.asList("qeumz", "yhmgq", "eivjqutxr", "gbzgfhzdzahktxv")), + new VlanGroupPatchProperties().withName("icf") + .withVlans(Arrays.asList("hotbkjwhztpxjvtw", "yjdpayx")), + new VlanGroupPatchProperties().withName("qiwu") + .withVlans(Arrays.asList("qztjfkgb", "qqjobsyn", "en", "onjqhdheosx")), + new VlanGroupPatchProperties().withName("fudmpfhwyp") + .withVlans(Arrays.asList("jtntcwgpdbbg", "aecct")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("pvjrdspkvrmpr") + .withPorts(Arrays.asList("pt", "jwiyyeohg", "cmdjmvphwfnugsl", "fzzi")), + new PortGroupPatchProperties().withName("bgomvue") + .withPorts(Arrays.asList("m", "fxnwcgzuoxixtxxx")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups( + Arrays + .asList( + new IpGroupPatchProperties().withName("hbknnrnkyjfawpcb") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("hczbnivco", "sxvppkjealkdb", "who", + "vbmyzuqfdqdktrj")), + new IpGroupPatchProperties().withName("qszhhqngjndkv") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes(Arrays.asList("f", "gdodnkqyipgk")), + new IpGroupPatchProperties().withName("tdazmdzesim") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("rfzjlflzagvdavab", "iefcorzbida", + "beznicew", "fajw")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("i") + .withVlans(Arrays.asList("pwwsrzeqxu", "cuuuexsmnteevfg")), + new VlanGroupPatchProperties().withName("fezraqs") + .withVlans(Arrays.asList("odkgxqfkyrxgmz", "eglwdzfsspfeg")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("ddkkraj").withPorts(Arrays.asList("k")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups( + Arrays.asList( + new IpGroupPatchProperties().withName("lmzpyq") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("cxhgsingmhpavsfg", "rvqrwwbdrwroqk", + "jnzpqhqqsa", "kyu")), + new IpGroupPatchProperties().withName("ameaasjqen") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("zvgeytlplslfc", "e", "ksuowt", "lkyqfnjo")), + new IpGroupPatchProperties().withName("hnxzmfvmw") + .withIpAddressType(IpAddressType.IPV6) + .withIpPrefixes( + Arrays.asList("srawwhyxfshmby", "mvwnbunsodtevzsh", "ykebmpshaez")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("ck") + .withVlans(Arrays.asList("vqdmhcejstfsm", "cjakgkqwx", "dsoqzhxwdjoxwkb")), + new VlanGroupPatchProperties().withName("sobvcnsb") + .withVlans(Arrays.asList("znlf")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("xtfzqyugtkxncwd") + .withPorts(Arrays.asList("lrlcm", "bejywwwv")))))) + .withIdentitySelector(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("rmqevrhhafqf")) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("iruqvgnjxiakg")); model = BinaryData.fromObject(model).toObject(NetworkTapRulePatch.class); - Assertions.assertEquals("fknwacycsyotct", model.tags().get("hfhfsat")); + Assertions.assertEquals("nkpsvokkyankxvc", model.tags().get("tfgfbhnkxasomaf")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("hqdoxdegacded", model.annotation()); Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("jmtf", model.tapRulesUrl()); - Assertions.assertEquals("lnirupkq", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1991980702958146147L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("wmehfxrttxbmsenn", + Assertions.assertEquals("to", model.tapRulesUrl()); + Assertions.assertEquals("cidpda", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(2043565802321449899L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("lsaqifepdureeviv", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("xmsynbkd", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("weob", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("fxuzmsvzyqrbrn", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("jtlxfikjkxara", + Assertions.assertEquals("q", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("ixccnkfsog", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("s", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("zaci", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IpAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("oebnxsqcowscuyfq", + Assertions.assertEquals("guzliyv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("clcvqs", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ay", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("dukinhlxh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("kekzouyveww", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("fetev", model.annotation()); + Assertions.assertEquals("ajwscmneev", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("qeumz", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("pvjrdspkvrmpr", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("pt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("rmqevrhhafqf", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("iruqvgnjxiakg", model.globalNetworkTapRuleActions().truncate()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java deleted file mode 100644 index a8251e463a35..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PortType; -import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; -import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapRulePatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapRulePatchableProperties model = BinaryData.fromString( - "{\"configurationType\":\"Inline\",\"tapRulesUrl\":\"pvd\",\"matchConfigurations\":[{\"matchConfigurationName\":\"eerscdxrnrnjrcu\",\"sequenceNumber\":6706008368624061443,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"psa\",\"mameub\",\"qiqmlfvhlq\",\"skkqjmxptuei\"],\"portGroupNames\":[\"gkwdr\"]},\"protocolTypes\":[\"pahu\",\"onjkkxukguehvvp\",\"joegcjojlleuidp\",\"tonvhgnhtmeplhb\"],\"vlanMatchCondition\":{\"vlans\":[\"pmummmkva\",\"uc\"],\"innerVlans\":[\"ua\",\"qpmnu\"],\"vlanGroupNames\":[\"rchxwwuzdmhvwl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"it\",\"dsjipdviscotyxb\",\"iifef\"],\"ipGroupNames\":[\"lvrqo\"]}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"eailwdqmqf\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"tmfx\",\"matchConfigurationName\":\"d\"},{\"type\":\"Goto\",\"truncate\":\"namkuuyiuyu\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"lxicwgpthdcf\",\"matchConfigurationName\":\"z\"},{\"type\":\"Drop\",\"truncate\":\"fodropalvngtwyu\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"qrntaumdrc\",\"matchConfigurationName\":\"vkrkegtyczup\"}]},{\"matchConfigurationName\":\"yxlz\",\"sequenceNumber\":7662588380490129928,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"s\",\"xduetbapfc\",\"ewxtrl\"],\"portGroupNames\":[\"xyazkjpirgzx\",\"bcz\"]},\"protocolTypes\":[\"egbthm\",\"ritjbu\"],\"vlanMatchCondition\":{\"vlans\":[\"unozfvualjthoiv\",\"dwsngkr\",\"ihscjvakmhzbhw\"],\"innerVlans\":[\"bwihbnnxemvynu\",\"qkotauratn\"],\"vlanGroupNames\":[\"pfzsclefyrl\",\"tndqlmf\",\"ggnbbuypwovvvsfl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"rehjuqwvapx\",\"lzhpzihacenq\",\"zlxnqzubf\"],\"ipGroupNames\":[\"dbgmkfwmjcwte\",\"fhxwyr\",\"b\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"pcha\"],\"portGroupNames\":[\"eplrajubowuywevt\"]},\"protocolTypes\":[\"eikmwlaoklfni\",\"yxgucbmtredsc\",\"nstjcyyuvtz\",\"xzhclec\"],\"vlanMatchCondition\":{\"vlans\":[\"qzcl\",\"yh\",\"u\",\"gi\"],\"innerVlans\":[\"gyresgzsd\",\"mwb\",\"orj\"],\"vlanGroupNames\":[\"chy\",\"hakvyrfbqvum\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"pmaxfnzlpqmpf\",\"xef\",\"ulbl\",\"rtux\"],\"ipGroupNames\":[\"hfcaeo\",\"ifq\",\"ywjflobh\",\"hqmomfeco\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xldjmzezbj\"],\"portGroupNames\":[\"lslu\",\"bqfy\"]},\"protocolTypes\":[\"y\"],\"vlanMatchCondition\":{\"vlans\":[\"uqs\"],\"innerVlans\":[\"qyvoupr\",\"y\",\"qzssl\",\"mgw\"],\"vlanGroupNames\":[\"vrxpfdu\",\"olhg\",\"qvpbfjpoqzucfzl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"bormvhvzielbp\",\"nqujywz\",\"qyggmnwsvhb\"],\"ipGroupNames\":[\"iwyejtobdr\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"kunsbfjhhlwtpkv\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"tt\",\"matchConfigurationName\":\"kgtzqnwqsttewu\"}]},{\"matchConfigurationName\":\"ysjeufjx\",\"sequenceNumber\":1275946665450936475,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vrhprrvbwonleqf\",\"vtlrvbstph\",\"ykunin\",\"tlnrj\"],\"portGroupNames\":[\"dbuziciqppoqvg\",\"newuhwfw\"]},\"protocolTypes\":[\"xuoxtfnres\"],\"vlanMatchCondition\":{\"vlans\":[\"gckncjmg\"],\"innerVlans\":[\"vbt\"],\"vlanGroupNames\":[\"fmjymjnh\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"upubdxckdlhz\",\"hcu\",\"vbosjj\",\"dizhrjqfyaytvsly\"],\"ipGroupNames\":[\"gniuar\",\"cjiwgsxfaio\",\"wd\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"zxbarcbpae\",\"zqsym\",\"w\"],\"portGroupNames\":[\"cytesmf\",\"crtfodqhuauzm\",\"iv\",\"trfzhhezvh\"]},\"protocolTypes\":[\"xdyyrud\",\"ahswtvdkxb\",\"ssgfenffdxbvwfqj\"],\"vlanMatchCondition\":{\"vlans\":[\"d\",\"ija\",\"xndmuvar\"],\"innerVlans\":[\"zj\",\"tp\",\"rmuhcuhtuzlx\"],\"vlanGroupNames\":[\"o\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wrapczdojqy\",\"zesi\",\"iysnjqyowaadc\"],\"ipGroupNames\":[\"za\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"aupwhlzyckrem\",\"jlm\"],\"portGroupNames\":[\"orsirx\",\"hyrkqakofajfr\",\"prfvmkinwteyrqsh\"]},\"protocolTypes\":[\"cejo\",\"ylblfsprr\",\"cspimtcvvfxrdy\"],\"vlanMatchCondition\":{\"vlans\":[\"lxiz\",\"qikm\",\"obliqemcdiiisk\",\"bonxxupj\"],\"innerVlans\":[\"rk\",\"kgenjqnnpjwkosn\",\"xigfoujjc\",\"gdqmrlhnzkwop\"],\"vlanGroupNames\":[\"yinxu\",\"rrxyxwjezbfqpl\",\"yuekdcpvuftrsvjm\",\"svujnjktvolefcj\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"otfbjampqoclann\"],\"ipGroupNames\":[\"nlsuqbwzstr\",\"tgvpatr\",\"jjktfin\",\"hoksmmculwk\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"jflsgaojb\",\"qpqsdoctpzpuj\"],\"portGroupNames\":[\"mcdsgxcelujisw\",\"lu\"]},\"protocolTypes\":[\"hfwlfxzfwugeup\",\"knecexkgrv\",\"psjdmng\",\"yt\"],\"vlanMatchCondition\":{\"vlans\":[\"fyxcnwawoxcgzbej\",\"fbifopfjxdwdrp\",\"zqjkrf\",\"bwotfcuuugtji\"],\"innerVlans\":[\"ayiawohfm\",\"nnzm\",\"cjjkmqenh\",\"idzr\"],\"vlanGroupNames\":[\"gloiovsl\",\"ivqsuvwtenb\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"yoaq\",\"ukuicjuftekioo\",\"nd\"],\"ipGroupNames\":[\"fhvpxjhxzubfj\",\"abbwzgvzu\",\"ixcdckixs\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"vkmvyxzerejrkp\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"etjx\",\"matchConfigurationName\":\"opt\"},{\"type\":\"Log\",\"truncate\":\"whlbecgihzbpem\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"bovr\",\"matchConfigurationName\":\"xywpjhspboxhif\"},{\"type\":\"Log\",\"truncate\":\"peswyhhmifjuajx\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"mmp\",\"matchConfigurationName\":\"lyuqvcmlaexb\"},{\"type\":\"Drop\",\"truncate\":\"fpnezsjzayml\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"hyogzmsimeht\",\"matchConfigurationName\":\"uwdhtq\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"m\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gi\",\"nomwnwnghojovke\",\"ymicjixx\",\"sfpcrtnuguefxxij\"]}],\"vlanGroups\":[{\"name\":\"veywetkrhlolmcn\",\"vlans\":[\"fgsvbbvaqdljnpet\",\"rnrdetawevx\",\"huekdxljzvdovb\",\"blerlpr\"]},{\"name\":\"qccddcbny\",\"vlans\":[\"c\",\"xwbpwyykdig\"]},{\"name\":\"lrzndas\",\"vlans\":[\"dmjqmvy\"]}],\"portGroups\":[{\"name\":\"qlarhqt\",\"ports\":[\"azekdzdzffzjwzts\"]},{\"name\":\"chggryelg\",\"ports\":[\"tig\"]},{\"name\":\"frrkdknczgorywnv\",\"ports\":[\"vmd\"]},{\"name\":\"dlhqvbkarbpyhssr\",\"ports\":[\"pkpkocm\",\"ccebxxopyicyvspe\",\"lhwyykgvrccpumd\"]}]}]}") - .toObject(NetworkTapRulePatchableProperties.class); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("pvd", model.tapRulesUrl()); - Assertions.assertEquals("eerscdxrnrnjrcu", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(6706008368624061443L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pahu", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmummmkva", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ua", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("rchxwwuzdmhvwl", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("it", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lvrqo", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("psa", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("gkwdr", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("eailwdqmqf", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("tmfx", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("d", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("m", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("gi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("veywetkrhlolmcn", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("fgsvbbvaqdljnpet", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("qlarhqt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("azekdzdzffzjwzts", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapRulePatchableProperties model - = new NetworkTapRulePatchableProperties().withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("pvd") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("eerscdxrnrnjrcu") - .withSequenceNumber(6706008368624061443L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes( - Arrays.asList("pahu", "onjkkxukguehvvp", "joegcjojlleuidp", "tonvhgnhtmeplhb")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("pmummmkva", "uc")) - .withInnerVlans(Arrays.asList("ua", "qpmnu")) - .withVlanGroupNames(Arrays.asList("rchxwwuzdmhvwl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("it", "dsjipdviscotyxb", "iifef")) - .withIpGroupNames(Arrays.asList("lvrqo"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("psa", "mameub", "qiqmlfvhlq", "skkqjmxptuei")) - .withPortGroupNames(Arrays.asList("gkwdr"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("eailwdqmqf") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("tmfx") - .withMatchConfigurationName("d"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("namkuuyiuyu") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("lxicwgpthdcf") - .withMatchConfigurationName("z"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("fodropalvngtwyu") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("qrntaumdrc") - .withMatchConfigurationName("vkrkegtyczup"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("yxlz") - .withSequenceNumber(7662588380490129928L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("egbthm", "ritjbu")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("unozfvualjthoiv", "dwsngkr", "ihscjvakmhzbhw")) - .withInnerVlans(Arrays.asList("bwihbnnxemvynu", "qkotauratn")) - .withVlanGroupNames(Arrays.asList("pfzsclefyrl", "tndqlmf", "ggnbbuypwovvvsfl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("rehjuqwvapx", "lzhpzihacenq", "zlxnqzubf")) - .withIpGroupNames(Arrays.asList("dbgmkfwmjcwte", "fhxwyr", "b"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("s", "xduetbapfc", "ewxtrl")) - .withPortGroupNames(Arrays.asList("xyazkjpirgzx", "bcz"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes( - Arrays.asList("eikmwlaoklfni", "yxgucbmtredsc", "nstjcyyuvtz", "xzhclec")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("qzcl", "yh", "u", "gi")) - .withInnerVlans(Arrays.asList("gyresgzsd", "mwb", "orj")) - .withVlanGroupNames(Arrays.asList("chy", "hakvyrfbqvum"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("pmaxfnzlpqmpf", "xef", "ulbl", "rtux")) - .withIpGroupNames(Arrays.asList("hfcaeo", "ifq", "ywjflobh", "hqmomfeco"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("pcha")) - .withPortGroupNames(Arrays.asList("eplrajubowuywevt"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("y")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("uqs")) - .withInnerVlans(Arrays.asList("qyvoupr", "y", "qzssl", "mgw")) - .withVlanGroupNames(Arrays.asList("vrxpfdu", "olhg", "qvpbfjpoqzucfzl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("bormvhvzielbp", "nqujywz", "qyggmnwsvhb")) - .withIpGroupNames(Arrays.asList("iwyejtobdr"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xldjmzezbj")) - .withPortGroupNames(Arrays.asList("lslu", "bqfy"))))) - .withActions(Arrays - .asList(new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("kunsbfjhhlwtpkv") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("tt") - .withMatchConfigurationName("kgtzqnwqsttewu"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ysjeufjx") - .withSequenceNumber(1275946665450936475L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("xuoxtfnres")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("gckncjmg")) - .withInnerVlans(Arrays.asList("vbt")) - .withVlanGroupNames(Arrays.asList("fmjymjnh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("upubdxckdlhz", "hcu", "vbosjj", "dizhrjqfyaytvsly")) - .withIpGroupNames(Arrays.asList("gniuar", "cjiwgsxfaio", "wd"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("vrhprrvbwonleqf", "vtlrvbstph", "ykunin", "tlnrj")) - .withPortGroupNames(Arrays.asList("dbuziciqppoqvg", "newuhwfw"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("xdyyrud", "ahswtvdkxb", "ssgfenffdxbvwfqj")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("d", "ija", "xndmuvar")) - .withInnerVlans(Arrays.asList("zj", "tp", "rmuhcuhtuzlx")) - .withVlanGroupNames(Arrays.asList("o"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("wrapczdojqy", "zesi", "iysnjqyowaadc")) - .withIpGroupNames(Arrays.asList("za"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("zxbarcbpae", "zqsym", "w")) - .withPortGroupNames(Arrays.asList("cytesmf", "crtfodqhuauzm", "iv", "trfzhhezvh"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("cejo", "ylblfsprr", "cspimtcvvfxrdy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("lxiz", "qikm", "obliqemcdiiisk", "bonxxupj")) - .withInnerVlans( - Arrays.asList("rk", "kgenjqnnpjwkosn", "xigfoujjc", "gdqmrlhnzkwop")) - .withVlanGroupNames(Arrays.asList("yinxu", "rrxyxwjezbfqpl", "yuekdcpvuftrsvjm", - "svujnjktvolefcj"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("otfbjampqoclann")) - .withIpGroupNames( - Arrays.asList("nlsuqbwzstr", "tgvpatr", "jjktfin", "hoksmmculwk"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("aupwhlzyckrem", "jlm")) - .withPortGroupNames(Arrays.asList("orsirx", "hyrkqakofajfr", "prfvmkinwteyrqsh"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("hfwlfxzfwugeup", "knecexkgrv", "psjdmng", "yt")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans( - Arrays.asList("fyxcnwawoxcgzbej", "fbifopfjxdwdrp", "zqjkrf", "bwotfcuuugtji")) - .withInnerVlans(Arrays.asList("ayiawohfm", "nnzm", "cjjkmqenh", "idzr")) - .withVlanGroupNames(Arrays.asList("gloiovsl", "ivqsuvwtenb"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("yoaq", "ukuicjuftekioo", "nd")) - .withIpGroupNames(Arrays.asList("fhvpxjhxzubfj", "abbwzgvzu", "ixcdckixs"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("jflsgaojb", "qpqsdoctpzpuj")) - .withPortGroupNames(Arrays.asList("mcdsgxcelujisw", "lu"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("vkmvyxzerejrkp") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("etjx") - .withMatchConfigurationName("opt"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("whlbecgihzbpem") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("bovr") - .withMatchConfigurationName("xywpjhspboxhif"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("peswyhhmifjuajx") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("mmp") - .withMatchConfigurationName("lyuqvcmlaexb"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("fpnezsjzayml") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("hyogzmsimeht") - .withMatchConfigurationName("uwdhtq"))))) - .withDynamicMatchConfigurations( - Arrays - .asList( - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays - .asList(new IpGroupProperties().withName("m") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("gi", "nomwnwnghojovke", "ymicjixx", - "sfpcrtnuguefxxij")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("veywetkrhlolmcn") - .withVlans(Arrays.asList("fgsvbbvaqdljnpet", "rnrdetawevx", "huekdxljzvdovb", - "blerlpr")), - new VlanGroupProperties().withName("qccddcbny") - .withVlans(Arrays.asList("c", "xwbpwyykdig")), - new VlanGroupProperties().withName("lrzndas").withVlans(Arrays.asList("dmjqmvy")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("qlarhqt") - .withPorts(Arrays.asList("azekdzdzffzjwzts")), - new PortGroupProperties().withName("chggryelg").withPorts(Arrays.asList("tig")), - new PortGroupProperties().withName("frrkdknczgorywnv") - .withPorts(Arrays.asList("vmd")), - new PortGroupProperties().withName("dlhqvbkarbpyhssr") - .withPorts(Arrays.asList("pkpkocm", "ccebxxopyicyvspe", "lhwyykgvrccpumd")))))); - model = BinaryData.fromObject(model).toObject(NetworkTapRulePatchableProperties.class); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("pvd", model.tapRulesUrl()); - Assertions.assertEquals("eerscdxrnrnjrcu", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(6706008368624061443L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pahu", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmummmkva", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ua", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("rchxwwuzdmhvwl", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("it", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lvrqo", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("psa", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("gkwdr", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("eailwdqmqf", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("tmfx", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("d", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("m", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("gi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("veywetkrhlolmcn", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("fgsvbbvaqdljnpet", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("qlarhqt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("azekdzdzffzjwzts", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java index e20b7e0596a0..605a983a6a59 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,14 +10,16 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; @@ -33,207 +35,411 @@ public final class NetworkTapRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleProperties model = BinaryData.fromString( - "{\"networkTapId\":\"uynhbokayrgwybr\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-05-22T17:45:37Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"igsioctqkm\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xvzfffhtjnwos\",\"sequenceNumber\":4567273419330613691,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"riomxeezwyhj\"],\"portGroupNames\":[\"iqegm\",\"db\",\"ohcwhpyv\"]},\"protocolTypes\":[\"detsz\",\"canzb\",\"ekwuyckyvn\",\"nsm\"],\"vlanMatchCondition\":{\"vlans\":[\"wjbct\",\"bpzujqjtotdxp\"],\"innerVlans\":[\"slhwuusieckty\",\"h\",\"uxidhhxomilddxj\"],\"vlanGroupNames\":[\"gxwjwil\",\"qrslaate\",\"twujjzgx\",\"gqwlxrhg\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kbkkteoze\",\"ogmkorvvmvmco\",\"nqhlbs\",\"osnqliwkmzojfe\"],\"ipGroupNames\":[\"lhtgmkn\",\"zgbjbhrpgi\",\"sttcucrcmm\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"f\"],\"portGroupNames\":[\"sld\",\"tohqclna\",\"h\",\"gsiqikvllr\"]},\"protocolTypes\":[\"mgl\"],\"vlanMatchCondition\":{\"vlans\":[\"km\",\"rawrqkzawbunmp\",\"klwzlw\"],\"innerVlans\":[\"rne\",\"zltkaszfj\",\"xscbduxapgrcqe\",\"mvrdjomlnwsbv\"],\"vlanGroupNames\":[\"sflxkqesd\",\"ed\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"inm\",\"hymcq\",\"dklt\",\"dhqnufbxweiib\"],\"ipGroupNames\":[\"jovf\",\"ybydhui\",\"aouwudh\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wvumosqircamqprl\",\"brugejcvjkjycz\",\"mtagelajdyol\"],\"portGroupNames\":[\"yxqfmzsizzhravr\"]},\"protocolTypes\":[\"jymgqbgcxhn\",\"xgzxlermkmer\",\"hskirhnp\"],\"vlanMatchCondition\":{\"vlans\":[\"bkfukdljq\",\"vtsdydshkpafy\"],\"innerVlans\":[\"owwzizznyufpqzst\",\"fgufyjfdkqiy\"],\"vlanGroupNames\":[\"jokgwesymzqh\",\"qpfzlpejtznxlue\",\"ujqbbgsimwejl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bdwbcp\",\"aswkuhydtnaczkf\",\"fatgawphnski\",\"dwgtqcumecsaa\"],\"ipGroupNames\":[\"qbdiuycsbskowkr\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"mqowiuasfgqg\",\"cyhfaimqvdru\",\"zkgyfpeoe\",\"gfmq\"],\"portGroupNames\":[\"kixvlzjxplh\"]},\"protocolTypes\":[\"asyntv\",\"jy\"],\"vlanMatchCondition\":{\"vlans\":[\"qrvvbq\",\"knmp\"],\"innerVlans\":[\"xgiqasifubn\"],\"vlanGroupNames\":[\"tlpwqpjnxjkhtups\",\"yo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"wkztsmsfbevyl\",\"znfhkqytk\"],\"ipGroupNames\":[\"do\",\"gfzdgjfcycrsvl\",\"yyhigqkzjuqw\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"x\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"yoipnfdb\",\"matchConfigurationName\":\"oscienezfvbe\"},{\"type\":\"Mirror\",\"truncate\":\"kbpjnrte\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"thr\",\"matchConfigurationName\":\"mdudsy\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ktjhffe\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"youergaghp\",\"zxkpyehhfdyld\"]},{\"name\":\"yedzfzq\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tdereunokakzw\",\"pjlwyxe\"]},{\"name\":\"nmxrfomckewvmyi\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jjtpdyzoutxfptof\",\"gnuywezygva\",\"gaaqw\"]},{\"name\":\"gjpytpmpvdnogehl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"tbnukkfaxz\",\"vbxxyjisskobqoc\"]}],\"vlanGroups\":[{\"name\":\"oewyhxessmvrkd\",\"vlans\":[\"eqfbd\"]}],\"portGroups\":[{\"name\":\"esbrujbjpppktl\",\"ports\":[\"bfm\"]},{\"name\":\"ieat\",\"ports\":[\"rnminzqplgtkih\"]},{\"name\":\"ikzsrzfffji\",\"ports\":[\"bpntogkensckhb\",\"carmoyfx\",\"kwykuqdndxl\"]}]}],\"annotation\":\"h\"}") + "{\"annotation\":\"m\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"mslub\",\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"fuysjhv\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"fswarmybw\",\"sequenceNumber\":3797409761848661333,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"wwcbfnxiaj\",\"vjucfjisosfzl\"],\"portGroupNames\":[\"xnfyzgu\",\"xfh\"]},\"protocolTypes\":[\"xgofq\",\"qwsjmihuvrq\",\"bxdoicqpkntl\"],\"vlanMatchCondition\":{\"vlans\":[\"p\",\"nsbmzjritukoym\"],\"innerVlans\":[\"exmizzjxwjoqfzw\"],\"vlanGroupNames\":[\"uhduwdvol\",\"tqmri\",\"dsf\",\"zbkiumjf\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"azhvchvvo\",\"iogbntnwzruzsoo\",\"xcsmxtl\",\"a\"],\"ipGroupNames\":[\"vcebspcir\",\"omhkdwuwedupb\",\"mzkwhjjsqwhae\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"n\",\"cvaqycdzdobues\",\"yvfxnzpfdfupk\"],\"portGroupNames\":[\"dpsegivytabvbbk\",\"lewgsltut\"]},\"protocolTypes\":[\"edwu\",\"qbmenxc\"],\"vlanMatchCondition\":{\"vlans\":[\"clykcrudekkbnjre\",\"mptedeuenthsh\"],\"innerVlans\":[\"ygpgpkkhpjnglaql\",\"ihnmtrdlpxiwwg\"],\"vlanGroupNames\":[\"vfpnrzikvoxloeoh\",\"fivxdifb\",\"b\",\"ijhpxukxgoyxontb\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"uqr\",\"ldxfuaefewxatkt\",\"jrppif\",\"yrqvelrmd\"],\"ipGroupNames\":[\"hvksbojkl\",\"jpzwyn\",\"wksmpyeyzolb\",\"nflytfxud\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"kqwopws\",\"liyznghuqzgp\"],\"portGroupNames\":[\"kfv\"]},\"protocolTypes\":[\"gavtfy\",\"sedfmzu\",\"ryxpi\"],\"vlanMatchCondition\":{\"vlans\":[\"eakfdmcedlik\",\"x\"],\"innerVlans\":[\"ddoq\"],\"vlanGroupNames\":[\"qtrkicw\",\"qyrgqmndk\",\"wwmu\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"fsrnackitlwgeb\",\"lpzjeldaqwjun\"],\"ipGroupNames\":[\"ijhwcbrdsypotnpk\",\"vzpkodngvnq\",\"jgsbtwgnld\"]}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"vbqy\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"irpiiuvcqoqkqw\",\"matchConfigurationName\":\"qsdgbxcw\"}]},{\"matchConfigurationName\":\"mi\",\"sequenceNumber\":6191529865804043004,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"maihtnnlbhxjppcb\",\"et\"],\"portGroupNames\":[\"ppvolzayjw\",\"unj\",\"mprklatwiuujxsuj\"]},\"protocolTypes\":[\"gxeegxbnjnczepd\",\"cymgbfmdquyyaes\",\"jxnavpyxqbkxdtb\"],\"vlanMatchCondition\":{\"vlans\":[\"ainzkefkzlx\",\"coz\"],\"innerVlans\":[\"eozlibcbn\",\"nz\",\"ysajvvqlhonyonel\",\"vgt\"],\"vlanGroupNames\":[\"kqjqjcaj\",\"of\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"rvkxeojtdyulg\",\"helwruklfqfxs\",\"xgogypbztgaexjns\",\"vctvuzimbwttm\"],\"ipGroupNames\":[\"rycyx\",\"nwukfajnpdw\",\"jggkwdepem\",\"iayfiqiidxco\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"rttcuayiqylnkm\",\"xzifbqgqexowqzrt\",\"qrq\"],\"portGroupNames\":[\"fy\",\"kuobpw\",\"inpgobothxiew\",\"pnyjtu\"]},\"protocolTypes\":[\"yvextch\",\"lroldowuwhdlrif\",\"ozttcbiich\"],\"vlanMatchCondition\":{\"vlans\":[\"sozodwjcfq\",\"yxryqyc\",\"mz\",\"lcfgdwzauzfdhe\"],\"innerVlans\":[\"yciwzkil\"],\"vlanGroupNames\":[\"adfgesvzohabbriz\",\"adjrsbgailjqovqm\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"nkiu\",\"kgltsxooiobhieb\"],\"ipGroupNames\":[\"tlsrvqzgaqsosrn\",\"lvgrghnhuoxrqhjn\",\"npesw\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"qzmcsviuj\"],\"portGroupNames\":[\"dvmsnaosxsx\",\"xvimdvetqhdb\"]},\"protocolTypes\":[\"sbyujs\",\"omr\",\"humgr\",\"sdbvq\"],\"vlanMatchCondition\":{\"vlans\":[\"gfkgxbdpbcehwb\",\"psesboynpyt\",\"orrvk\"],\"innerVlans\":[\"ctanetinqxdhnpj\",\"ezjigh\"],\"vlanGroupNames\":[\"l\",\"pmrzwvwetqf\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"hngqqxjbsotocl\",\"rttujydeatwxp\",\"bx\"],\"ipGroupNames\":[\"xbboceksramqch\",\"ugfnlvvkswurxdq\",\"vhauimnntfkqp\",\"qcnbnwivlqcwyzh\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"zecdlceirta\",\"tuwcimtcaumv\",\"udzpsjqrmlujmt\",\"nlofwuzebfq\"],\"portGroupNames\":[\"jbhzyenf\",\"petxeudwkh\",\"lckdoxocjcdevzp\"]},\"protocolTypes\":[\"ortwwyjm\",\"vrlhfxmrhjn\",\"h\"],\"vlanMatchCondition\":{\"vlans\":[\"wkdywkszavuafan\"],\"innerVlans\":[\"ctptplko\",\"sjbzvxpz\"],\"vlanGroupNames\":[\"zuh\",\"gtiaczhfjdcc\",\"nyuvbtcuhjcgjt\",\"kntomnlz\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bzrrxeyvidcowlr\"],\"ipGroupNames\":[\"ctqxa\"]}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"vwkryzgav\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"mdfie\",\"matchConfigurationName\":\"iskyyyaekn\"},{\"type\":\"Drop\",\"truncate\":\"shdawjlmlc\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"jiutfofhoajj\",\"matchConfigurationName\":\"syqyjnu\"}]},{\"matchConfigurationName\":\"vlqq\",\"sequenceNumber\":2330458650285600355,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"qtvuxeujmdssijua\",\"xfdlypkcpws\",\"qnnmjundt\"],\"portGroupNames\":[\"ltjhb\",\"ycgqakcsihxvt\",\"cwwfopxp\"]},\"protocolTypes\":[\"nsbubwhzqqgugwlu\"],\"vlanMatchCondition\":{\"vlans\":[\"qmmkdhwqcqwebag\",\"fpkeph\",\"jeucosvkkeergvy\"],\"innerVlans\":[\"pjpyillgnuee\",\"fpffbuqxknv\",\"cgmbg\"],\"vlanGroupNames\":[\"jfchicpare\",\"zoksgqhb\",\"ojuxil\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"l\",\"flj\"],\"ipGroupNames\":[\"b\",\"tsflotumbm\"]}}],\"actions\":[{\"type\":\"Goto\",\"truncate\":\"fgmuxuqiagskoik\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"hskxpa\",\"matchConfigurationName\":\"kgvnlfu\"},{\"type\":\"Replicate\",\"truncate\":\"zibrlr\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"febpiucenbvrl\",\"matchConfigurationName\":\"dfkn\"},{\"type\":\"Count\",\"truncate\":\"ilsxr\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"zlwrduxntpfxxgj\",\"matchConfigurationName\":\"yxfwfctq\"},{\"type\":\"Goto\",\"truncate\":\"bkqynlzx\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"upjckiehdm\",\"matchConfigurationName\":\"o\"}]},{\"matchConfigurationName\":\"xxxffgmcuanszee\",\"sequenceNumber\":2393258009178106661,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"sekijhminenkb\",\"vpyr\"],\"portGroupNames\":[\"rlfqm\",\"j\"]},\"protocolTypes\":[\"nbfvvcwvurkmj\"],\"vlanMatchCondition\":{\"vlans\":[\"vlnpbsotmynklnm\",\"znmtvrk\"],\"innerVlans\":[\"wxizkstxneykei\",\"xutcbvriuvnfazx\",\"vsa\"],\"vlanGroupNames\":[\"eiivjq\",\"qtjwrvewojoq\",\"xqetxtdqius\",\"guz\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"qjhl\"],\"ipGroupNames\":[\"zmjsisfqqhcmec\",\"gsbfeiirpnjy\",\"llfkchhgs\",\"uzzc\"]}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"cyca\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"kkhdhpmkxdu\",\"matchConfigurationName\":\"xpuq\"},{\"type\":\"Drop\",\"truncate\":\"qywsuarp\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"hezxi\",\"matchConfigurationName\":\"syxbfjilb\"},{\"type\":\"Goto\",\"truncate\":\"couhwivkdfvjskn\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"epir\",\"matchConfigurationName\":\"cpiqdqbvxqtol\"},{\"type\":\"Replicate\",\"truncate\":\"pvhcbtza\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"cont\",\"matchConfigurationName\":\"kfki\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"sg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"bjwvrudm\",\"wewpmioleajabe\",\"g\"]}],\"vlanGroups\":[{\"name\":\"hbj\",\"vlans\":[\"ecmbaaj\",\"fwrdkql\",\"zkfekdesb\"]},{\"name\":\"qtllbhjjpduibs\",\"vlans\":[\"qnneqrypyurvs\",\"hovtuercp\",\"hbwcxybtdzycx\"]}],\"portGroups\":[{\"name\":\"gjzgpljbnwczsr\",\"ports\":[\"bybicqhxhj\",\"uapasizzfmugykw\",\"ycuotennd\",\"gthdzi\"]},{\"name\":\"zffpherwj\",\"ports\":[\"wtwona\"]},{\"name\":\"zmzxvfybxmmrvnu\",\"ports\":[\"rrsguogk\"]}]},{\"ipGroups\":[{\"name\":\"tpyabensjflwp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"tmvifgcv\",\"im\"]},{\"name\":\"bmticxgosnxajp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"zxaoxlhmvjcnnls\",\"nucqxhpaqo\",\"bvejo\"]},{\"name\":\"oxovlz\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dkqdlq\",\"hntqrykkxakruup\",\"iicgvpz\",\"yxccnpxie\"]},{\"name\":\"cmz\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"snnbrys\",\"ktfmocnq\",\"blrtbofzghfuif\"]}],\"vlanGroups\":[{\"name\":\"ynohocqxug\",\"vlans\":[\"gdcrrfbpl\",\"hmhurosdjlzb\"]},{\"name\":\"ddg\",\"vlans\":[\"uyaorservpv\",\"sorsbegcl\",\"ex\"]},{\"name\":\"jqzyhzydy\",\"vlans\":[\"qvirluns\",\"kydigt\",\"jx\"]}],\"portGroups\":[{\"name\":\"vje\",\"ports\":[\"chxzj\",\"cwuzs\"]},{\"name\":\"fyixe\",\"ports\":[\"sjnf\",\"ngxaojeeyv\",\"xbfckmoal\",\"axvwxtxuzh\"]},{\"name\":\"jyffwflbkjc\",\"ports\":[\"iyg\",\"cyzcjefpubaldj\",\"gldry\",\"lrlkbh\"]}]}],\"networkTapId\":\"rmxca\",\"networkTapIds\":[\"fomfbozpjyxefppq\",\"wdnnjjthpsnxebyc\",\"mpohxubnnpnsebcx\"],\"pollingIntervalInSeconds\":719979289,\"lastSyncedTime\":\"2021-06-28T19:53:12Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"sjlmykd\"},\"lastOperation\":{\"details\":\"vgspjlfzhjngwqx\"},\"networkFabricIds\":[\"crgyoimmsszz\",\"c\"],\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"EnabledDegraded\"}") .toObject(NetworkTapRuleProperties.class); - Assertions.assertEquals("h", model.annotation()); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("igsioctqkm", model.tapRulesUrl()); - Assertions.assertEquals("xvzfffhtjnwos", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4567273419330613691L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("m", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("mslub", model.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("fuysjhv", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("fswarmybw", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3797409761848661333L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("detsz", + Assertions.assertEquals("xgofq", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("wjbct", + Assertions.assertEquals("p", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("slhwuusieckty", + Assertions.assertEquals("exmizzjxwjoqfzw", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("gxwjwil", + Assertions.assertEquals("uhduwdvol", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("kbkkteoze", + Assertions.assertEquals("azhvchvvo", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lhtgmkn", + Assertions.assertEquals("vcebspcir", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.TCP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("riomxeezwyhj", + Assertions.assertEquals("wwcbfnxiaj", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("iqegm", + Assertions.assertEquals("xnfyzgu", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("x", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, + Assertions.assertEquals(TapRuleActionType.REDIRECT, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("vbqy", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("yoipnfdb", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("oscienezfvbe", + Assertions.assertEquals("irpiiuvcqoqkqw", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("qsdgbxcw", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("ktjhffe", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("sg", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("youergaghp", + Assertions.assertEquals("bjwvrudm", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("oewyhxessmvrkd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("eqfbd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("esbrujbjpppktl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("bfm", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("hbj", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("ecmbaaj", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gjzgpljbnwczsr", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("bybicqhxhj", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(719979289, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("sjlmykd", model.globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleProperties model = new NetworkTapRuleProperties().withAnnotation("h") - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("igsioctqkm") - .withMatchConfigurations(Arrays.asList(new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("xvzfffhtjnwos") - .withSequenceNumber(4567273419330613691L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("detsz", "canzb", "ekwuyckyvn", "nsm")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("wjbct", "bpzujqjtotdxp")) - .withInnerVlans(Arrays.asList("slhwuusieckty", "h", "uxidhhxomilddxj")) - .withVlanGroupNames(Arrays.asList("gxwjwil", "qrslaate", "twujjzgx", "gqwlxrhg"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("kbkkteoze", "ogmkorvvmvmco", "nqhlbs", "osnqliwkmzojfe")) - .withIpGroupNames(Arrays.asList("lhtgmkn", "zgbjbhrpgi", "sttcucrcmm"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("riomxeezwyhj")) - .withPortGroupNames(Arrays.asList("iqegm", "db", "ohcwhpyv"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("mgl")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("km", "rawrqkzawbunmp", "klwzlw")) - .withInnerVlans(Arrays.asList("rne", "zltkaszfj", "xscbduxapgrcqe", "mvrdjomlnwsbv")) - .withVlanGroupNames(Arrays.asList("sflxkqesd", "ed"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("inm", "hymcq", "dklt", "dhqnufbxweiib")) - .withIpGroupNames(Arrays.asList("jovf", "ybydhui", "aouwudh"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("f")) - .withPortGroupNames(Arrays.asList("sld", "tohqclna", "h", "gsiqikvllr"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("jymgqbgcxhn", "xgzxlermkmer", "hskirhnp")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("bkfukdljq", "vtsdydshkpafy")) - .withInnerVlans(Arrays.asList("owwzizznyufpqzst", "fgufyjfdkqiy")) - .withVlanGroupNames(Arrays.asList("jokgwesymzqh", "qpfzlpejtznxlue", "ujqbbgsimwejl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("bdwbcp", "aswkuhydtnaczkf", "fatgawphnski", "dwgtqcumecsaa")) - .withIpGroupNames(Arrays.asList("qbdiuycsbskowkr"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wvumosqircamqprl", "brugejcvjkjycz", "mtagelajdyol")) - .withPortGroupNames(Arrays.asList("yxqfmzsizzhravr"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("asyntv", "jy")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("qrvvbq", "knmp")) - .withInnerVlans(Arrays.asList("xgiqasifubn")) - .withVlanGroupNames(Arrays.asList("tlpwqpjnxjkhtups", "yo"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("wkztsmsfbevyl", "znfhkqytk")) - .withIpGroupNames(Arrays.asList("do", "gfzdgjfcycrsvl", "yyhigqkzjuqw"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("mqowiuasfgqg", "cyhfaimqvdru", "zkgyfpeoe", "gfmq")) - .withPortGroupNames(Arrays.asList("kixvlzjxplh"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("x") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("yoipnfdb") - .withMatchConfigurationName("oscienezfvbe"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("kbpjnrte") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("thr") - .withMatchConfigurationName("mdudsy"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ktjhffe") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("youergaghp", "zxkpyehhfdyld")), - new IpGroupProperties().withName("yedzfzq") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("tdereunokakzw", "pjlwyxe")), - new IpGroupProperties().withName("nmxrfomckewvmyi") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("jjtpdyzoutxfptof", "gnuywezygva", "gaaqw")), - new IpGroupProperties().withName("gjpytpmpvdnogehl") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("tbnukkfaxz", "vbxxyjisskobqoc")))) - .withVlanGroups(Arrays - .asList(new VlanGroupProperties().withName("oewyhxessmvrkd").withVlans(Arrays.asList("eqfbd")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("esbrujbjpppktl").withPorts(Arrays.asList("bfm")), - new PortGroupProperties().withName("ieat").withPorts(Arrays.asList("rnminzqplgtkih")), - new PortGroupProperties().withName("ikzsrzfffji") - .withPorts(Arrays.asList("bpntogkensckhb", "carmoyfx", "kwykuqdndxl")))))); + NetworkTapRuleProperties model + = new NetworkTapRuleProperties().withAnnotation("m") + .withConfigurationType(ConfigurationType.INLINE) + .withTapRulesUrl("mslub") + .withIdentitySelector( + new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("fuysjhv")) + .withMatchConfigurations( + Arrays.asList( + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("fswarmybw") + .withSequenceNumber(3797409761848661333L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("xgofq", "qwsjmihuvrq", "bxdoicqpkntl")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("p", "nsbmzjritukoym")) + .withInnerVlans(Arrays.asList("exmizzjxwjoqfzw")) + .withVlanGroupNames(Arrays.asList("uhduwdvol", "tqmri", "dsf", "zbkiumjf"))) + .withIpCondition(new IpMatchCondition() + .withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("azhvchvvo", "iogbntnwzruzsoo", "xcsmxtl", "a")) + .withIpGroupNames(Arrays.asList("vcebspcir", "omhkdwuwedupb", "mzkwhjjsqwhae"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition() + .withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("wwcbfnxiaj", "vjucfjisosfzl")) + .withPortGroupNames(Arrays.asList("xnfyzgu", "xfh"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("edwu", "qbmenxc")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("clykcrudekkbnjre", "mptedeuenthsh")) + .withInnerVlans(Arrays.asList("ygpgpkkhpjnglaql", "ihnmtrdlpxiwwg")) + .withVlanGroupNames( + Arrays.asList("vfpnrzikvoxloeoh", "fivxdifb", "b", "ijhpxukxgoyxontb"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues( + Arrays.asList("uqr", "ldxfuaefewxatkt", "jrppif", "yrqvelrmd")) + .withIpGroupNames( + Arrays.asList("hvksbojkl", "jpzwyn", "wksmpyeyzolb", "nflytfxud"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("n", "cvaqycdzdobues", "yvfxnzpfdfupk")) + .withPortGroupNames(Arrays.asList("dpsegivytabvbbk", "lewgsltut"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("gavtfy", "sedfmzu", "ryxpi")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("eakfdmcedlik", "x")) + .withInnerVlans(Arrays.asList("ddoq")) + .withVlanGroupNames(Arrays.asList("qtrkicw", "qyrgqmndk", "wwmu"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("fsrnackitlwgeb", "lpzjeldaqwjun")) + .withIpGroupNames( + Arrays.asList("ijhwcbrdsypotnpk", "vzpkodngvnq", "jgsbtwgnld"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("kqwopws", "liyznghuqzgp")) + .withPortGroupNames(Arrays.asList("kfv"))))) + .withActions(Arrays.asList(new NetworkTapRuleAction() + .withType(TapRuleActionType.REDIRECT) + .withTruncate("vbqy") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("irpiiuvcqoqkqw") + .withMatchConfigurationName("qsdgbxcw"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("mi") + .withSequenceNumber(6191529865804043004L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("gxeegxbnjnczepd", "cymgbfmdquyyaes", "jxnavpyxqbkxdtb")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("ainzkefkzlx", "coz")) + .withInnerVlans(Arrays.asList("eozlibcbn", "nz", "ysajvvqlhonyonel", "vgt")) + .withVlanGroupNames(Arrays.asList("kqjqjcaj", "of"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("rvkxeojtdyulg", "helwruklfqfxs", + "xgogypbztgaexjns", "vctvuzimbwttm")) + .withIpGroupNames( + Arrays.asList("rycyx", "nwukfajnpdw", "jggkwdepem", "iayfiqiidxco"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("maihtnnlbhxjppcb", "et")) + .withPortGroupNames(Arrays.asList("ppvolzayjw", "unj", "mprklatwiuujxsuj"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("yvextch", "lroldowuwhdlrif", "ozttcbiich")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("sozodwjcfq", "yxryqyc", "mz", "lcfgdwzauzfdhe")) + .withInnerVlans(Arrays.asList("yciwzkil")) + .withVlanGroupNames(Arrays.asList("adfgesvzohabbriz", "adjrsbgailjqovqm"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("nkiu", "kgltsxooiobhieb")) + .withIpGroupNames( + Arrays.asList("tlsrvqzgaqsosrn", "lvgrghnhuoxrqhjn", "npesw"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("rttcuayiqylnkm", "xzifbqgqexowqzrt", "qrq")) + .withPortGroupNames(Arrays.asList("fy", "kuobpw", "inpgobothxiew", "pnyjtu"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("sbyujs", "omr", "humgr", "sdbvq")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("gfkgxbdpbcehwb", "psesboynpyt", "orrvk")) + .withInnerVlans(Arrays.asList("ctanetinqxdhnpj", "ezjigh")) + .withVlanGroupNames(Arrays.asList("l", "pmrzwvwetqf"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("hngqqxjbsotocl", "rttujydeatwxp", "bx")) + .withIpGroupNames(Arrays.asList("xbboceksramqch", "ugfnlvvkswurxdq", + "vhauimnntfkqp", "qcnbnwivlqcwyzh"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("qzmcsviuj")) + .withPortGroupNames(Arrays.asList("dvmsnaosxsx", "xvimdvetqhdb"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("ortwwyjm", "vrlhfxmrhjn", "h")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("wkdywkszavuafan")) + .withInnerVlans(Arrays.asList("ctptplko", "sjbzvxpz")) + .withVlanGroupNames( + Arrays.asList("zuh", "gtiaczhfjdcc", "nyuvbtcuhjcgjt", "kntomnlz"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("bzrrxeyvidcowlr")) + .withIpGroupNames(Arrays.asList("ctqxa"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("zecdlceirta", "tuwcimtcaumv", "udzpsjqrmlujmt", + "nlofwuzebfq")) + .withPortGroupNames( + Arrays.asList("jbhzyenf", "petxeudwkh", "lckdoxocjcdevzp"))))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) + .withTruncate("vwkryzgav") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("mdfie") + .withMatchConfigurationName("iskyyyaekn"), + new NetworkTapRuleAction().withType(TapRuleActionType.DROP) + .withTruncate("shdawjlmlc") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("jiutfofhoajj") + .withMatchConfigurationName("syqyjnu"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("vlqq") + .withSequenceNumber(2330458650285600355L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("nsbubwhzqqgugwlu")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("qmmkdhwqcqwebag", "fpkeph", "jeucosvkkeergvy")) + .withInnerVlans(Arrays.asList("pjpyillgnuee", "fpffbuqxknv", "cgmbg")) + .withVlanGroupNames(Arrays.asList("jfchicpare", "zoksgqhb", "ojuxil"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("l", "flj")) + .withIpGroupNames(Arrays.asList("b", "tsflotumbm"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("qtvuxeujmdssijua", "xfdlypkcpws", "qnnmjundt")) + .withPortGroupNames(Arrays.asList("ltjhb", "ycgqakcsihxvt", "cwwfopxp"))))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("fgmuxuqiagskoik") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("hskxpa") + .withMatchConfigurationName("kgvnlfu"), + new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("zibrlr") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("febpiucenbvrl") + .withMatchConfigurationName("dfkn"), + new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) + .withTruncate("ilsxr") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("zlwrduxntpfxxgj") + .withMatchConfigurationName("yxfwfctq"), + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("bkqynlzx") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("upjckiehdm") + .withMatchConfigurationName("o"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("xxxffgmcuanszee") + .withSequenceNumber(2393258009178106661L) + .withIpAddressType(IpAddressType.IPV6) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("nbfvvcwvurkmj")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("vlnpbsotmynklnm", "znmtvrk")) + .withInnerVlans(Arrays.asList("wxizkstxneykei", "xutcbvriuvnfazx", "vsa")) + .withVlanGroupNames(Arrays.asList("eiivjq", "qtjwrvewojoq", "xqetxtdqius", "guz"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("qjhl")) + .withIpGroupNames( + Arrays.asList("zmjsisfqqhcmec", "gsbfeiirpnjy", "llfkchhgs", "uzzc"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("sekijhminenkb", "vpyr")) + .withPortGroupNames(Arrays.asList("rlfqm", "j"))))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.LOG) + .withTruncate("cyca") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("kkhdhpmkxdu") + .withMatchConfigurationName("xpuq"), + new NetworkTapRuleAction().withType(TapRuleActionType.DROP) + .withTruncate("qywsuarp") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("hezxi") + .withMatchConfigurationName("syxbfjilb"), + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("couhwivkdfvjskn") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("epir") + .withMatchConfigurationName("cpiqdqbvxqtol"), + new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("pvhcbtza") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("cont") + .withMatchConfigurationName("kfki"))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("sg") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("bjwvrudm", "wewpmioleajabe", "g")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("hbj") + .withVlans(Arrays.asList("ecmbaaj", "fwrdkql", "zkfekdesb")), + new VlanGroupProperties().withName("qtllbhjjpduibs") + .withVlans(Arrays.asList("qnneqrypyurvs", "hovtuercp", "hbwcxybtdzycx")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("gjzgpljbnwczsr") + .withPorts(Arrays.asList("bybicqhxhj", "uapasizzfmugykw", "ycuotennd", "gthdzi")), + new PortGroupProperties().withName("zffpherwj").withPorts(Arrays.asList("wtwona")), + new PortGroupProperties().withName("zmzxvfybxmmrvnu") + .withPorts(Arrays.asList("rrsguogk")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("tpyabensjflwp") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("tmvifgcv", "im")), + new IpGroupProperties().withName("bmticxgosnxajp") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("zxaoxlhmvjcnnls", "nucqxhpaqo", "bvejo")), + new IpGroupProperties().withName("oxovlz") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("dkqdlq", "hntqrykkxakruup", "iicgvpz", "yxccnpxie")), + new IpGroupProperties().withName("cmz") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("snnbrys", "ktfmocnq", "blrtbofzghfuif")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("ynohocqxug") + .withVlans(Arrays.asList("gdcrrfbpl", "hmhurosdjlzb")), + new VlanGroupProperties().withName("ddg") + .withVlans(Arrays.asList("uyaorservpv", "sorsbegcl", "ex")), + new VlanGroupProperties().withName("jqzyhzydy") + .withVlans(Arrays.asList("qvirluns", "kydigt", "jx")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("vje").withPorts(Arrays.asList("chxzj", "cwuzs")), + new PortGroupProperties().withName("fyixe") + .withPorts(Arrays.asList("sjnf", "ngxaojeeyv", "xbfckmoal", "axvwxtxuzh")), + new PortGroupProperties().withName("jyffwflbkjc") + .withPorts(Arrays.asList("iyg", "cyzcjefpubaldj", "gldry", "lrlkbh")))))) + .withPollingIntervalInSeconds(719979289) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("sjlmykd")); model = BinaryData.fromObject(model).toObject(NetworkTapRuleProperties.class); - Assertions.assertEquals("h", model.annotation()); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("igsioctqkm", model.tapRulesUrl()); - Assertions.assertEquals("xvzfffhtjnwos", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4567273419330613691L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("m", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("mslub", model.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.identitySelector().identityType()); + Assertions.assertEquals("fuysjhv", model.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("fswarmybw", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3797409761848661333L, model.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("detsz", + Assertions.assertEquals("xgofq", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("wjbct", + Assertions.assertEquals("p", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("slhwuusieckty", + Assertions.assertEquals("exmizzjxwjoqfzw", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("gxwjwil", + Assertions.assertEquals("uhduwdvol", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("kbkkteoze", + Assertions.assertEquals("azhvchvvo", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lhtgmkn", + Assertions.assertEquals("vcebspcir", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.TCP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("riomxeezwyhj", + Assertions.assertEquals("wwcbfnxiaj", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("iqegm", + Assertions.assertEquals("xnfyzgu", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("x", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, + Assertions.assertEquals(TapRuleActionType.REDIRECT, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("vbqy", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("yoipnfdb", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("oscienezfvbe", + Assertions.assertEquals("irpiiuvcqoqkqw", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("qsdgbxcw", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("ktjhffe", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals("sg", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); Assertions.assertEquals(IpAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("youergaghp", + Assertions.assertEquals("bjwvrudm", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("oewyhxessmvrkd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("eqfbd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("esbrujbjpppktl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("bfm", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("hbj", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("ecmbaaj", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gjzgpljbnwczsr", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("bybicqhxhj", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(719979289, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("sjlmykd", model.globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java index 4e62aea23a34..4a9d261a96c2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java @@ -1,25 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -34,66 +40,69 @@ public final class NetworkTapRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkTapId\":\"pyzxcp\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-03-28T19:43:37Z\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"yvaxwzbwxx\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xsrrhr\",\"sequenceNumber\":431353177903491287,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"zuimpiybmybtihcg\",\"sequenceNumber\":8092509622305080555,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]}],\"annotation\":\"hxqnlmjvpm\"},\"location\":\"fibwvhwouhysr\",\"tags\":{\"yxpdzvgyujkxjge\":\"zjsnxzljxa\"},\"id\":\"zdbigitra\",\"name\":\"udyrsir\",\"type\":\"bpi\"}"; + = "{\"properties\":{\"annotation\":\"sziuhm\",\"configurationType\":\"File\",\"tapRulesUrl\":\"hupoeljf\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"oxajitaaw\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"qq\",\"sequenceNumber\":4761582517033287789,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"rymtgtn\",\"sequenceNumber\":5806483556841156945,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"od\",\"sequenceNumber\":3330448251199840137,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]}],\"networkTapId\":\"enkuyomb\",\"networkTapIds\":[\"yobuih\",\"rvoko\",\"rpyxkzxrmm\"],\"pollingIntervalInSeconds\":2061678344,\"lastSyncedTime\":\"2021-12-05T19:08:24Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"xoubekafdxgtgcfk\"},\"lastOperation\":{\"details\":\"u\"},\"networkFabricIds\":[\"tlk\"],\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"identity\":{\"principalId\":\"txsuxvjj\",\"tenantId\":\"wysrsw\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"odnxlcdgkcufanc\":{\"principalId\":\"zwebtskmqka\",\"clientId\":\"xjudyv\"},\"ia\":{\"principalId\":\"krskzwuubafqzi\",\"clientId\":\"vwjqjwv\"},\"uuwehntjssjbpnat\":{\"principalId\":\"qjzvivwd\",\"clientId\":\"tcfulmzxhgwzbyst\"},\"ujqyeyzoivi\":{\"principalId\":\"mvqichz\",\"clientId\":\"jityjznpryo\"}}},\"location\":\"nihmwvhc\",\"tags\":{\"djc\":\"uasutdhmilhzy\"},\"id\":\"un\",\"name\":\"dadyrhmpokfxcbb\",\"type\":\"mxgajyracelnlwg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTapRule response = manager.networkTapRules() - .define("mkuquvcgvn") - .withRegion("edijdhzkwvuewe") - .withExistingResourceGroup("hoqpbfjfcbweabpt") - .withTags(mapOf("lxdknxctglz", "jels", "fsgwi", "cx", "wjudx", "yiw", "zcffchn", "fvn")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) + .define("f") + .withRegion("akdtgpnyub") + .withExistingResourceGroup("fbrsmyisndf") .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("s") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("wfrgdmbgbht") - .withSequenceNumber(6435381219829762785L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("abhlgrrskvtz") - .withSequenceNumber(2401975033262174312L) + .withTags(mapOf("wv", "myewbfo", "njbahxyfdd", "etj", "ixawipjracyx", "btksrdjhqcrmptj", "zrcqdvapohemin", + "zadflvbkhg")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("kgfzbykapmeomcp", new UserAssignedIdentity()))) + .withAnnotation("owhnvcqhmuvg") + .withTapRulesUrl("ohurkt") + .withIdentitySelector( + new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("rtyijlvcmp")) + .withMatchConfigurations( + Arrays.asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("wbledbdkwzbkhvl") + .withSequenceNumber(4436388630444784950L) .withIpAddressType(IpAddressType.IPV4) .withMatchConditions( - Arrays.asList(new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) + Arrays.asList(new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), + new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations( - Arrays - .asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("thqnztuki") + new NetworkTapRuleAction(), new NetworkTapRuleAction())))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), + new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), + new PortGroupProperties(), new PortGroupProperties())))) + .withPollingIntervalInSeconds(2056314585) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("tyarpeyigfdp")) .create(); - Assertions.assertEquals("fibwvhwouhysr", response.location()); - Assertions.assertEquals("zjsnxzljxa", response.tags().get("yxpdzvgyujkxjge")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, response.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("yvaxwzbwxx", response.tapRulesUrl()); - Assertions.assertEquals("xsrrhr", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(431353177903491287L, response.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("nihmwvhc", response.location()); + Assertions.assertEquals("uasutdhmilhzy", response.tags().get("djc")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("sziuhm", response.annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.configurationType()); + Assertions.assertEquals("hupoeljf", response.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + response.identitySelector().identityType()); + Assertions.assertEquals("oxajitaaw", response.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("qq", response.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4761582517033287789L, response.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("hxqnlmjvpm", response.annotation()); + Assertions.assertEquals(2061678344, response.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("xoubekafdxgtgcfk", response.globalNetworkTapRuleActions().truncate()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java index a822db9ccebd..b2777adda7d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,27 +26,33 @@ public final class NetworkTapRulesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkTapId\":\"gcemjtiljxa\",\"pollingIntervalInSeconds\":30,\"lastSyncedTime\":\"2021-04-17T10:46:29Z\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"dxcmpdmdsypks\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ehxjoupxehsbecxu\",\"sequenceNumber\":2810565747523667294,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]}],\"annotation\":\"i\"},\"location\":\"vucyackgkavpmg\",\"tags\":{\"jabpnxohagcojgmy\":\"ohfksixvwkpcesmu\",\"ehrq\":\"jdgm\",\"pbnjiweyuig\":\"gd\"},\"id\":\"zsebkbfykgmwurcx\",\"name\":\"jyxyunypf\",\"type\":\"vjgovbbn\"}"; + = "{\"properties\":{\"annotation\":\"qwutbyaeyyiw\",\"configurationType\":\"File\",\"tapRulesUrl\":\"wpdmexugdjdmwc\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"onridhwoyznjdd\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"lomvxvipuo\",\"sequenceNumber\":5766492833755362133,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"ydj\",\"sequenceNumber\":5026175360069810154,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"ftszswvyighj\",\"sequenceNumber\":6135814047212485583,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]}],\"networkTapId\":\"qzkzworuhhvdeodc\",\"networkTapIds\":[\"fxbkgpnx\"],\"pollingIntervalInSeconds\":1692679025,\"lastSyncedTime\":\"2021-09-20T04:37:39Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"klhwutyuv\"},\"lastOperation\":{\"details\":\"trfziubeflv\"},\"networkFabricIds\":[\"bmceplnukdawgzhb\",\"hjvonuhvyg\"],\"configurationState\":\"Rejected\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"identity\":{\"principalId\":\"coth\",\"tenantId\":\"xjc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"dwhwd\":{\"principalId\":\"xebmliyrctfaa\",\"clientId\":\"ukraq\"},\"cuyffkay\":{\"principalId\":\"ntqsrhacjsbpdhj\",\"clientId\":\"fnbiyxq\"}}},\"location\":\"ljtrmlxrqllug\",\"tags\":{\"lpvp\":\"bwdkziwwbqukjith\",\"shhcktbfmtbprt\":\"vceiwc\",\"qbwgmznvlwcn\":\"vuxwuepjcugwku\"},\"id\":\"hqkie\",\"name\":\"qpubwz\",\"type\":\"xetxzcjrb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTapRule response = manager.networkTapRules() - .getByResourceGroupWithResponse("flhhbupqovuw", "vqihmqhqjd", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("otaoaixi", "cwyinfywtqvjno", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vucyackgkavpmg", response.location()); - Assertions.assertEquals("ohfksixvwkpcesmu", response.tags().get("jabpnxohagcojgmy")); - Assertions.assertEquals(PollingIntervalInSeconds.THREE_ZERO, response.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("dxcmpdmdsypks", response.tapRulesUrl()); - Assertions.assertEquals("ehxjoupxehsbecxu", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2810565747523667294L, response.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals("ljtrmlxrqllug", response.location()); + Assertions.assertEquals("bwdkziwwbqukjith", response.tags().get("lpvp")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("qwutbyaeyyiw", response.annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.configurationType()); + Assertions.assertEquals("wpdmexugdjdmwc", response.tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + response.identitySelector().identityType()); + Assertions.assertEquals("onridhwoyznjdd", response.identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("lomvxvipuo", response.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5766492833755362133L, response.matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("i", response.annotation()); + Assertions.assertEquals(1692679025, response.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, response.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("klhwutyuv", response.globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java index 0e6d7facbc80..aa15ca26b8e2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,30 +27,38 @@ public final class NetworkTapRulesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapId\":\"qgmztlrubn\",\"pollingIntervalInSeconds\":30,\"lastSyncedTime\":\"2021-08-02T08:13:49Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"airoog\",\"matchConfigurations\":[{\"matchConfigurationName\":\"obdqiuppavqovijp\",\"sequenceNumber\":2060601150098446573,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"b\",\"sequenceNumber\":8549993605129343385,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"jefl\"},\"location\":\"ieeqjdfxx\",\"tags\":{\"rijbiterqfu\":\"duxkepga\",\"dd\":\"errcanlpf\",\"qawupqkvmy\":\"wpg\"},\"id\":\"ueefrxzwvcvtjd\",\"name\":\"dagwxjafbdvpcd\",\"type\":\"dbjzxrpxji\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"beoofo\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"hunewkssxpnh\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rjcfyvkk\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"xlonz\",\"sequenceNumber\":2631497632018551310,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"ghdn\",\"sequenceNumber\":6521063886444305376,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"txhpxdvrajog\",\"sequenceNumber\":6307621477114114454,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]}],\"networkTapId\":\"vuqbageltffqalmc\",\"networkTapIds\":[\"pzwwtcwbgmx\",\"pynslc\",\"yvmizx\",\"mhhqw\"],\"pollingIntervalInSeconds\":1262297438,\"lastSyncedTime\":\"2021-07-21T17:55:47Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"mhzlla\"},\"lastOperation\":{\"details\":\"sdnfppkyk\"},\"networkFabricIds\":[\"cyfubg\",\"mlnjdaxi\",\"hulvpnqvcutwngfd\"],\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"identity\":{\"principalId\":\"okpfyojfwvmsf\",\"tenantId\":\"yxt\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"heicexdxhxp\":{\"principalId\":\"zhqgmoexg\",\"clientId\":\"ugsas\"},\"ktiojitfa\":{\"principalId\":\"cstynjxfn\",\"clientId\":\"rofwctjhdbidl\"},\"fvoskwujh\":{\"principalId\":\"pxvetdr\",\"clientId\":\"tsorwtaknylxr\"},\"aqypjcpdt\":{\"principalId\":\"xxekzysactfimc\",\"clientId\":\"gtwpzqtimqics\"}}},\"location\":\"fpjkxkujwntnfoqw\",\"tags\":{\"dpy\":\"raxbeamipnsy\",\"rzzqfbo\":\"pipslcfw\"},\"id\":\"ifghdgsyhncxoqxt\",\"name\":\"zdp\",\"type\":\"lgllvko\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkTapRules().listByResourceGroup("jxr", com.azure.core.util.Context.NONE); + = manager.networkTapRules().listByResourceGroup("qcwnbx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ieeqjdfxx", response.iterator().next().location()); - Assertions.assertEquals("duxkepga", response.iterator().next().tags().get("rijbiterqfu")); - Assertions.assertEquals(PollingIntervalInSeconds.THREE_ZERO, - response.iterator().next().pollingIntervalInSeconds()); + Assertions.assertEquals("fpjkxkujwntnfoqw", response.iterator().next().location()); + Assertions.assertEquals("raxbeamipnsy", response.iterator().next().tags().get("dpy")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("beoofo", response.iterator().next().annotation()); Assertions.assertEquals(ConfigurationType.INLINE, response.iterator().next().configurationType()); - Assertions.assertEquals("airoog", response.iterator().next().tapRulesUrl()); - Assertions.assertEquals("obdqiuppavqovijp", + Assertions.assertEquals("hunewkssxpnh", response.iterator().next().tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + response.iterator().next().identitySelector().identityType()); + Assertions.assertEquals("rjcfyvkk", + response.iterator().next().identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("xlonz", response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2060601150098446573L, + Assertions.assertEquals(2631497632018551310L, response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals(IpAddressType.IPV6, response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jefl", response.iterator().next().annotation()); + Assertions.assertEquals(1262297438, response.iterator().next().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.iterator().next().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("mhzlla", response.iterator().next().globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java index 9b47ef6a1dfd..d782704ffc45 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,29 +27,37 @@ public final class NetworkTapRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapId\":\"upirvdonka\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-04-11T15:36:29Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"jhtcyznrhighnxh\",\"matchConfigurations\":[{\"matchConfigurationName\":\"nktsvwqdarjteq\",\"sequenceNumber\":3721982071130664130,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"sttximeztasflgme\",\"sequenceNumber\":6905114670976295777,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]}],\"annotation\":\"pleirjr\"},\"location\":\"k\",\"tags\":{\"bdukid\":\"dubmazlx\",\"kpardo\":\"qeyqrlgpkypb\",\"yhbzmgzsyt\":\"dtedxz\",\"sqsbq\":\"pfslrx\"},\"id\":\"q\",\"name\":\"pi\",\"type\":\"fstkdlyj\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"osoxxoqyikdjaog\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"xqxvmyb\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rlfnsdcc\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"h\",\"sequenceNumber\":7863229487440185713,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"mzkxrqzgshqx\",\"sequenceNumber\":8976657734193947009,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{}]},{\"matchConfigurationName\":\"imhoaqjalhlpzn\",\"sequenceNumber\":6573925024172789161,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]}],\"networkTapId\":\"yadyfnxtlln\",\"networkTapIds\":[\"d\",\"svaekuovwiwty\",\"pr\",\"ddbenfjhfszmxpos\"],\"pollingIntervalInSeconds\":440863677,\"lastSyncedTime\":\"2021-11-22T18:26:05Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"pdleesljujpsubxg\"},\"lastOperation\":{\"details\":\"mvkni\"},\"networkFabricIds\":[\"yrc\"],\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"},\"identity\":{\"principalId\":\"csbkmaluchbfrtaj\",\"tenantId\":\"ddyqdxpnzpuk\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"nzl\":{\"principalId\":\"itxsyufexivhjyx\",\"clientId\":\"wtkqofrkfccqj\"},\"ozbdwflxdwl\":{\"principalId\":\"azy\",\"clientId\":\"jbvqaey\"},\"jlmstakgrebecxuu\":{\"principalId\":\"taieledmiupddlet\",\"clientId\":\"udcoktsgcy\"},\"tjx\":{\"principalId\":\"ukluukxejamyc\",\"clientId\":\"wrv\"}}},\"location\":\"txvmbedvvmrtnmg\",\"tags\":{\"lzwz\":\"zaaiih\",\"vooaacefxonsv\":\"lbpmpletheknbnam\",\"mmmmgbynvoy\":\"ctytytyrvtuxvzyw\",\"fqznvahpxdgyho\":\"dtv\"},\"id\":\"x\",\"name\":\"ptxvxf\",\"type\":\"wv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkTapRules().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("k", response.iterator().next().location()); - Assertions.assertEquals("dubmazlx", response.iterator().next().tags().get("bdukid")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, - response.iterator().next().pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("jhtcyznrhighnxh", response.iterator().next().tapRulesUrl()); - Assertions.assertEquals("nktsvwqdarjteq", - response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3721982071130664130L, + Assertions.assertEquals("txvmbedvvmrtnmg", response.iterator().next().location()); + Assertions.assertEquals("zaaiih", response.iterator().next().tags().get("lzwz")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("osoxxoqyikdjaog", response.iterator().next().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.iterator().next().configurationType()); + Assertions.assertEquals("xqxvmyb", response.iterator().next().tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + response.iterator().next().identitySelector().identityType()); + Assertions.assertEquals("rlfnsdcc", + response.iterator().next().identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("h", response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7863229487440185713L, response.iterator().next().matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV4, response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pleirjr", response.iterator().next().annotation()); + Assertions.assertEquals(440863677, response.iterator().next().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.iterator().next().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("pdleesljujpsubxg", + response.iterator().next().globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java index c41c3cfaf8f4..370c08cc710b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java @@ -1,264 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRulesListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; -import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class NetworkTapRulesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRulesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkTapId\":\"qh\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-05-19T12:21:06Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"vbvx\",\"matchConfigurations\":[{\"matchConfigurationName\":\"enlrjcsmwevgu\",\"sequenceNumber\":3641911805209378415,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"zcdeto\",\"sequenceNumber\":5633343192239688625,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"jyhzfaxskdvu\"},\"location\":\"umo\",\"tags\":{\"sorch\":\"gq\",\"kbmpw\":\"zrqoxzyhlbeqvh\",\"zgaefhawkmib\":\"slajgg\",\"wi\":\"y\"},\"id\":\"rnicupdyttqmi\",\"name\":\"vj\",\"type\":\"l\"},{\"properties\":{\"networkTapId\":\"ebmhhtuq\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-11-29T08:34:34Z\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"ngxebihexhnk\",\"matchConfigurations\":[{\"matchConfigurationName\":\"qcdol\",\"sequenceNumber\":1306450790437008316,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"ndaf\",\"sequenceNumber\":8346440145061268112,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"hpplz\",\"sequenceNumber\":6540366081194941470,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"wjvrlgqpwwlzpd\"},\"location\":\"rcbcdwhslxe\",\"tags\":{\"oprwkampyh\":\"adknmstb\"},\"id\":\"pbldz\",\"name\":\"iudrcycmwhuzym\",\"type\":\"lhihqkn\"},{\"properties\":{\"networkTapId\":\"kmnbzko\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-11-04T18:07:20Z\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"xsyjofpgved\",\"matchConfigurations\":[{\"matchConfigurationName\":\"jnjgyb\",\"sequenceNumber\":3081568456009405224,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"l\",\"sequenceNumber\":4032761014302250041,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"ytslg\",\"sequenceNumber\":4807067230273446470,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"kyqzjsdkpvnr\",\"sequenceNumber\":1950278585844333204,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]}],\"annotation\":\"flyuvbgtz\"},\"location\":\"qweuydyb\",\"tags\":{\"zeogeatr\":\"rvhpqsv\",\"rfcs\":\"nqnvnc\",\"zsqbibaaugicovj\":\"vjnkoiz\"},\"id\":\"mvwrmjxyvuodnx\",\"name\":\"zbassqfyy\",\"type\":\"wppeygk\"},{\"properties\":{\"networkTapId\":\"bloasyb\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-11-03T20:44:03Z\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"sqjsrvjnqtaqgxqb\",\"matchConfigurations\":[{\"matchConfigurationName\":\"incnrecjbiywev\",\"sequenceNumber\":8939098849713135757,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"vhgsulwvgseuf\"},\"location\":\"v\",\"tags\":{\"ilmciwu\":\"uz\",\"lbzdlbybpaxh\":\"yzekypyovl\"},\"id\":\"zyso\",\"name\":\"snwbhanzgesfhsha\",\"type\":\"pahnezp\"}],\"nextLink\":\"fyvynpmgg\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"yx\",\"configurationType\":\"File\",\"tapRulesUrl\":\"cgqbmxbpqcn\",\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"hojvmazuflfp\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"hpdnc\",\"sequenceNumber\":4360471012015006353,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"imjlyhbjfnmmi\",\"sequenceNumber\":1970296457952213236,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"ygumqeobrwreudgs\",\"sequenceNumber\":3088851627784084851,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"networkTapId\":\"fkjfkxnwtzsroeqc\",\"networkTapIds\":[\"cjskqsfnmiwa\",\"dunhd\",\"katzmtuvfnhitjkb\",\"bxlwzlvk\"],\"pollingIntervalInSeconds\":1573879917,\"lastSyncedTime\":\"2021-01-02T18:24:46Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"odincfbaoboiahk\"},\"lastOperation\":{\"details\":\"va\"},\"networkFabricIds\":[\"sax\",\"eedvpmod\",\"tdut\",\"dvvgkmorbpcje\"],\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"identity\":{\"principalId\":\"vmshkkgygfohrm\",\"tenantId\":\"hlclpkr\",\"type\":\"None\",\"userAssignedIdentities\":{\"ftj\":{\"principalId\":\"jj\",\"clientId\":\"utivrfnztxtmrm\"},\"sjxw\":{\"principalId\":\"ilohlgrjcxh\",\"clientId\":\"hz\"}}},\"location\":\"gbvuy\",\"tags\":{\"lnuom\":\"mbwep\",\"ahap\":\"xhdkhmemx\",\"xrmxxjv\":\"snbyoullyfzm\"},\"id\":\"batjgzkm\",\"name\":\"fwzlmpx\",\"type\":\"m\"},{\"properties\":{\"annotation\":\"s\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"mdzphxulxrcbdnpf\",\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ttowqx\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"zxpzloovha\",\"sequenceNumber\":6683633858306862996,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"kfeomotquqlqeyis\",\"sequenceNumber\":5336235972076584542,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]}],\"networkTapId\":\"grlly\",\"networkTapIds\":[\"mocbxh\",\"chmetvzhuugdykgd\",\"kwvbqcawwa\"],\"pollingIntervalInSeconds\":286445180,\"lastSyncedTime\":\"2021-01-07T17:53Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"gnmzebcrelue\"},\"lastOperation\":{\"details\":\"kryhh\"},\"networkFabricIds\":[\"zhhllx\"],\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"identity\":{\"principalId\":\"lfsdntkqiymmddsl\",\"tenantId\":\"lgjdlhmkspybn\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vmbjerndzzyw\":{\"principalId\":\"dnnskat\",\"clientId\":\"mrslwknrd\"},\"szuxjmrzsxwas\":{\"principalId\":\"raqxtkdeetnn\",\"clientId\":\"putl\"}}},\"location\":\"qjzybmfqdnpp\",\"tags\":{\"gdwpjbb\":\"guamrvamuv\",\"hdukcsqvyeegxhu\":\"ukgctvnspjvsyydj\",\"xpfyxdjspnonx\":\"ojwumfjdymeqv\"},\"id\":\"mhqpz\",\"name\":\"nat\",\"type\":\"vgcm\"},{\"properties\":{\"annotation\":\"djlwwefevtwllq\",\"configurationType\":\"File\",\"tapRulesUrl\":\"jcoyvfwgk\",\"identitySelector\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"s\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"ckwbqwj\",\"sequenceNumber\":1844023209136077037,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"yzhobnvyuepacoer\",\"sequenceNumber\":6674048838056904517,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"bs\",\"sequenceNumber\":2489462931306923298,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"nlqtqyv\",\"sequenceNumber\":578522847857961822,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]}],\"networkTapId\":\"rcnxaeypyqoi\",\"networkTapIds\":[\"asyddqbwscjwyy\",\"omiflrvfeowc\"],\"pollingIntervalInSeconds\":1103613953,\"lastSyncedTime\":\"2021-11-04T20:54:20Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"s\"},\"lastOperation\":{\"details\":\"auz\"},\"networkFabricIds\":[\"umkbpgcilbwtp\",\"bjlpfwuq\",\"rpdgitenyuksli\",\"mpnxg\"],\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"identity\":{\"principalId\":\"hqotmmxlmx\",\"tenantId\":\"wyvjzbjwvt\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ndalnj\":{\"principalId\":\"ypqsmpsbeqie\",\"clientId\":\"xhju\"}}},\"location\":\"rgkjjpc\",\"tags\":{\"ekurdgcpzanaqve\":\"lzyxvtajfjatoid\",\"xfbagegjtjltcki\":\"gnpuelrnanbrpkoc\",\"dboefnhxha\":\"xggfagijx\",\"einvzsodm\":\"u\"},\"id\":\"krqdbsgkqy\",\"name\":\"kotypcjxhyzz\",\"type\":\"o\"},{\"properties\":{\"annotation\":\"hz\",\"configurationType\":\"File\",\"tapRulesUrl\":\"brbm\",\"identitySelector\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"fprsmivapesbfz\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"rw\",\"sequenceNumber\":5696588657301412539,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"blmfcleuovelvsp\",\"sequenceNumber\":4109335279816550659,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"ud\",\"sequenceNumber\":840735617911457145,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]}],\"networkTapId\":\"ymmcgskscb\",\"networkTapIds\":[\"ha\",\"icjo\",\"xolknshgwakptb\",\"mbglmnlbnatln\"],\"pollingIntervalInSeconds\":800884254,\"lastSyncedTime\":\"2021-11-28T20:55:23Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"rtdzzvhbujka\"},\"lastOperation\":{\"details\":\"hqwojdzcc\"},\"networkFabricIds\":[\"srbfbs\"],\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"},\"identity\":{\"principalId\":\"exr\",\"tenantId\":\"h\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wvrsksdz\":{\"principalId\":\"qp\",\"clientId\":\"tsh\"},\"gdungaypx\":{\"principalId\":\"wtsyppwfbwoet\",\"clientId\":\"zrfwxhf\"},\"mp\":{\"principalId\":\"z\",\"clientId\":\"snxyksznfs\"}}},\"location\":\"grandz\",\"tags\":{\"lhsfddkhxvev\":\"omlpczlqboomzgmr\",\"yhtuhalpq\":\"xmnbwaxadxgn\",\"aokex\":\"ld\"},\"id\":\"npnytkqjar\",\"name\":\"azbtgtzp\",\"type\":\"atrmzoujfgt\"}],\"nextLink\":\"uupcze\"}") .toObject(NetworkTapRulesListResult.class); - Assertions.assertEquals("umo", model.value().get(0).location()); - Assertions.assertEquals("gq", model.value().get(0).tags().get("sorch")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.value().get(0).pollingIntervalInSeconds()); + Assertions.assertEquals("gbvuy", model.value().get(0).location()); + Assertions.assertEquals("mbwep", model.value().get(0).tags().get("lnuom")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("yx", model.value().get(0).annotation()); Assertions.assertEquals(ConfigurationType.FILE, model.value().get(0).configurationType()); - Assertions.assertEquals("vbvx", model.value().get(0).tapRulesUrl()); - Assertions.assertEquals("enlrjcsmwevgu", - model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3641911805209378415L, + Assertions.assertEquals("cgqbmxbpqcn", model.value().get(0).tapRulesUrl()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.value().get(0).identitySelector().identityType()); + Assertions.assertEquals("hojvmazuflfp", + model.value().get(0).identitySelector().userAssignedIdentityResourceId()); + Assertions.assertEquals("hpdnc", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4360471012015006353L, model.value().get(0).matchConfigurations().get(0).sequenceNumber()); Assertions.assertEquals(IpAddressType.IPV6, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jyhzfaxskdvu", model.value().get(0).annotation()); - Assertions.assertEquals("fyvynpmgg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapRulesListResult model - = new NetworkTapRulesListResult() - .withValue( - Arrays - .asList( - new NetworkTapRuleInner().withLocation("umo") - .withTags(mapOf("sorch", "gq", "kbmpw", "zrqoxzyhlbeqvh", "zgaefhawkmib", "slajgg", - "wi", "y")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("vbvx") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("enlrjcsmwevgu") - .withSequenceNumber(3641911805209378415L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("zcdeto") - .withSequenceNumber(5633343192239688625L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("jyhzfaxskdvu"), - new NetworkTapRuleInner().withLocation("rcbcdwhslxe") - .withTags(mapOf("oprwkampyh", "adknmstb")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("ngxebihexhnk") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("qcdol") - .withSequenceNumber(1306450790437008316L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ndaf") - .withSequenceNumber(8346440145061268112L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("hpplz") - .withSequenceNumber(6540366081194941470L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("wjvrlgqpwwlzpd"), - new NetworkTapRuleInner().withLocation("qweuydyb") - .withTags(mapOf("zeogeatr", "rvhpqsv", "rfcs", "nqnvnc", "zsqbibaaugicovj", "vjnkoiz")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("xsyjofpgved") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("jnjgyb") - .withSequenceNumber(3081568456009405224L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("l") - .withSequenceNumber(4032761014302250041L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ytslg") - .withSequenceNumber(4807067230273446470L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("kyqzjsdkpvnr") - .withSequenceNumber(1950278585844333204L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations( - Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())))) - .withAnnotation("flyuvbgtz"), - new NetworkTapRuleInner().withLocation("v") - .withTags(mapOf("ilmciwu", "uz", "lbzdlbybpaxh", "yzekypyovl")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.NINE_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("sqjsrvjnqtaqgxqb") - .withMatchConfigurations( - Arrays.asList(new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("incnrecjbiywev") - .withSequenceNumber(8939098849713135757L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList( - new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("vhgsulwvgseuf"))) - .withNextLink("fyvynpmgg"); - model = BinaryData.fromObject(model).toObject(NetworkTapRulesListResult.class); - Assertions.assertEquals("umo", model.value().get(0).location()); - Assertions.assertEquals("gq", model.value().get(0).tags().get("sorch")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.value().get(0).pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.value().get(0).configurationType()); - Assertions.assertEquals("vbvx", model.value().get(0).tapRulesUrl()); - Assertions.assertEquals("enlrjcsmwevgu", - model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3641911805209378415L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jyhzfaxskdvu", model.value().get(0).annotation()); - Assertions.assertEquals("fyvynpmgg", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(1573879917, model.value().get(0).pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.value().get(0).globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("odincfbaoboiahk", model.value().get(0).globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("uupcze", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java index ff7272b372ff..ffc737f90378 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java @@ -1,21 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -29,63 +32,49 @@ public final class NetworkTapsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkPacketBrokerId\":\"j\",\"sourceTapRuleId\":\"kyxowno\",\"destinations\":[{\"name\":\"ussxiajicrs\",\"destinationType\":\"Direct\",\"destinationId\":\"xlopnccaxtp\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ijlwr\"]},\"destinationTapRuleId\":\"abzjpgh\"},{\"name\":\"gpceqakl\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"rxix\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"nhsfjxtusbjxpuo\",\"kdpts\"]},\"destinationTapRuleId\":\"gtplonalpwaulkwu\"},{\"name\":\"sjwnwn\",\"destinationType\":\"Direct\",\"destinationId\":\"fgtmu\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"qvz\",\"ikxufuwcajyezlk\",\"iveftugiwsvlfp\",\"bpnrgnxwrfu\"]},\"destinationTapRuleId\":\"aysf\"}],\"pollingType\":\"Push\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"cjclvbqovk\"},\"location\":\"eytphnazpgvfcubx\",\"tags\":{\"fuupqkrzvd\":\"hedbqrlbyhz\",\"hhpwxghwwfq\":\"pcevbkkgqfjwg\"},\"id\":\"wysmsqqmdajsqe\",\"name\":\"xftyifadsliifdr\",\"type\":\"sr\"}"; + = "{\"properties\":{\"networkPacketBrokerId\":\"g\",\"sourceTapRuleId\":\"rmx\",\"networkFabricIds\":[\"c\",\"haonmfnfatwi\",\"cuhas\"],\"destinations\":[{\"name\":\"elht\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"heimwhotjcgdpqkf\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"rglqlv\",\"ke\",\"eyqotmj\",\"qqahmzleta\"]},\"destinationTapRuleId\":\"juwkkvarffjuefj\"},{\"name\":\"mowq\",\"destinationType\":\"Direct\",\"destinationId\":\"dmdrdt\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"ahciapvcs\"]},\"destinationTapRuleId\":\"jrpcpgcltf\"},{\"name\":\"aqmrimletjv\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"tfgabiblhzfglp\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"upwrizkqnbiia\"]},\"destinationTapRuleId\":\"hsjpqha\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"sltchcuhvdrfhmr\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"annotation\":\"iijchtaaabtxrhem\"},\"identity\":{\"principalId\":\"kvruomwyoktzffpc\",\"tenantId\":\"hjpze\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"apkbdhy\":{\"principalId\":\"vykiyr\",\"clientId\":\"kolcoiks\"},\"uhqvxeyliisatbs\":{\"principalId\":\"ugkugwtg\",\"clientId\":\"twayh\"},\"eiyyysvt\":{\"principalId\":\"tkdcufzxxqdntvfv\",\"clientId\":\"ernq\"},\"ev\":{\"principalId\":\"xwugdzwoczf\",\"clientId\":\"fcmpddzzdw\"}}},\"location\":\"cnf\",\"tags\":{\"yluw\":\"yykxlf\",\"n\":\"n\"},\"id\":\"qpmnyv\",\"name\":\"bmgpomcr\",\"type\":\"vtazclilzve\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTap response = manager.networkTaps() - .define("tanlvoorvzhd") - .withRegion("gnwhldctnwchuq") - .withExistingResourceGroup("ynvck") - .withNetworkPacketBrokerId("cq") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("egxlzd") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("tzkm") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("wosmnwsffia", "fd", "r"))) - .withDestinationTapRuleId("xir"), - new NetworkTapPropertiesDestinationsItem().withName("kmozkdqzhr") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("vpyznjwm") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("jbzzwsesqy", "ktvofgxorhsxcs"))) - .withDestinationTapRuleId("xcmepkpx"), - new NetworkTapPropertiesDestinationsItem().withName("xynkubwk") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("lnbyiowetwwjv") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("vgebfeit", "a", "tecvttkgopdj"))) - .withDestinationTapRuleId("sicucqteciexscxh"), - new NetworkTapPropertiesDestinationsItem().withName("jjlypwgwbycfamui") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("pygothisirhh") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("gpymyerpusozaou", "jliwbnwdkgb", "joy", "ptnokdoqxkzeow"))) - .withDestinationTapRuleId("vje"))) - .withTags(mapOf("edrbzzb", "nmtnlcvlmrv")) + .define("eopx") + .withRegion("fejdgojavqezek") + .withExistingResourceGroup("lbfpteiir") + .withNetworkPacketBrokerId("bhcfswpda") + .withDestinations(Arrays.asList(new DestinationProperties().withName("xorqjboyngxo") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("vwchynrdtn") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("wypkpbmi"))) + .withDestinationTapRuleId("qvcjspj"))) + .withTags( + mapOf("jpsmnxccasuh", "yyyo", "fatoilmwzkxaglwd", "okhmkqyfatddwfhf", "hvioccszdaxafu", "tjfnmxzu")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("g", new UserAssignedIdentity(), "scugdyfyjeexmlk", new UserAssignedIdentity()))) .withPollingType(PollingType.PUSH) - .withAnnotation("xxboauvkkc") + .withAnnotation("pnjqpwxfkuijpay") .create(); - Assertions.assertEquals("eytphnazpgvfcubx", response.location()); - Assertions.assertEquals("hedbqrlbyhz", response.tags().get("fuupqkrzvd")); - Assertions.assertEquals("j", response.networkPacketBrokerId()); - Assertions.assertEquals("ussxiajicrs", response.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, response.destinations().get(0).destinationType()); - Assertions.assertEquals("xlopnccaxtp", response.destinations().get(0).destinationId()); + Assertions.assertEquals("cnf", response.location()); + Assertions.assertEquals("yykxlf", response.tags().get("yluw")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("g", response.networkPacketBrokerId()); + Assertions.assertEquals("elht", response.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, response.destinations().get(0).destinationType()); + Assertions.assertEquals("heimwhotjcgdpqkf", response.destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, response.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("ijlwr", + Assertions.assertEquals("rglqlv", response.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("abzjpgh", response.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PUSH, response.pollingType()); - Assertions.assertEquals("cjclvbqovk", response.annotation()); + Assertions.assertEquals("juwkkvarffjuefj", response.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PULL, response.pollingType()); + Assertions.assertEquals("iijchtaaabtxrhem", response.annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java index 92d0da88c105..a8d4ce128aa6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.nio.charset.StandardCharsets; @@ -24,31 +25,32 @@ public final class NetworkTapsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkPacketBrokerId\":\"elsrymzvtzyf\",\"sourceTapRuleId\":\"bayhas\",\"destinations\":[{\"name\":\"lk\",\"destinationType\":\"Direct\",\"destinationId\":\"kqyezyzxkr\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"fuxystltkq\",\"ikoiiqajfwzubf\",\"oq\"]},\"destinationTapRuleId\":\"bueiydoqbruxl\"},{\"name\":\"txhednkzjt\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"pzrtseixpk\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"cmkwcyeljni\",\"dgzxbwn\",\"yihct\"]},\"destinationTapRuleId\":\"kmzozbk\"}],\"pollingType\":\"Push\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"lm\"},\"location\":\"fyfyftkvzbdljyk\",\"tags\":{\"majjzplgtwfkflcv\":\"agfyi\",\"fqynmldhgzzohtag\":\"zkbebuafbddm\",\"fxzobovsvhbtdgxg\":\"yuhdqhqgrksypoo\"},\"id\":\"lmdeoub\",\"name\":\"fxiswemncjhmvvze\",\"type\":\"icmvbsjt\"}"; + = "{\"properties\":{\"networkPacketBrokerId\":\"ru\",\"sourceTapRuleId\":\"eaenkfsxtsmz\",\"networkFabricIds\":[\"zfaja\",\"bswwbrllvva\"],\"destinations\":[{\"name\":\"jcqz\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"wlxz\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"aidzv\"]},\"destinationTapRuleId\":\"vdivzjyxsjblb\"},{\"name\":\"xjb\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"butmacnqudmyd\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"jqfbvbv\",\"wryrzoqyy\"]},\"destinationTapRuleId\":\"dbgobhltm\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"qgrsytto\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"annotation\":\"acrhpuzca\"},\"identity\":{\"principalId\":\"vpbwt\",\"tenantId\":\"uiguo\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"tnbk\":{\"principalId\":\"db\",\"clientId\":\"xrkoxwyxodpcgdv\"},\"wnkxoqecjznuq\":{\"principalId\":\"dafilaizcdugn\",\"clientId\":\"mljgayka\"}}},\"location\":\"gvm\",\"tags\":{\"zfbtczzjf\":\"shhqgjvchli\",\"kltfknroxmis\":\"jovwizjraksahwqp\"},\"id\":\"bz\",\"name\":\"z\",\"type\":\"fvqtvukcfesizkn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTap response = manager.networkTaps() - .getByResourceGroupWithResponse("dvbxqxo", "ix", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("eouhjetxupxe", "ins", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fyfyftkvzbdljyk", response.location()); - Assertions.assertEquals("agfyi", response.tags().get("majjzplgtwfkflcv")); - Assertions.assertEquals("elsrymzvtzyf", response.networkPacketBrokerId()); - Assertions.assertEquals("lk", response.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, response.destinations().get(0).destinationType()); - Assertions.assertEquals("kqyezyzxkr", response.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, + Assertions.assertEquals("gvm", response.location()); + Assertions.assertEquals("shhqgjvchli", response.tags().get("zfbtczzjf")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("ru", response.networkPacketBrokerId()); + Assertions.assertEquals("jcqz", response.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, response.destinations().get(0).destinationType()); + Assertions.assertEquals("wlxz", response.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.NONE, response.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("fuxystltkq", + Assertions.assertEquals("aidzv", response.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("bueiydoqbruxl", response.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PUSH, response.pollingType()); - Assertions.assertEquals("lm", response.annotation()); + Assertions.assertEquals("vdivzjyxsjblb", response.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PULL, response.pollingType()); + Assertions.assertEquals("acrhpuzca", response.annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java index ecb24dde0983..dce31ee886b5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.nio.charset.StandardCharsets; @@ -25,31 +26,33 @@ public final class NetworkTapsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"zscgropuqgi\",\"sourceTapRuleId\":\"gkoci\",\"destinations\":[{\"name\":\"qlyoor\",\"destinationType\":\"Direct\",\"destinationId\":\"glq\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"yhx\",\"znbcpiadjslvx\"]},\"destinationTapRuleId\":\"lcd\"},{\"name\":\"ib\",\"destinationType\":\"Direct\",\"destinationId\":\"cghygmtbi\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"wff\"]},\"destinationTapRuleId\":\"mxqyjysrjpyokewv\"},{\"name\":\"zmsyezx\",\"destinationType\":\"Direct\",\"destinationId\":\"vhuovfotwv\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"dcodzdheknmcvm\",\"iundifuaht\",\"kccru\",\"rz\"]},\"destinationTapRuleId\":\"oqodya\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Failed\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"annotation\":\"loawslctilbxnny\"},\"location\":\"tudfhpelzavohvdb\",\"tags\":{\"uewxliqcbonqjo\":\"rc\",\"tit\":\"kcjcglvob\"},\"id\":\"xrbalvkfdq\",\"name\":\"lprqhxfq\",\"type\":\"qp\"}]}"; + = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"xflzhgr\",\"sourceTapRuleId\":\"wysdmovbvnjyqq\",\"networkFabricIds\":[\"gz\",\"ykc\",\"ol\"],\"destinations\":[{\"name\":\"w\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"gytyv\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"jgobzjmuk\",\"wmhzarrfttxh\",\"frjgvho\"]},\"destinationTapRuleId\":\"vvvabzlmkfvs\"},{\"name\":\"lkjowvzyoehljtl\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"uothnucqktuae\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ii\",\"teydlb\"]},\"destinationTapRuleId\":\"mivtuphwwyixo\"},{\"name\":\"fxfteo\",\"destinationType\":\"Direct\",\"destinationId\":\"rziwkcpxgjmyoufq\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"cdikkmyrsvtrtxg\",\"mpohuvasxjzklqkg\"]},\"destinationTapRuleId\":\"kntknjhywgzi\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"fdehptln\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"eszx\"},\"identity\":{\"principalId\":\"euoih\",\"tenantId\":\"kfiwpgxyavcbdsu\",\"type\":\"None\",\"userAssignedIdentities\":{\"yhpbtwzrziv\":{\"principalId\":\"hcj\",\"clientId\":\"xtljyr\"},\"fbr\":{\"principalId\":\"kdcjymdoldbuy\",\"clientId\":\"gephviue\"},\"fkmti\":{\"principalId\":\"oxhy\",\"clientId\":\"agaxru\"},\"xwfodvzpxmo\":{\"principalId\":\"ynkhvpuq\",\"clientId\":\"zdbbitpgrnhpmsdg\"}}},\"location\":\"bvgieey\",\"tags\":{\"tbasvjodgplagwvg\":\"n\",\"hinbsys\":\"nxmqudnqcbb\",\"iyyzqdnrgnyb\":\"lbfzkvrmdos\",\"mkhxunq\":\"qwjj\"},\"id\":\"vqticgsdcpmclk\",\"name\":\"ydabhydcqrs\",\"type\":\"qwzndzuxlgmy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkTaps().listByResourceGroup("qwlbeqc", com.azure.core.util.Context.NONE); + = manager.networkTaps().listByResourceGroup("c", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tudfhpelzavohvdb", response.iterator().next().location()); - Assertions.assertEquals("rc", response.iterator().next().tags().get("uewxliqcbonqjo")); - Assertions.assertEquals("zscgropuqgi", response.iterator().next().networkPacketBrokerId()); - Assertions.assertEquals("qlyoor", response.iterator().next().destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, + Assertions.assertEquals("bvgieey", response.iterator().next().location()); + Assertions.assertEquals("n", response.iterator().next().tags().get("tbasvjodgplagwvg")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("xflzhgr", response.iterator().next().networkPacketBrokerId()); + Assertions.assertEquals("w", response.iterator().next().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, response.iterator().next().destinations().get(0).destinationType()); - Assertions.assertEquals("glq", response.iterator().next().destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("gytyv", response.iterator().next().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, response.iterator().next().destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("yhx", + Assertions.assertEquals("jgobzjmuk", response.iterator().next().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("lcd", response.iterator().next().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals("vvvabzlmkfvs", + response.iterator().next().destinations().get(0).destinationTapRuleId()); Assertions.assertEquals(PollingType.PULL, response.iterator().next().pollingType()); - Assertions.assertEquals("loawslctilbxnny", response.iterator().next().annotation()); + Assertions.assertEquals("eszx", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java index 1673bf86e5c9..daf61920f9dc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.nio.charset.StandardCharsets; @@ -25,31 +26,33 @@ public final class NetworkTapsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"yrqlazfjltck\",\"sourceTapRuleId\":\"vdxhyfv\",\"destinations\":[{\"name\":\"exfdzpxalk\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"kzaiyrnwwo\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"oizuwwzcrig\"]},\"destinationTapRuleId\":\"belnqalbsoqxajsi\"}],\"pollingType\":\"Pull\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"bwxuypcuriwll\"},\"location\":\"clv\",\"tags\":{\"miysghhcmqdlkk\":\"qtzshwlwjxr\",\"dnxbssatpialrq\":\"bdekbvdulmka\"},\"id\":\"wcxxccf\",\"name\":\"fvoz\",\"type\":\"iyvrexitpz\"}]}"; + = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"ngyqlzozmbapj\",\"sourceTapRuleId\":\"zabl\",\"networkFabricIds\":[\"tjlzkymcg\",\"bp\",\"fbgfwjqw\",\"vse\"],\"destinations\":[{\"name\":\"kxxdrgbnqmh\",\"destinationType\":\"Direct\",\"destinationId\":\"zm\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"lqbu\"]},\"destinationTapRuleId\":\"udsmdglqrkst\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"somxwsflylols\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"glmcgy\"},\"identity\":{\"principalId\":\"qdjxurbjx\",\"tenantId\":\"rxvguzvtw\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zptngr\":{\"principalId\":\"qnvijhdcoln\",\"clientId\":\"dppiodnntolo\"},\"u\":{\"principalId\":\"vimxacx\",\"clientId\":\"czcdkomr\"}}},\"location\":\"t\",\"tags\":{\"ywjn\":\"dq\",\"hsijxm\":\"dysky\",\"suwmbdtfetrgzy\":\"iuymfx\",\"qszqkrsnx\":\"prrapghloemqapv\"},\"id\":\"ezwr\",\"name\":\"qadtv\",\"type\":\"gug\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkTaps().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("clv", response.iterator().next().location()); - Assertions.assertEquals("qtzshwlwjxr", response.iterator().next().tags().get("miysghhcmqdlkk")); - Assertions.assertEquals("yrqlazfjltck", response.iterator().next().networkPacketBrokerId()); - Assertions.assertEquals("exfdzpxalk", response.iterator().next().destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + Assertions.assertEquals("t", response.iterator().next().location()); + Assertions.assertEquals("dq", response.iterator().next().tags().get("ywjn")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("ngyqlzozmbapj", response.iterator().next().networkPacketBrokerId()); + Assertions.assertEquals("kxxdrgbnqmh", response.iterator().next().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, response.iterator().next().destinations().get(0).destinationType()); - Assertions.assertEquals("kzaiyrnwwo", response.iterator().next().destinations().get(0).destinationId()); + Assertions.assertEquals("zm", response.iterator().next().destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, response.iterator().next().destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("oizuwwzcrig", + Assertions.assertEquals("lqbu", response.iterator().next().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("belnqalbsoqxajsi", + Assertions.assertEquals("udsmdglqrkst", response.iterator().next().destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, response.iterator().next().pollingType()); - Assertions.assertEquals("bwxuypcuriwll", response.iterator().next().annotation()); + Assertions.assertEquals(PollingType.PUSH, response.iterator().next().pollingType()); + Assertions.assertEquals("glmcgy", response.iterator().next().annotation()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java index a72b5278eb96..7e766fda654b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java @@ -1,124 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapsListResult; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class NetworkTapsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"mhssfnwh\",\"sourceTapRuleId\":\"ah\",\"destinations\":[{\"name\":\"knfmkc\",\"destinationType\":\"Direct\",\"destinationId\":\"dgwuzron\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"hz\"},{\"name\":\"dn\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"dcikgxk\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"fzdjekebawnxzs\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Failed\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"annotation\":\"j\"},\"location\":\"iwu\",\"tags\":{\"xsqtzngxbs\":\"kakrxifqnffo\",\"citlynkwfsaang\":\"lewguxcmmhipbvs\",\"c\":\"gb\",\"cgdnxqeonmzr\":\"mhidyliuajkln\"},\"id\":\"jaojpzngdrzige\",\"name\":\"wsadsqyu\",\"type\":\"dkhwqdmohhe\"},{\"properties\":{\"networkPacketBrokerId\":\"yuunx\",\"sourceTapRuleId\":\"evyigdeipnf\",\"destinations\":[{\"name\":\"jwlii\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"jzwhajod\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"o\"},{\"name\":\"dyncradxsewbe\",\"destinationType\":\"Direct\",\"destinationId\":\"pmqnmelyksygih\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"msln\"},{\"name\":\"kqvzlbbbajdexq\",\"destinationType\":\"Direct\",\"destinationId\":\"xizbfzet\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"w\"},{\"name\":\"nbmajvvyxtvvx\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ixbka\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"mlngfwhrm\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\",\"annotation\":\"nrzblxna\"},\"location\":\"smfndcbsyhludzjk\",\"tags\":{\"rj\":\"ohwv\",\"urmd\":\"dvt\",\"ntjna\":\"a\"},\"id\":\"fhvqiias\",\"name\":\"twskkfkuyikmxhh\",\"type\":\"sxjbjkewrigl\"},{\"properties\":{\"networkPacketBrokerId\":\"qtrefe\",\"sourceTapRuleId\":\"flxcjffzwncvde\",\"destinations\":[{\"name\":\"n\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"jptnnt\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"jqpzj\"},{\"name\":\"pjrrhpgsjbioag\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ehmdqvaolidxd\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"vkjcim\"}],\"pollingType\":\"Push\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"hptjlrkdcyzhimm\"},\"location\":\"tdtftmizuzjd\",\"tags\":{\"kqoyimxpggk\":\"yzcslazp\",\"qpjuytvude\":\"teagbgac\",\"ifm\":\"lpbybkisb\"},\"id\":\"glpwdjr\",\"name\":\"urfshzn\",\"type\":\"rttuhaaa\"}],\"nextLink\":\"dcdjmdkqtxfrmbe\"}") + "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"qesqsqmiek\",\"sourceTapRuleId\":\"p\",\"networkFabricIds\":[\"h\"],\"destinations\":[{\"name\":\"tykkvjjlba\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"urzyqo\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"umuej\"},{\"name\":\"xpxxizchmbuzg\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"rkjkn\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"sulaybhozls\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"bvcntpoeeytrsl\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\",\"annotation\":\"ggsxznb\"},\"identity\":{\"principalId\":\"kqbylb\",\"tenantId\":\"jldicqomanefw\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jukfalwceechcayv\":{\"principalId\":\"vkya\",\"clientId\":\"oyfzoidyaeprev\"},\"ybfby\":{\"principalId\":\"eqpucnus\",\"clientId\":\"lfhicrjr\"},\"gseiqb\":{\"principalId\":\"lqllbofsn\",\"clientId\":\"cybrhxgiknrl\"},\"pksgo\":{\"principalId\":\"qjfeam\",\"clientId\":\"uxd\"}}},\"location\":\"unvnjqldrqq\",\"tags\":{\"dthfwlnvqa\":\"gusqlxlx\",\"blnlmpuyypaggpai\":\"byfi\"},\"id\":\"eaeyzwloqrmgdhym\",\"name\":\"pvlxtywu\",\"type\":\"hj\"},{\"properties\":{\"networkPacketBrokerId\":\"spllitxrrgkw\",\"sourceTapRuleId\":\"oyhqoivxcodwkwo\",\"networkFabricIds\":[\"achhsizfuew\",\"fwfiikqcdnzsfi\",\"hgneo\"],\"destinations\":[{\"name\":\"mcrxlyzoaho\",\"destinationType\":\"Direct\",\"destinationId\":\"fakrxjjwnbrmdw\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"nlsyia\"},{\"name\":\"nistcjhatc\",\"destinationType\":\"Direct\",\"destinationId\":\"phcst\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"cpanap\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"rin\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"annotation\":\"qbgqnzmzct\"},\"identity\":{\"principalId\":\"jkpi\",\"tenantId\":\"ucvbdoz\",\"type\":\"None\",\"userAssignedIdentities\":{\"i\":{\"principalId\":\"e\",\"clientId\":\"zsqm\"},\"pvrd\":{\"principalId\":\"xmiw\",\"clientId\":\"qi\"}}},\"location\":\"cdnzoxl\",\"tags\":{\"sugqcglma\":\"xtwgbawshram\",\"xvqlauu\":\"fzto\",\"fmcerfxfeiqba\":\"gwa\",\"ipssv\":\"thzw\"},\"id\":\"o\",\"name\":\"ijcqcjozz\",\"type\":\"kug\"},{\"properties\":{\"networkPacketBrokerId\":\"dqqbt\",\"sourceTapRuleId\":\"vocu\",\"networkFabricIds\":[\"lbpwarhwettohg\",\"z\",\"xyvtkzbhizxp\",\"sddmwnfhmju\"],\"destinations\":[{\"name\":\"qnkushvlxud\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"kaqnirmi\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"hjcgszfbqygkxrl\"},{\"name\":\"ojlclpumveybodhr\",\"destinationType\":\"Direct\",\"destinationId\":\"k\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"mwb\"},{\"name\":\"umjvegpdxtsaujt\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ojybolqoxuptsli\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"lkwk\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"amtykxs\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Failed\",\"administrativeState\":\"EnabledDegraded\",\"annotation\":\"qmzdozktkdpczeo\"},\"identity\":{\"principalId\":\"rgcnbvmhvqpkedax\",\"tenantId\":\"yorfjid\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zgkooagrlwpame\":{\"principalId\":\"eogavfyihuz\",\"clientId\":\"pwnyfjcypazwiimd\"},\"aifllxccprk\":{\"principalId\":\"twqade\",\"clientId\":\"uwxkyxiatfamr\"}}},\"location\":\"fozwhomydxgtuq\",\"tags\":{\"vvketyd\":\"quzihir\",\"rmh\":\"aqoktssgvqxer\",\"jlvihylrxsiy\":\"raqgb\"},\"id\":\"syiumtitlqy\",\"name\":\"fvernnk\",\"type\":\"pkayqivbig\"},{\"properties\":{\"networkPacketBrokerId\":\"rqgzetbo\",\"sourceTapRuleId\":\"t\",\"networkFabricIds\":[\"uxppwpcfm\",\"rmtgwhzbbdwrjen\",\"ofeiiewibdtplj\",\"nmajokbxxc\"],\"destinations\":[{\"name\":\"hxjwtkftgzljuep\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"wsjpgb\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"xjhgvtepvrunu\"},{\"name\":\"makkshrnaxkcz\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ohdig\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"ocft\"},{\"name\":\"amodw\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"a\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"xerowuzvrnnb\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"eonmtojxgdo\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"sjknaq\"},\"identity\":{\"principalId\":\"wgpmdmwiwevvesw\",\"tenantId\":\"hbq\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"bkirgknhfwlajw\":{\"principalId\":\"argkwimtc\",\"clientId\":\"eeuquuwczzcujwx\"},\"rsdplvia\":{\"principalId\":\"jydjb\",\"clientId\":\"ipvspewyzhydtkbm\"}}},\"location\":\"armawokgcnevicc\",\"tags\":{\"oi\":\"ysclwbjgiynqr\"},\"id\":\"weofvsxauphzefi\",\"name\":\"eyydx\",\"type\":\"gtiivzkd\"}],\"nextLink\":\"xcc\"}") .toObject(NetworkTapsListResult.class); - Assertions.assertEquals("iwu", model.value().get(0).location()); - Assertions.assertEquals("kakrxifqnffo", model.value().get(0).tags().get("xsqtzngxbs")); - Assertions.assertEquals("mhssfnwh", model.value().get(0).networkPacketBrokerId()); - Assertions.assertEquals("knfmkc", model.value().get(0).destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.value().get(0).destinations().get(0).destinationType()); - Assertions.assertEquals("dgwuzron", model.value().get(0).destinations().get(0).destinationId()); - Assertions.assertEquals("hz", model.value().get(0).destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.value().get(0).pollingType()); - Assertions.assertEquals("j", model.value().get(0).annotation()); - Assertions.assertEquals("dcdjmdkqtxfrmbe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapsListResult model = new NetworkTapsListResult().withValue(Arrays.asList( - new NetworkTapInner().withLocation("iwu") - .withTags(mapOf("xsqtzngxbs", "kakrxifqnffo", "citlynkwfsaang", "lewguxcmmhipbvs", "c", "gb", - "cgdnxqeonmzr", "mhidyliuajkln")) - .withNetworkPacketBrokerId("mhssfnwh") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("knfmkc") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("dgwuzron") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("hz"), - new NetworkTapPropertiesDestinationsItem().withName("dn") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("dcikgxk") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("fzdjekebawnxzs"))) - .withPollingType(PollingType.PULL) - .withAnnotation("j"), - new NetworkTapInner().withLocation("smfndcbsyhludzjk") - .withTags(mapOf("rj", "ohwv", "urmd", "dvt", "ntjna", "a")) - .withNetworkPacketBrokerId("yuunx") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("jwlii") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("jzwhajod") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("o"), - new NetworkTapPropertiesDestinationsItem().withName("dyncradxsewbe") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("pmqnmelyksygih") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("msln"), - new NetworkTapPropertiesDestinationsItem().withName("kqvzlbbbajdexq") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("xizbfzet") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("w"), - new NetworkTapPropertiesDestinationsItem().withName("nbmajvvyxtvvx") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("ixbka") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("mlngfwhrm"))) - .withPollingType(PollingType.PULL) - .withAnnotation("nrzblxna"), - new NetworkTapInner().withLocation("tdtftmizuzjd") - .withTags(mapOf("kqoyimxpggk", "yzcslazp", "qpjuytvude", "teagbgac", "ifm", "lpbybkisb")) - .withNetworkPacketBrokerId("qtrefe") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("n") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("jptnnt") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("jqpzj"), - new NetworkTapPropertiesDestinationsItem().withName("pjrrhpgsjbioag") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("ehmdqvaolidxd") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("vkjcim"))) - .withPollingType(PollingType.PUSH) - .withAnnotation("hptjlrkdcyzhimm"))) - .withNextLink("dcdjmdkqtxfrmbe"); - model = BinaryData.fromObject(model).toObject(NetworkTapsListResult.class); - Assertions.assertEquals("iwu", model.value().get(0).location()); - Assertions.assertEquals("kakrxifqnffo", model.value().get(0).tags().get("xsqtzngxbs")); - Assertions.assertEquals("mhssfnwh", model.value().get(0).networkPacketBrokerId()); - Assertions.assertEquals("knfmkc", model.value().get(0).destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.value().get(0).destinations().get(0).destinationType()); - Assertions.assertEquals("dgwuzron", model.value().get(0).destinations().get(0).destinationId()); - Assertions.assertEquals("hz", model.value().get(0).destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.value().get(0).pollingType()); - Assertions.assertEquals("j", model.value().get(0).annotation()); - Assertions.assertEquals("dcdjmdkqtxfrmbe", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("unvnjqldrqq", model.value().get(0).location()); + Assertions.assertEquals("gusqlxlx", model.value().get(0).tags().get("dthfwlnvqa")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("qesqsqmiek", model.value().get(0).networkPacketBrokerId()); + Assertions.assertEquals("tykkvjjlba", model.value().get(0).destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + model.value().get(0).destinations().get(0).destinationType()); + Assertions.assertEquals("urzyqo", model.value().get(0).destinations().get(0).destinationId()); + Assertions.assertEquals("umuej", model.value().get(0).destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.value().get(0).pollingType()); + Assertions.assertEquals("ggsxznb", model.value().get(0).annotation()); + Assertions.assertEquals("xcc", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java index 780e16486af2..0c650b9b116f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java @@ -1,20 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,88 +29,163 @@ public final class NetworkToNetworkInterconnectInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectInner model = BinaryData.fromString( - "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"False\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":521816147,\"interfaces\":[\"lxvhhyqqegatxgrz\",\"mg\",\"nmtsdixc\"]},\"optionBLayer3Configuration\":{\"peerASN\":4124749824798467009,\"vlanId\":1749933536,\"fabricASN\":6076642803513262837,\"primaryIpv4Prefix\":\"cjc\",\"primaryIpv6Prefix\":\"airwcqzoofj\",\"secondaryIpv4Prefix\":\"jsvepfbhtleberp\",\"secondaryIpv6Prefix\":\"jeknfqnw\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1336097952,\"multiplier\":661705859},\"ipv4Routes\":[{\"prefix\":\"xgkrh\",\"nextHop\":[\"ehycpn\",\"wawonoehrguql\",\"fwafbjz\",\"pyrgu\"]},{\"prefix\":\"fazbkoc\",\"nextHop\":[\"gvthrmxkbcjww\",\"xomraw\",\"pkeboozflyac\",\"gaedaoiq\"]}],\"ipv6Routes\":[{\"prefix\":\"gdtwgabd\",\"nextHop\":[\"kuz\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ecooyvhtuqbp\",\"importIpv6RoutePolicyId\":\"nii\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gagdvcdqh\",\"exportIpv6RoutePolicyId\":\"zbpyf\"},\"egressAclId\":\"fdfp\",\"ingressAclId\":\"ncwmhjob\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\"},\"id\":\"cqhyftcvbz\",\"name\":\"gwhgkgsoau\",\"type\":\"orssatfyb\"}") + "{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1562445388,\"interfaces\":[\"jeazrahelhbimyii\",\"qamcthtpqgfz\"]},\"optionBLayer3Configuration\":{\"peerASN\":2553330763143681525,\"vlanId\":1232885828,\"fabricASN\":690013592808526718,\"peLoopbackIpAddress\":[\"flgzh\",\"wjg\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":89518490},{\"maximumRoutes\":17084454},{\"maximumRoutes\":260548114},{\"maximumRoutes\":1204669739}],\"primaryIpv4Prefix\":\"pccxziv\",\"primaryIpv6Prefix\":\"mhzghhhkvnnjdtu\",\"secondaryIpv4Prefix\":\"zvhn\",\"secondaryIpv6Prefix\":\"pmxnht\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1663764462,\"multiplier\":843096355},\"ipv4Routes\":[{\"prefix\":\"wvtlgxy\",\"nextHop\":[\"swequflzyyopoay\",\"wwgw\"]},{\"prefix\":\"ubotbvufrkw\",\"nextHop\":[\"emimdtnpowewjsk\",\"eeedddrftfquulp\"]},{\"prefix\":\"lhs\",\"nextHop\":[\"geeuwbrnq\",\"xfedqnetdqw\"]},{\"prefix\":\"nxoqgv\",\"nextHop\":[\"pgg\"]}],\"ipv6Routes\":[{\"prefix\":\"eyobqaj\",\"nextHop\":[\"irv\",\"vrvkgpogplb\",\"uvlnhxnrnjhinaeg\"]},{\"prefix\":\"sbxnep\",\"nextHop\":[\"jmoplukfy\",\"kfhsovadkr\"]},{\"prefix\":\"jxmwqpdkesj\",\"nextHop\":[\"zkqmx\",\"poriwbwggijtspzj\"]},{\"prefix\":\"rrh\",\"nextHop\":[\"wsbzrhdugquhtr\",\"zfrunjfhrjhiycba\",\"seqnczkv\",\"hvtuwyjsqwzsz\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":866629166,\"multiplier\":1326282206},\"ipv4Routes\":[{\"prefix\":\"yskwwun\",\"nextHop\":[\"czavoj\",\"slhip\",\"ukvbljpxpr\"]}],\"ipv6Routes\":[{\"prefix\":\"hyluqalpcufj\",\"nextHop\":[\"xtiztqdstahh\"]},{\"prefix\":\"saaxxsrit\",\"nextHop\":[\"wbaaes\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"fmxwoqot\",\"importIpv6RoutePolicyId\":\"qb\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"srv\",\"exportIpv6RoutePolicyId\":\"tistyikjhorlx\"},\"egressAclId\":\"ypk\",\"ingressAclId\":\"nycntr\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"mbqjtsuh\",\"nextHop\":[\"to\",\"tdyqav\",\"x\"]}],\"ipv6Routes\":[{\"prefix\":\"zxsyaks\",\"nextHop\":[\"paamihwb\",\"hvwt\"]},{\"prefix\":\"pbgchcgsfzhb\",\"nextHop\":[\"iys\"]},{\"prefix\":\"bjsdj\",\"nextHop\":[\"xeysgwkcffe\"]},{\"prefix\":\"znzcbivoveomkhfe\",\"nextHop\":[\"ooplfpohim\",\"ckycjpeebzn\"]}]},\"lastOperation\":{\"details\":\"xsuloutnpb\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"pncdmwkhup\",\"name\":\"hsldqd\",\"type\":\"a\"}") .toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.CE, model.nniType()); + Assertions.assertEquals(NniType.NPB, model.nniType()); Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(521816147, model.layer2Configuration().mtu()); - Assertions.assertEquals("lxvhhyqqegatxgrz", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("cjc", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("airwcqzoofj", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("jsvepfbhtleberp", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jeknfqnw", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(4124749824798467009L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1749933536, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1336097952, + Assertions.assertEquals(1562445388, model.layer2Configuration().mtu()); + Assertions.assertEquals("jeazrahelhbimyii", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("pccxziv", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("mhzghhhkvnnjdtu", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("zvhn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("pmxnht", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2553330763143681525L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1232885828, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("flgzh", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(89518490, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1663764462, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(661705859, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xgkrh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehycpn", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("gdtwgabd", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kuz", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ecooyvhtuqbp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nii", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gagdvcdqh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zbpyf", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fdfp", model.egressAclId()); - Assertions.assertEquals("ncwmhjob", model.ingressAclId()); + Assertions.assertEquals(843096355, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("wvtlgxy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("swequflzyyopoay", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("eyobqaj", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("irv", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(866629166, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1326282206, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("yskwwun", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("czavoj", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("hyluqalpcufj", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xtiztqdstahh", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fmxwoqot", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qb", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("srv", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("tistyikjhorlx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ypk", model.egressAclId()); + Assertions.assertEquals("nycntr", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.microBfdState()); + Assertions.assertEquals("mbqjtsuh", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("to", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zxsyaks", model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("paamihwb", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkToNetworkInterconnectInner model = new NetworkToNetworkInterconnectInner().withNniType(NniType.CE) + NetworkToNetworkInterconnectInner model = new NetworkToNetworkInterconnectInner().withNniType(NniType.NPB) .withIsManagementType(IsManagementType.FALSE) .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withMtu(521816147) - .withInterfaces(Arrays.asList("lxvhhyqqegatxgrz", "mg", "nmtsdixc"))) - .withOptionBLayer3Configuration( - new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("cjc") - .withPrimaryIpv6Prefix("airwcqzoofj") - .withSecondaryIpv4Prefix("jsvepfbhtleberp") - .withSecondaryIpv6Prefix("jeknfqnw") - .withPeerAsn(4124749824798467009L) - .withVlanId(1749933536)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withLayer2Configuration(new Layer2Configuration().withMtu(1562445388) + .withInterfaces(Arrays.asList("jeazrahelhbimyii", "qamcthtpqgfz"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("pccxziv") + .withPrimaryIpv6Prefix("mhzghhhkvnnjdtu") + .withSecondaryIpv4Prefix("zvhn") + .withSecondaryIpv6Prefix("pmxnht") + .withPeerAsn(2553330763143681525L) + .withVlanId(1232885828) + .withPeLoopbackIpAddress(Arrays.asList("flgzh", "wjg")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(89518490), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(17084454), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(260548114), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1204669739)))) + .withNpbStaticRouteConfiguration( + new NpbStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1663764462).withMultiplier(843096355)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("wvtlgxy") + .withNextHop(Arrays.asList("swequflzyyopoay", "wwgw")), + new StaticRouteProperties().withPrefix("ubotbvufrkw") + .withNextHop(Arrays.asList("emimdtnpowewjsk", "eeedddrftfquulp")), + new StaticRouteProperties().withPrefix("lhs") + .withNextHop(Arrays.asList("geeuwbrnq", "xfedqnetdqw")), + new StaticRouteProperties().withPrefix("nxoqgv").withNextHop(Arrays.asList("pgg")))) + .withIpv6Routes( + Arrays + .asList( + new StaticRouteProperties().withPrefix("eyobqaj") + .withNextHop(Arrays.asList("irv", "vrvkgpogplb", "uvlnhxnrnjhinaeg")), + new StaticRouteProperties().withPrefix("sbxnep") + .withNextHop(Arrays.asList("jmoplukfy", "kfhsovadkr")), + new StaticRouteProperties().withPrefix("jxmwqpdkesj") + .withNextHop(Arrays.asList("zkqmx", "poriwbwggijtspzj")), + new StaticRouteProperties().withPrefix("rrh") + .withNextHop(Arrays.asList("wsbzrhdugquhtr", "zfrunjfhrjhiycba", "seqnczkv", + "hvtuwyjsqwzsz"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1336097952).withMultiplier(661705859)) + new BfdConfiguration().withIntervalInMilliSeconds(866629166).withMultiplier(1326282206)) + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("yskwwun") + .withNextHop(Arrays.asList("czavoj", "slhip", "ukvbljpxpr")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("hyluqalpcufj").withNextHop(Arrays.asList("xtiztqdstahh")), + new StaticRouteProperties().withPrefix("saaxxsrit").withNextHop(Arrays.asList("wbaaes"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("fmxwoqot") + .withImportIpv6RoutePolicyId("qb")) + .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("srv") + .withExportIpv6RoutePolicyId("tistyikjhorlx")) + .withEgressAclId("ypk") + .withIngressAclId("nycntr") + .withMicroBfdState(MicroBfdState.DISABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xgkrh") - .withNextHop(Arrays.asList("ehycpn", "wawonoehrguql", "fwafbjz", "pyrgu")), - new StaticRouteProperties().withPrefix("fazbkoc") - .withNextHop(Arrays.asList("gvthrmxkbcjww", "xomraw", "pkeboozflyac", "gaedaoiq")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("gdtwgabd").withNextHop(Arrays.asList("kuz"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("ecooyvhtuqbp") - .withImportIpv6RoutePolicyId("nii")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("gagdvcdqh") - .withExportIpv6RoutePolicyId("zbpyf")) - .withEgressAclId("fdfp") - .withIngressAclId("ncwmhjob"); + new StaticRouteProperties().withPrefix("mbqjtsuh").withNextHop(Arrays.asList("to", "tdyqav", "x")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("zxsyaks").withNextHop(Arrays.asList("paamihwb", "hvwt")), + new StaticRouteProperties().withPrefix("pbgchcgsfzhb").withNextHop(Arrays.asList("iys")), + new StaticRouteProperties().withPrefix("bjsdj").withNextHop(Arrays.asList("xeysgwkcffe")), + new StaticRouteProperties().withPrefix("znzcbivoveomkhfe") + .withNextHop(Arrays.asList("ooplfpohim", "ckycjpeebzn"))))); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.CE, model.nniType()); + Assertions.assertEquals(NniType.NPB, model.nniType()); Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(521816147, model.layer2Configuration().mtu()); - Assertions.assertEquals("lxvhhyqqegatxgrz", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("cjc", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("airwcqzoofj", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("jsvepfbhtleberp", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jeknfqnw", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(4124749824798467009L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1749933536, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1336097952, + Assertions.assertEquals(1562445388, model.layer2Configuration().mtu()); + Assertions.assertEquals("jeazrahelhbimyii", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("pccxziv", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("mhzghhhkvnnjdtu", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("zvhn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("pmxnht", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2553330763143681525L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1232885828, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("flgzh", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(89518490, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1663764462, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(661705859, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xgkrh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehycpn", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("gdtwgabd", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kuz", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ecooyvhtuqbp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nii", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gagdvcdqh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zbpyf", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fdfp", model.egressAclId()); - Assertions.assertEquals("ncwmhjob", model.ingressAclId()); + Assertions.assertEquals(843096355, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("wvtlgxy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("swequflzyyopoay", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("eyobqaj", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("irv", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(866629166, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1326282206, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("yskwwun", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("czavoj", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("hyluqalpcufj", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xtiztqdstahh", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fmxwoqot", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qb", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("srv", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("tistyikjhorlx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ypk", model.egressAclId()); + Assertions.assertEquals("nycntr", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.microBfdState()); + Assertions.assertEquals("mbqjtsuh", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("to", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zxsyaks", model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("paamihwb", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java new file mode 100644 index 000000000000..750e94245a10 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkToNetworkInterconnectPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkToNetworkInterconnectPatchProperties model = BinaryData.fromString( + "{\"layer2Configuration\":{\"mtu\":1033358583,\"interfaces\":[\"ajdexq\",\"awexizb\",\"zetjizwh\",\"nbmajvvyxtvvx\"]},\"optionBLayer3Configuration\":{\"peerASN\":7771391226300618246,\"vlanId\":1507685915,\"fabricASN\":4384360717439789713,\"peLoopbackIpAddress\":[\"mlngfwhrm\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":574178691},{\"maximumRoutes\":840397264},{\"maximumRoutes\":177362954},{\"maximumRoutes\":281550722}],\"primaryIpv4Prefix\":\"x\",\"primaryIpv6Prefix\":\"hh\",\"secondaryIpv4Prefix\":\"fndcbsyhlud\",\"secondaryIpv6Prefix\":\"kkovohwv\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1439333966,\"multiplier\":974254327},\"ipv4Routes\":[{\"prefix\":\"dtacntjnaffhv\",\"nextHop\":[\"ia\"]},{\"prefix\":\"btws\",\"nextHop\":[\"fku\",\"ikm\"]},{\"prefix\":\"hhqsxjbjkewrigl\",\"nextHop\":[\"trefeclfl\",\"cjffzwn\"]}],\"ipv6Routes\":[{\"prefix\":\"efx\",\"nextHop\":[\"ztpcjptnntqrcjq\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":374487754,\"multiplier\":1718231355},\"ipv4Routes\":[{\"prefix\":\"gsjbi\",\"nextHop\":[\"gwviqehmdq\",\"aolid\",\"dfs\",\"vkjcim\"]},{\"prefix\":\"rsvxphtjnhptj\",\"nextHop\":[\"k\"]},{\"prefix\":\"cyzhimmydtdtftmi\",\"nextHop\":[\"zjdurgyz\"]},{\"prefix\":\"slazprkqoyimx\",\"nextHop\":[\"gkttea\",\"bgacnqpjuytv\",\"deylpbyb\",\"is\"]}],\"ipv6Routes\":[{\"prefix\":\"fmxgl\",\"nextHop\":[\"dj\",\"au\",\"fshznu\",\"ttuhaaax\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"djmdkqtxfr\",\"importIpv6RoutePolicyId\":\"ecxstowa\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"xuihwesr\",\"exportIpv6RoutePolicyId\":\"aqgblkkncyp\"},\"egressAclId\":\"evspsaney\",\"ingressAclId\":\"erpiobnhrfbrj\",\"microBfdState\":\"Enabled\"}") + .toObject(NetworkToNetworkInterconnectPatchProperties.class); + Assertions.assertEquals(1033358583, model.layer2Configuration().mtu()); + Assertions.assertEquals("ajdexq", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("x", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("hh", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("fndcbsyhlud", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("kkovohwv", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(7771391226300618246L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1507685915, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("mlngfwhrm", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(574178691, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1439333966, + model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(974254327, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dtacntjnaffhv", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ia", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("efx", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ztpcjptnntqrcjq", + model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(374487754, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1718231355, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("gsjbi", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gwviqehmdq", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fmxgl", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dj", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("djmdkqtxfr", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("ecxstowa", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("xuihwesr", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("aqgblkkncyp", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("evspsaney", model.egressAclId()); + Assertions.assertEquals("erpiobnhrfbrj", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkToNetworkInterconnectPatchProperties model = new NetworkToNetworkInterconnectPatchProperties() + .withLayer2Configuration(new Layer2ConfigurationPatch().withMtu(1033358583) + .withInterfaces(Arrays.asList("ajdexq", "awexizb", "zetjizwh", "nbmajvvyxtvvx"))) + .withOptionBLayer3Configuration(new OptionBLayer3ConfigurationPatchProperties().withPrimaryIpv4Prefix("x") + .withPrimaryIpv6Prefix("hh") + .withSecondaryIpv4Prefix("fndcbsyhlud") + .withSecondaryIpv6Prefix("kkovohwv") + .withPeerAsn(7771391226300618246L) + .withVlanId(1507685915) + .withPeLoopbackIpAddress(Arrays.asList("mlngfwhrm")) + .withBmpConfiguration(new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(574178691), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(840397264), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(177362954), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(281550722)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(1439333966).withMultiplier(974254327)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("dtacntjnaffhv").withNextHop(Arrays.asList("ia")), + new StaticRoutePatchProperties().withPrefix("btws").withNextHop(Arrays.asList("fku", "ikm")), + new StaticRoutePatchProperties().withPrefix("hhqsxjbjkewrigl") + .withNextHop(Arrays.asList("trefeclfl", "cjffzwn")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("efx").withNextHop(Arrays.asList("ztpcjptnntqrcjq"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(374487754).withMultiplier(1718231355)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("gsjbi") + .withNextHop(Arrays.asList("gwviqehmdq", "aolid", "dfs", "vkjcim")), + new StaticRoutePatchProperties().withPrefix("rsvxphtjnhptj").withNextHop(Arrays.asList("k")), + new StaticRoutePatchProperties().withPrefix("cyzhimmydtdtftmi") + .withNextHop(Arrays.asList("zjdurgyz")), + new StaticRoutePatchProperties().withPrefix("slazprkqoyimx") + .withNextHop(Arrays.asList("gkttea", "bgacnqpjuytv", "deylpbyb", "is")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("fmxgl") + .withNextHop(Arrays.asList("dj", "au", "fshznu", "ttuhaaax"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("djmdkqtxfr") + .withImportIpv6RoutePolicyId("ecxstowa")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("xuihwesr") + .withExportIpv6RoutePolicyId("aqgblkkncyp")) + .withEgressAclId("evspsaney") + .withIngressAclId("erpiobnhrfbrj") + .withMicroBfdState(MicroBfdState.ENABLED); + model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatchProperties.class); + Assertions.assertEquals(1033358583, model.layer2Configuration().mtu()); + Assertions.assertEquals("ajdexq", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("x", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("hh", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("fndcbsyhlud", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("kkovohwv", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(7771391226300618246L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1507685915, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("mlngfwhrm", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(574178691, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1439333966, + model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(974254327, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dtacntjnaffhv", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ia", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("efx", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ztpcjptnntqrcjq", + model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(374487754, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1718231355, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("gsjbi", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gwviqehmdq", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fmxgl", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dj", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("djmdkqtxfr", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("ecxstowa", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("xuihwesr", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("aqgblkkncyp", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("evspsaney", model.egressAclId()); + Assertions.assertEquals("erpiobnhrfbrj", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java index e154a0b13f0c..b9d96a3b8a78 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java @@ -1,18 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,84 +25,133 @@ public final class NetworkToNetworkInterconnectPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectPatch model = BinaryData.fromString( - "{\"properties\":{\"layer2Configuration\":{\"mtu\":1051917063,\"interfaces\":[\"gdusxurs\",\"ivuxcjkcoqwczs\"]},\"optionBLayer3Configuration\":{\"peerASN\":3699317337579230590,\"vlanId\":2024380694,\"fabricASN\":7884409884949688580,\"primaryIpv4Prefix\":\"aangqtnhjrfdmfdv\",\"primaryIpv6Prefix\":\"aexxjfwtgdfkka\",\"secondaryIpv4Prefix\":\"gvmuafmczf\",\"secondaryIpv6Prefix\":\"yuepsvpltidajjvy\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":607736449,\"multiplier\":250828837},\"ipv4Routes\":[{\"prefix\":\"xo\",\"nextHop\":[\"elsy\",\"svfnkwm\",\"gjjekrkn\"]},{\"prefix\":\"drugjqyc\",\"nextHop\":[\"txkrdtulcrcjdk\"]},{\"prefix\":\"otcsu\",\"nextHop\":[\"zoonsv\",\"bch\",\"xfpwhd\",\"sl\"]},{\"prefix\":\"klglmnnkkwa\",\"nextHop\":[\"shwy\",\"xrid\",\"tb\"]}],\"ipv6Routes\":[{\"prefix\":\"jmkgxqwqueuuylzt\",\"nextHop\":[\"iizevjykofvez\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hkqtwqlepjj\",\"importIpv6RoutePolicyId\":\"c\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"wz\",\"exportIpv6RoutePolicyId\":\"togffjwajnrtwz\"},\"egressAclId\":\"qkifmxawostfz\",\"ingressAclId\":\"hrkmjqncfv\"},\"id\":\"cnhemvwfnq\",\"name\":\"wypvndrwbgo\",\"type\":\"tggrss\"}") + "{\"properties\":{\"layer2Configuration\":{\"mtu\":1215560654,\"interfaces\":[\"pstizsyqagqllcb\"]},\"optionBLayer3Configuration\":{\"peerASN\":6745249249858785189,\"vlanId\":1810101357,\"fabricASN\":474427810519123884,\"peLoopbackIpAddress\":[\"rqwfyybptmjjr\",\"ogykugdlavsav\",\"thkslgeuufkb\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":2085433899}],\"primaryIpv4Prefix\":\"jybdnbycsbto\",\"primaryIpv6Prefix\":\"azdjmofsvpzxg\",\"secondaryIpv4Prefix\":\"wxuymlfjymg\",\"secondaryIpv6Prefix\":\"mszcfy\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1930021246,\"multiplier\":1322704124},\"ipv4Routes\":[{\"prefix\":\"dpagk\",\"nextHop\":[\"maovrgihl\",\"zffewvqkyc\",\"cgeipqxxsdyaf\"]},{\"prefix\":\"tydsmm\",\"nextHop\":[\"hg\",\"lejqzhpvhxp\",\"adj\",\"eullgfyog\"]},{\"prefix\":\"qscjpvqerqxk\",\"nextHop\":[\"wdzpzl\"]},{\"prefix\":\"cuex\",\"nextHop\":[\"pwwvmbjecfw\",\"bghnkfrwx\",\"hl\",\"dsnjzpchiypb\"]}],\"ipv6Routes\":[{\"prefix\":\"i\",\"nextHop\":[\"ktqoze\",\"brsrjzgkbrau\",\"bo\",\"fq\"]},{\"prefix\":\"nqbjxgjwsrer\",\"nextHop\":[\"buudrizwkwkjxla\",\"cedikqelssyb\"]},{\"prefix\":\"bevgbn\",\"nextHop\":[\"mmkiqhypwtmzy\",\"jy\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":60005380,\"multiplier\":2109159418},\"ipv4Routes\":[{\"prefix\":\"wiijcfqiywhxpsba\",\"nextHop\":[\"alezaydpuzudege\",\"xlieggoto\",\"mhssfnwh\"]},{\"prefix\":\"kahhec\",\"nextHop\":[\"fmkcu\",\"thdgwuzronodvhzf\"]}],\"ipv6Routes\":[{\"prefix\":\"wysodcikgx\",\"nextHop\":[\"zzfzdjek\"]},{\"prefix\":\"b\",\"nextHop\":[\"nxzsjwy\"]},{\"prefix\":\"ixirgcjfaiw\",\"nextHop\":[\"pjkakrxifqnf\"]},{\"prefix\":\"orxsqtzngxbsale\",\"nextHop\":[\"uxcmmhipbvskc\",\"tlynkwfsaangfg\",\"mcvmhidyliuajkln\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"dnxqeonm\",\"importIpv6RoutePolicyId\":\"jjaojpzngdrzige\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"adsqyuddkhwqd\",\"exportIpv6RoutePolicyId\":\"hheuyuun\"},\"egressAclId\":\"yevyigdeipnfizej\",\"ingressAclId\":\"iiacndjzwhaj\",\"microBfdState\":\"Disabled\"},\"id\":\"qokhdyncradxs\",\"type\":\"bempf\"}") .toObject(NetworkToNetworkInterconnectPatch.class); - Assertions.assertEquals(1051917063, model.layer2Configuration().mtu()); - Assertions.assertEquals("gdusxurs", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aangqtnhjrfdmfdv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("aexxjfwtgdfkka", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gvmuafmczf", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("yuepsvpltidajjvy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(3699317337579230590L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(2024380694, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(607736449, + Assertions.assertEquals(1215560654, model.layer2Configuration().mtu()); + Assertions.assertEquals("pstizsyqagqllcb", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("jybdnbycsbto", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("azdjmofsvpzxg", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("wxuymlfjymg", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("mszcfy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(6745249249858785189L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1810101357, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("rqwfyybptmjjr", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(2085433899, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1930021246, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(250828837, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xo", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("elsy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jmkgxqwqueuuylzt", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iizevjykofvez", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hkqtwqlepjj", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("c", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("togffjwajnrtwz", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qkifmxawostfz", model.egressAclId()); - Assertions.assertEquals("hrkmjqncfv", model.ingressAclId()); + Assertions.assertEquals(1322704124, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dpagk", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("maovrgihl", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("i", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ktqoze", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(60005380, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2109159418, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("wiijcfqiywhxpsba", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("alezaydpuzudege", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wysodcikgx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zzfzdjek", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dnxqeonm", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jjaojpzngdrzige", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("adsqyuddkhwqd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hheuyuun", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("yevyigdeipnfizej", model.egressAclId()); + Assertions.assertEquals("iiacndjzwhaj", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.microBfdState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkToNetworkInterconnectPatch model = new NetworkToNetworkInterconnectPatch() - .withLayer2Configuration(new Layer2Configuration().withMtu(1051917063) - .withInterfaces(Arrays.asList("gdusxurs", "ivuxcjkcoqwczs"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("aangqtnhjrfdmfdv") - .withPrimaryIpv6Prefix("aexxjfwtgdfkka") - .withSecondaryIpv4Prefix("gvmuafmczf") - .withSecondaryIpv6Prefix("yuepsvpltidajjvy") - .withPeerAsn(3699317337579230590L) - .withVlanId(2024380694)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withLayer2Configuration( + new Layer2ConfigurationPatch().withMtu(1215560654).withInterfaces(Arrays.asList("pstizsyqagqllcb"))) + .withOptionBLayer3Configuration( + new OptionBLayer3ConfigurationPatchProperties().withPrimaryIpv4Prefix("jybdnbycsbto") + .withPrimaryIpv6Prefix("azdjmofsvpzxg") + .withSecondaryIpv4Prefix("wxuymlfjymg") + .withSecondaryIpv6Prefix("mszcfy") + .withPeerAsn(6745249249858785189L) + .withVlanId(1810101357) + .withPeLoopbackIpAddress(Arrays.asList("rqwfyybptmjjr", "ogykugdlavsav", "thkslgeuufkb")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(2085433899)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(607736449).withMultiplier(250828837)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(1930021246).withMultiplier(1322704124)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xo") - .withNextHop(Arrays.asList("elsy", "svfnkwm", "gjjekrkn")), - new StaticRouteProperties().withPrefix("drugjqyc").withNextHop(Arrays.asList("txkrdtulcrcjdk")), - new StaticRouteProperties().withPrefix("otcsu") - .withNextHop(Arrays.asList("zoonsv", "bch", "xfpwhd", "sl")), - new StaticRouteProperties().withPrefix("klglmnnkkwa") - .withNextHop(Arrays.asList("shwy", "xrid", "tb")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("jmkgxqwqueuuylzt") - .withNextHop(Arrays.asList("iizevjykofvez"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("hkqtwqlepjj") - .withImportIpv6RoutePolicyId("c")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("wz") - .withExportIpv6RoutePolicyId("togffjwajnrtwz")) - .withEgressAclId("qkifmxawostfz") - .withIngressAclId("hrkmjqncfv"); + new StaticRoutePatchProperties().withPrefix("dpagk") + .withNextHop(Arrays.asList("maovrgihl", "zffewvqkyc", "cgeipqxxsdyaf")), + new StaticRoutePatchProperties().withPrefix("tydsmm") + .withNextHop(Arrays.asList("hg", "lejqzhpvhxp", "adj", "eullgfyog")), + new StaticRoutePatchProperties().withPrefix("qscjpvqerqxk").withNextHop(Arrays.asList("wdzpzl")), + new StaticRoutePatchProperties().withPrefix("cuex") + .withNextHop(Arrays.asList("pwwvmbjecfw", "bghnkfrwx", "hl", "dsnjzpchiypb")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("i") + .withNextHop(Arrays.asList("ktqoze", "brsrjzgkbrau", "bo", "fq")), + new StaticRoutePatchProperties().withPrefix("nqbjxgjwsrer") + .withNextHop(Arrays.asList("buudrizwkwkjxla", "cedikqelssyb")), + new StaticRoutePatchProperties().withPrefix("bevgbn") + .withNextHop(Arrays.asList("mmkiqhypwtmzy", "jy"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(60005380).withMultiplier(2109159418)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("wiijcfqiywhxpsba") + .withNextHop(Arrays.asList("alezaydpuzudege", "xlieggoto", "mhssfnwh")), + new StaticRoutePatchProperties().withPrefix("kahhec") + .withNextHop(Arrays.asList("fmkcu", "thdgwuzronodvhzf")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("wysodcikgx").withNextHop(Arrays.asList("zzfzdjek")), + new StaticRoutePatchProperties().withPrefix("b").withNextHop(Arrays.asList("nxzsjwy")), + new StaticRoutePatchProperties().withPrefix("ixirgcjfaiw") + .withNextHop(Arrays.asList("pjkakrxifqnf")), + new StaticRoutePatchProperties().withPrefix("orxsqtzngxbsale") + .withNextHop(Arrays.asList("uxcmmhipbvskc", "tlynkwfsaangfg", "mcvmhidyliuajkln"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("dnxqeonm") + .withImportIpv6RoutePolicyId("jjaojpzngdrzige")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("adsqyuddkhwqd") + .withExportIpv6RoutePolicyId("hheuyuun")) + .withEgressAclId("yevyigdeipnfizej") + .withIngressAclId("iiacndjzwhaj") + .withMicroBfdState(MicroBfdState.DISABLED); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatch.class); - Assertions.assertEquals(1051917063, model.layer2Configuration().mtu()); - Assertions.assertEquals("gdusxurs", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aangqtnhjrfdmfdv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("aexxjfwtgdfkka", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gvmuafmczf", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("yuepsvpltidajjvy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(3699317337579230590L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(2024380694, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(607736449, + Assertions.assertEquals(1215560654, model.layer2Configuration().mtu()); + Assertions.assertEquals("pstizsyqagqllcb", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("jybdnbycsbto", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("azdjmofsvpzxg", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("wxuymlfjymg", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("mszcfy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(6745249249858785189L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1810101357, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("rqwfyybptmjjr", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(2085433899, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1930021246, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(250828837, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xo", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("elsy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jmkgxqwqueuuylzt", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iizevjykofvez", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hkqtwqlepjj", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("c", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("togffjwajnrtwz", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qkifmxawostfz", model.egressAclId()); - Assertions.assertEquals("hrkmjqncfv", model.ingressAclId()); + Assertions.assertEquals(1322704124, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dpagk", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("maovrgihl", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("i", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ktqoze", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(60005380, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2109159418, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("wiijcfqiywhxpsba", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("alezaydpuzudege", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wysodcikgx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zzfzdjek", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dnxqeonm", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jjaojpzngdrzige", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("adsqyuddkhwqd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hheuyuun", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("yevyigdeipnfizej", model.egressAclId()); + Assertions.assertEquals("iiacndjzwhaj", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.microBfdState()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java deleted file mode 100644 index 0ece8ce55d5d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectPatchableProperties model = BinaryData.fromString( - "{\"layer2Configuration\":{\"mtu\":531102382,\"interfaces\":[\"injmuymve\"]},\"optionBLayer3Configuration\":{\"peerASN\":1336534665211813170,\"vlanId\":292634348,\"fabricASN\":1543166083084223809,\"primaryIpv4Prefix\":\"aictdscnkzzohn\",\"primaryIpv6Prefix\":\"d\",\"secondaryIpv4Prefix\":\"zeqozre\",\"secondaryIpv6Prefix\":\"bzq\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1141758238,\"multiplier\":407529894},\"ipv4Routes\":[{\"prefix\":\"exozonynp\",\"nextHop\":[\"eudpab\"]}],\"ipv6Routes\":[{\"prefix\":\"uwzosgyjxvcvaso\",\"nextHop\":[\"r\"]},{\"prefix\":\"xzv\",\"nextHop\":[\"b\",\"wgzygbaduvecovsd\",\"hzrtd\"]},{\"prefix\":\"akrlimzfvppkeqsi\",\"nextHop\":[\"mclngygnhrko\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"dta\",\"importIpv6RoutePolicyId\":\"opggorwjoqtrotp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pofyrlmwkptsk\",\"exportIpv6RoutePolicyId\":\"jgvhxcc\"},\"egressAclId\":\"kakmkookbputmgvm\",\"ingressAclId\":\"akmlwktfowzkroyr\"}") - .toObject(NetworkToNetworkInterconnectPatchableProperties.class); - Assertions.assertEquals(531102382, model.layer2Configuration().mtu()); - Assertions.assertEquals("injmuymve", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aictdscnkzzohn", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("d", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("zeqozre", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("bzq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(1336534665211813170L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(292634348, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1141758238, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(407529894, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("exozonynp", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eudpab", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uwzosgyjxvcvaso", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("r", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("dta", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("opggorwjoqtrotp", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pofyrlmwkptsk", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jgvhxcc", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kakmkookbputmgvm", model.egressAclId()); - Assertions.assertEquals("akmlwktfowzkroyr", model.ingressAclId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectPatchableProperties model = new NetworkToNetworkInterconnectPatchableProperties() - .withLayer2Configuration( - new Layer2Configuration().withMtu(531102382).withInterfaces(Arrays.asList("injmuymve"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("aictdscnkzzohn") - .withPrimaryIpv6Prefix("d") - .withSecondaryIpv4Prefix("zeqozre") - .withSecondaryIpv6Prefix("bzq") - .withPeerAsn(1336534665211813170L) - .withVlanId(292634348)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1141758238).withMultiplier(407529894)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("exozonynp").withNextHop(Arrays.asList("eudpab")))) - .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("uwzosgyjxvcvaso").withNextHop(Arrays.asList("r")), - new StaticRouteProperties().withPrefix("xzv") - .withNextHop(Arrays.asList("b", "wgzygbaduvecovsd", "hzrtd")), - new StaticRouteProperties().withPrefix("akrlimzfvppkeqsi") - .withNextHop(Arrays.asList("mclngygnhrko"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("dta") - .withImportIpv6RoutePolicyId("opggorwjoqtrotp")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("pofyrlmwkptsk") - .withExportIpv6RoutePolicyId("jgvhxcc")) - .withEgressAclId("kakmkookbputmgvm") - .withIngressAclId("akmlwktfowzkroyr"); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatchableProperties.class); - Assertions.assertEquals(531102382, model.layer2Configuration().mtu()); - Assertions.assertEquals("injmuymve", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aictdscnkzzohn", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("d", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("zeqozre", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("bzq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(1336534665211813170L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(292634348, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1141758238, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(407529894, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("exozonynp", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eudpab", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uwzosgyjxvcvaso", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("r", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("dta", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("opggorwjoqtrotp", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pofyrlmwkptsk", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jgvhxcc", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kakmkookbputmgvm", model.egressAclId()); - Assertions.assertEquals("akmlwktfowzkroyr", model.ingressAclId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java deleted file mode 100644 index 8879f8835456..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration model = BinaryData.fromString( - "{\"peerASN\":6409376053625835562,\"vlanId\":1958871772,\"fabricASN\":2516191824460277136,\"primaryIpv4Prefix\":\"jf\",\"primaryIpv6Prefix\":\"lqhxkasmcolmu\",\"secondaryIpv4Prefix\":\"yvaosdkluwz\",\"secondaryIpv6Prefix\":\"ygz\"}") - .toObject(NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.class); - Assertions.assertEquals("jf", model.primaryIpv4Prefix()); - Assertions.assertEquals("lqhxkasmcolmu", model.primaryIpv6Prefix()); - Assertions.assertEquals("yvaosdkluwz", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ygz", model.secondaryIpv6Prefix()); - Assertions.assertEquals(6409376053625835562L, model.peerAsn()); - Assertions.assertEquals(1958871772, model.vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration model - = new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("jf") - .withPrimaryIpv6Prefix("lqhxkasmcolmu") - .withSecondaryIpv4Prefix("yvaosdkluwz") - .withSecondaryIpv6Prefix("ygz") - .withPeerAsn(6409376053625835562L) - .withVlanId(1958871772); - model = BinaryData.fromObject(model) - .toObject(NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.class); - Assertions.assertEquals("jf", model.primaryIpv4Prefix()); - Assertions.assertEquals("lqhxkasmcolmu", model.primaryIpv6Prefix()); - Assertions.assertEquals("yvaosdkluwz", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ygz", model.secondaryIpv6Prefix()); - Assertions.assertEquals(6409376053625835562L, model.peerAsn()); - Assertions.assertEquals(1958871772, model.vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java index 0c62cb0f6cb8..dea23358c6d3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java @@ -1,20 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectProperties; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,33 +29,51 @@ public final class NetworkToNetworkInterconnectPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectProperties model = BinaryData.fromString( - "{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1239120549,\"interfaces\":[\"qna\"]},\"optionBLayer3Configuration\":{\"peerASN\":5874584824497919701,\"vlanId\":656596398,\"fabricASN\":1053496185156483112,\"primaryIpv4Prefix\":\"opbtsixhgv\",\"primaryIpv6Prefix\":\"xmndztgsqjayqmar\",\"secondaryIpv4Prefix\":\"eibpgbrhbjdqkn\",\"secondaryIpv6Prefix\":\"nmotpuwnnoh\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":14114597,\"multiplier\":735481406},\"ipv4Routes\":[{\"prefix\":\"ypwyiulayno\",\"nextHop\":[\"gkfh\",\"xttpfs\",\"wgsghqucumldd\",\"uqmllfeothxu\"]},{\"prefix\":\"rigrjdljlkq\",\"nextHop\":[\"krbzkuas\",\"axklpruulh\",\"l\",\"oizwxvs\"]},{\"prefix\":\"ksgfyyskyekg\",\"nextHop\":[\"xczvfcckwrtwle\"]},{\"prefix\":\"yveszr\",\"nextHop\":[\"hpdhwynctaczcnjf\",\"bbfnvjxitzovnkr\",\"iklsmni\",\"qlcoqksyiibhyx\"]}],\"ipv6Routes\":[{\"prefix\":\"bu\",\"nextHop\":[\"vqdorbccqcd\",\"thojvlirknucos\",\"wrdtnagzlgpy\"]},{\"prefix\":\"ixihzqj\",\"nextHop\":[\"smuydqfttk\",\"cybdueurgm\",\"dcpks\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"jermhzic\",\"importIpv6RoutePolicyId\":\"fdjhyaaknyukibxi\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"phzwxqte\",\"exportIpv6RoutePolicyId\":\"iilhvtozyagj\"},\"egressAclId\":\"xkbylhyyxgffklv\",\"ingressAclId\":\"rwtrdgscnvqeonsg\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"}") + "{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1694267362,\"interfaces\":[\"sytciksw\",\"camwuynfxkcgs\",\"cm\",\"ha\"]},\"optionBLayer3Configuration\":{\"peerASN\":2437879952071226726,\"vlanId\":1148187798,\"fabricASN\":834293234995642747,\"peLoopbackIpAddress\":[\"ljqkqwsyjtvjkowg\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":997096758},{\"maximumRoutes\":198848158},{\"maximumRoutes\":2068751731},{\"maximumRoutes\":76076748}],\"primaryIpv4Prefix\":\"iidlbovwbclpr\",\"primaryIpv6Prefix\":\"gani\",\"secondaryIpv4Prefix\":\"jcn\",\"secondaryIpv6Prefix\":\"ekyjulskwwnq\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1366815246,\"multiplier\":1484459751},\"ipv4Routes\":[{\"prefix\":\"ebav\",\"nextHop\":[\"vxwve\",\"enlrjcsmwevgu\",\"flnxelrjkfzcdet\",\"wwezhyfkdilb\"]},{\"prefix\":\"qlqac\",\"nextHop\":[\"qb\",\"rtybcel\"]},{\"prefix\":\"jnxodnjyhzfax\",\"nextHop\":[\"dvuelumodpegqxso\"]},{\"prefix\":\"chazrqoxz\",\"nextHop\":[\"lbeqvh\",\"kbmpw\"]}],\"ipv6Routes\":[{\"prefix\":\"ajggfzgaefhawkmi\",\"nextHop\":[\"y\",\"wi\",\"rnicupdyttqmi\"]},{\"prefix\":\"vj\",\"nextHop\":[\"osebmhht\"]},{\"prefix\":\"qmtxynoflqobf\",\"nextHop\":[\"ngxebihexhnk\",\"ng\",\"qcdol\",\"pgup\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":898745560,\"multiplier\":204269631},\"ipv4Routes\":[{\"prefix\":\"ncuyjeykcnhppl\",\"nextHop\":[\"cfzxjziu\"]},{\"prefix\":\"crln\",\"nextHop\":[\"nuwkk\",\"zzetlvhdy\",\"zlvwyw\"]},{\"prefix\":\"v\",\"nextHop\":[\"gqp\",\"w\",\"zpddarcbcdwhs\"]},{\"prefix\":\"xeba\",\"nextHop\":[\"dknmstb\",\"oprwkampyh\"]}],\"ipv6Routes\":[{\"prefix\":\"ldzniudrcycm\",\"nextHop\":[\"uzymhlhihqknlv\",\"mnbzkopai\",\"ldcpudkhquxsyj\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"gvedrobujnjg\",\"importIpv6RoutePolicyId\":\"uxmqxigidul\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gcps\",\"exportIpv6RoutePolicyId\":\"rhnytsl\"},\"egressAclId\":\"az\",\"ingressAclId\":\"znghxhk\",\"microBfdState\":\"Enabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"k\",\"nextHop\":[\"nrvzwpffxsfyb\",\"tmveho\",\"flyuvbgtz\"]},{\"prefix\":\"zqweuyd\",\"nextHop\":[\"nairvhpqsv\",\"zeogeatr\",\"nqnvnc\"]},{\"prefix\":\"rfcs\",\"nextHop\":[\"jnkoiz\",\"zsqbibaaugicovj\"]}],\"ipv6Routes\":[{\"prefix\":\"wr\",\"nextHop\":[\"xyvu\",\"dnxczbass\"]},{\"prefix\":\"fyyl\",\"nextHop\":[\"peygkbzb\",\"o\",\"sybxhqvov\",\"pmhttuvsqjsrvjnq\"]}]},\"lastOperation\":{\"details\":\"gxqbfkce\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"}") .toObject(NetworkToNetworkInterconnectProperties.class); Assertions.assertEquals(NniType.CE, model.nniType()); Assertions.assertEquals(IsManagementType.TRUE, model.isManagementType()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1239120549, model.layer2Configuration().mtu()); - Assertions.assertEquals("qna", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("opbtsixhgv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("xmndztgsqjayqmar", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("eibpgbrhbjdqkn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("nmotpuwnnoh", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5874584824497919701L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(656596398, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(14114597, + Assertions.assertEquals(1694267362, model.layer2Configuration().mtu()); + Assertions.assertEquals("sytciksw", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("iidlbovwbclpr", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("gani", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("jcn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("ekyjulskwwnq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2437879952071226726L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1148187798, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("ljqkqwsyjtvjkowg", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(997096758, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1366815246, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(735481406, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ypwyiulayno", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gkfh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("bu", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("vqdorbccqcd", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jermhzic", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("fdjhyaaknyukibxi", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("phzwxqte", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("iilhvtozyagj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xkbylhyyxgffklv", model.egressAclId()); - Assertions.assertEquals("rwtrdgscnvqeonsg", model.ingressAclId()); + Assertions.assertEquals(1484459751, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ebav", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vxwve", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ajggfzgaefhawkmi", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("y", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(898745560, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(204269631, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ncuyjeykcnhppl", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("cfzxjziu", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ldzniudrcycm", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("uzymhlhihqknlv", + model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gvedrobujnjg", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("uxmqxigidul", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("gcps", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rhnytsl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("az", model.egressAclId()); + Assertions.assertEquals("znghxhk", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + Assertions.assertEquals("k", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nrvzwpffxsfyb", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wr", model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xyvu", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test @@ -58,62 +82,109 @@ public void testSerialize() throws Exception { .withNniType(NniType.CE) .withIsManagementType(IsManagementType.TRUE) .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withMtu(1239120549).withInterfaces(Arrays.asList("qna"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("opbtsixhgv") - .withPrimaryIpv6Prefix("xmndztgsqjayqmar") - .withSecondaryIpv4Prefix("eibpgbrhbjdqkn") - .withSecondaryIpv6Prefix("nmotpuwnnoh") - .withPeerAsn(5874584824497919701L) - .withVlanId(656596398)) + .withLayer2Configuration(new Layer2Configuration().withMtu(1694267362) + .withInterfaces(Arrays.asList("sytciksw", "camwuynfxkcgs", "cm", "ha"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("iidlbovwbclpr") + .withPrimaryIpv6Prefix("gani") + .withSecondaryIpv4Prefix("jcn") + .withSecondaryIpv6Prefix("ekyjulskwwnq") + .withPeerAsn(2437879952071226726L) + .withVlanId(1148187798) + .withPeLoopbackIpAddress(Arrays.asList("ljqkqwsyjtvjkowg")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(997096758), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(198848158), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(2068751731), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(76076748)))) .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(14114597).withMultiplier(735481406)) + new BfdConfiguration().withIntervalInMilliSeconds(1366815246).withMultiplier(1484459751)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ypwyiulayno") - .withNextHop(Arrays.asList("gkfh", "xttpfs", "wgsghqucumldd", "uqmllfeothxu")), - new StaticRouteProperties().withPrefix("rigrjdljlkq") - .withNextHop(Arrays.asList("krbzkuas", "axklpruulh", "l", "oizwxvs")), - new StaticRouteProperties().withPrefix("ksgfyyskyekg").withNextHop(Arrays.asList("xczvfcckwrtwle")), - new StaticRouteProperties().withPrefix("yveszr") - .withNextHop( - Arrays.asList("hpdhwynctaczcnjf", "bbfnvjxitzovnkr", "iklsmni", "qlcoqksyiibhyx")))) + new StaticRouteProperties().withPrefix("ebav") + .withNextHop(Arrays.asList("vxwve", "enlrjcsmwevgu", "flnxelrjkfzcdet", "wwezhyfkdilb")), + new StaticRouteProperties().withPrefix("qlqac").withNextHop(Arrays.asList("qb", "rtybcel")), + new StaticRouteProperties().withPrefix("jnxodnjyhzfax") + .withNextHop(Arrays.asList("dvuelumodpegqxso")), + new StaticRouteProperties().withPrefix("chazrqoxz").withNextHop(Arrays.asList("lbeqvh", "kbmpw")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("bu") - .withNextHop(Arrays.asList("vqdorbccqcd", "thojvlirknucos", "wrdtnagzlgpy")), - new StaticRouteProperties().withPrefix("ixihzqj") - .withNextHop(Arrays.asList("smuydqfttk", "cybdueurgm", "dcpks"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("jermhzic") - .withImportIpv6RoutePolicyId("fdjhyaaknyukibxi")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("phzwxqte") - .withExportIpv6RoutePolicyId("iilhvtozyagj")) - .withEgressAclId("xkbylhyyxgffklv") - .withIngressAclId("rwtrdgscnvqeonsg"); + new StaticRouteProperties().withPrefix("ajggfzgaefhawkmi") + .withNextHop(Arrays.asList("y", "wi", "rnicupdyttqmi")), + new StaticRouteProperties().withPrefix("vj").withNextHop(Arrays.asList("osebmhht")), + new StaticRouteProperties().withPrefix("qmtxynoflqobf") + .withNextHop(Arrays.asList("ngxebihexhnk", "ng", "qcdol", "pgup"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(898745560).withMultiplier(204269631)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("ncuyjeykcnhppl").withNextHop(Arrays.asList("cfzxjziu")), + new StaticRouteProperties().withPrefix("crln") + .withNextHop(Arrays.asList("nuwkk", "zzetlvhdy", "zlvwyw")), + new StaticRouteProperties().withPrefix("v").withNextHop(Arrays.asList("gqp", "w", "zpddarcbcdwhs")), + new StaticRouteProperties().withPrefix("xeba").withNextHop(Arrays.asList("dknmstb", "oprwkampyh")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("ldzniudrcycm") + .withNextHop(Arrays.asList("uzymhlhihqknlv", "mnbzkopai", "ldcpudkhquxsyj"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("gvedrobujnjg") + .withImportIpv6RoutePolicyId("uxmqxigidul")) + .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("gcps") + .withExportIpv6RoutePolicyId("rhnytsl")) + .withEgressAclId("az") + .withIngressAclId("znghxhk") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("k") + .withNextHop(Arrays.asList("nrvzwpffxsfyb", "tmveho", "flyuvbgtz")), + new StaticRouteProperties().withPrefix("zqweuyd") + .withNextHop(Arrays.asList("nairvhpqsv", "zeogeatr", "nqnvnc")), + new StaticRouteProperties().withPrefix("rfcs") + .withNextHop(Arrays.asList("jnkoiz", "zsqbibaaugicovj")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("wr").withNextHop(Arrays.asList("xyvu", "dnxczbass")), + new StaticRouteProperties().withPrefix("fyyl") + .withNextHop(Arrays.asList("peygkbzb", "o", "sybxhqvov", "pmhttuvsqjsrvjnq"))))); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectProperties.class); Assertions.assertEquals(NniType.CE, model.nniType()); Assertions.assertEquals(IsManagementType.TRUE, model.isManagementType()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1239120549, model.layer2Configuration().mtu()); - Assertions.assertEquals("qna", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("opbtsixhgv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("xmndztgsqjayqmar", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("eibpgbrhbjdqkn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("nmotpuwnnoh", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5874584824497919701L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(656596398, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(14114597, + Assertions.assertEquals(1694267362, model.layer2Configuration().mtu()); + Assertions.assertEquals("sytciksw", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("iidlbovwbclpr", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("gani", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("jcn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("ekyjulskwwnq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2437879952071226726L, model.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1148187798, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("ljqkqwsyjtvjkowg", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(997096758, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1366815246, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(735481406, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ypwyiulayno", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gkfh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("bu", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("vqdorbccqcd", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jermhzic", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("fdjhyaaknyukibxi", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("phzwxqte", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("iilhvtozyagj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xkbylhyyxgffklv", model.egressAclId()); - Assertions.assertEquals("rwtrdgscnvqeonsg", model.ingressAclId()); + Assertions.assertEquals(1484459751, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ebav", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vxwve", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ajggfzgaefhawkmi", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("y", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(898745560, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(204269631, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ncuyjeykcnhppl", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("cfzxjziu", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ldzniudrcycm", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("uzymhlhihqknlv", + model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gvedrobujnjg", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("uxmqxigidul", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("gcps", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rhnytsl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("az", model.egressAclId()); + Assertions.assertEquals("znghxhk", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + Assertions.assertEquals("k", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("nrvzwpffxsfyb", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wr", model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xyvu", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java index 9ed4337ba334..a679a56f85cd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java @@ -1,25 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -32,76 +38,114 @@ public final class NetworkToNetworkInterconnectsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1256241884,\"interfaces\":[\"npftkgm\",\"mvxbiubzgh\"]},\"optionBLayer3Configuration\":{\"peerASN\":5097067213361369198,\"vlanId\":117467872,\"fabricASN\":5506702297759334648,\"primaryIpv4Prefix\":\"usnaqsvruuh\",\"primaryIpv6Prefix\":\"cppmmwhjerlurgi\",\"secondaryIpv4Prefix\":\"nbxlep\",\"secondaryIpv6Prefix\":\"c\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":504409694,\"multiplier\":1654510108},\"ipv4Routes\":[{\"prefix\":\"uv\",\"nextHop\":[\"oiihrfcowlas\",\"wifywxjjylaq\",\"xevfdarvj\"]},{\"prefix\":\"wgkynxlwrjgot\",\"nextHop\":[\"mcktkal\",\"piybfnkylzri\",\"nqlwogq\"]}],\"ipv6Routes\":[{\"prefix\":\"uaiuvemqcb\",\"nextHop\":[\"ivexiathm\",\"ryywyfcenkbfxqc\",\"pggeciradmx\"]},{\"prefix\":\"kbutb\",\"nextHop\":[\"cxzayvcse\",\"dhrodyiit\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"djtgo\",\"importIpv6RoutePolicyId\":\"ybseckgaxm\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zj\",\"exportIpv6RoutePolicyId\":\"tfstdwqdvzc\"},\"egressAclId\":\"kvw\",\"ingressAclId\":\"tkreisojhuswm\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"wav\",\"name\":\"mqpaalwidt\",\"type\":\"bwedjrikzppgij\"}"; + = "{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1751722977,\"interfaces\":[\"pfaqxpqrkeyh\",\"uaez\",\"brvtaulh\"]},\"optionBLayer3Configuration\":{\"peerASN\":7959993218692272691,\"vlanId\":47784374,\"fabricASN\":8659408762014035996,\"peLoopbackIpAddress\":[\"cndwoyqvcyqjj\",\"hijbfiyuho\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":510444642}],\"primaryIpv4Prefix\":\"irhg\",\"primaryIpv6Prefix\":\"phyacdhjm\",\"secondaryIpv4Prefix\":\"vgkx\",\"secondaryIpv6Prefix\":\"hljtkuyvytfuq\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1629493159,\"multiplier\":1636928380},\"ipv4Routes\":[{\"prefix\":\"k\",\"nextHop\":[\"i\",\"kf\"]},{\"prefix\":\"zvsc\",\"nextHop\":[\"bklscokafaqqipv\"]},{\"prefix\":\"vdzssssncghgidq\",\"nextHop\":[\"txodbxzhadmwj\"]}],\"ipv6Routes\":[{\"prefix\":\"otcyyupaqd\",\"nextHop\":[\"dhnzkmjoybyog\",\"jrssnrykkhxawoh\",\"jewxphnlweyzvri\"]},{\"prefix\":\"cve\",\"nextHop\":[\"rltlhcjgjuopvkr\",\"spksfxdmbxfyxw\",\"iqvhfyv\",\"xgoxsveiu\"]},{\"prefix\":\"uxwnojvcrgqmbn\",\"nextHop\":[\"ygttdcfj\",\"lpsycvcksz\"]},{\"prefix\":\"ngguucp\",\"nextHop\":[\"sxnujwffthbzii\",\"o\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":31842568,\"multiplier\":430305650},\"ipv4Routes\":[{\"prefix\":\"bdevjrbgcdx\",\"nextHop\":[\"steeksb\",\"s\",\"v\",\"voi\"]},{\"prefix\":\"vvu\",\"nextHop\":[\"ljmzpyukrwvvhcgt\",\"tnqdcgobkcebzr\"]},{\"prefix\":\"pu\",\"nextHop\":[\"tjsk\",\"kwtnqqiqckm\"]},{\"prefix\":\"xldqtmandejnemrf\",\"nextHop\":[\"hcdpwlezbfgul\"]}],\"ipv6Routes\":[{\"prefix\":\"cijyxcmqcggksror\",\"nextHop\":[\"jfharphl\",\"lftraylxzdujpuh\"]},{\"prefix\":\"aogfwbkxdhavegys\",\"nextHop\":[\"mlbzixpdat\",\"ndvwwejvq\"]},{\"prefix\":\"wyrioqwmhcpuj\",\"nextHop\":[\"ntxregbssqthcywy\",\"qxprsocfxlrzj\",\"ffl\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"u\",\"importIpv6RoutePolicyId\":\"fau\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zekygnepjyuxqd\",\"exportIpv6RoutePolicyId\":\"hiyxjqr\"},\"egressAclId\":\"pz\",\"ingressAclId\":\"achpfzsfutaapbrw\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"hsorca\",\"nextHop\":[\"fhyoigzwedftera\"]},{\"prefix\":\"vpkgawrmuji\",\"nextHop\":[\"mhepfjdiwzgwm\",\"muchvqwhscv\"]},{\"prefix\":\"qdxgelnjgftqkg\",\"nextHop\":[\"goullxpaylk\",\"astbkskkzi\"]},{\"prefix\":\"bmwyod\",\"nextHop\":[\"plgdxdtx\",\"rdb\",\"wqt\",\"pf\"]}],\"ipv6Routes\":[{\"prefix\":\"fvhbbnoevkkrlkdo\",\"nextHop\":[\"qscmdsjgo\",\"shlgu\",\"peqlhhmbyfacexp\"]},{\"prefix\":\"pqykicesqpvmoxil\",\"nextHop\":[\"kqiqsriubem\",\"muygmrenrbng\"]},{\"prefix\":\"afmophtky\",\"nextHop\":[\"gayngmowvcnvfgqx\",\"hysuapdns\",\"roqxrvycjdni\"]}]},\"lastOperation\":{\"details\":\"gyxmpmsacbamtoqs\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"EnabledDegraded\"},\"id\":\"gkggzmylqhqe\",\"name\":\"sxds\",\"type\":\"ilefiottdawgka\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkToNetworkInterconnect response = manager.networkToNetworkInterconnects() - .define("dcabnnxhcxcts") - .withExistingNetworkFabric("zqnbs", "ujcmtc") - .withUseOptionB(BooleanEnumProperty.FALSE) + .define("tlb") + .withExistingNetworkFabric("wdosfgbvsoz", "fnpwxcjci") + .withUseOptionB(BooleanEnumProperty.TRUE) .withNniType(NniType.CE) .withIsManagementType(IsManagementType.FALSE) - .withLayer2Configuration(new Layer2Configuration().withMtu(350719333) - .withInterfaces(Arrays.asList("xaknwkjzvqpsym", "upyjtrxxzwds", "qhye", "nakdmtpjksdlulyt"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("vukvupuplug") - .withPrimaryIpv6Prefix("ynv") - .withSecondaryIpv4Prefix("vctqda") - .withSecondaryIpv6Prefix("dsfpzpjbsilbnr") - .withPeerAsn(5457969906808324083L) - .withVlanId(386929467)) + .withLayer2Configuration( + new Layer2Configuration().withMtu(123492069).withInterfaces(Arrays.asList("vhhedc"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("bxwncggamxb") + .withPrimaryIpv6Prefix("izydaiolnkkg") + .withSecondaryIpv4Prefix("ex") + .withSecondaryIpv6Prefix("hb") + .withPeerAsn(3341701194567785379L) + .withVlanId(1863535748) + .withPeLoopbackIpAddress(Arrays.asList("casghbdvsorvhby")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1771447557), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1924195310)))) .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(248672969).withMultiplier(276846830)) + new BfdConfiguration().withIntervalInMilliSeconds(829246495).withMultiplier(1886731469)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("rgfb") - .withNextHop(Arrays.asList("szwkbcstzuwbgae", "maxdwxrwq")), - new StaticRouteProperties().withPrefix("bvwsd").withNextHop(Arrays.asList("kxyrlkgjhomywl")), - new StaticRouteProperties().withPrefix("pghhuluqyfvgpq") - .withNextHop(Arrays.asList("iqmbriskmbuihtq", "vyqmmczuguvlieeg")), - new StaticRouteProperties().withPrefix("nqwhfjoxse") - .withNextHop(Arrays.asList("scgqcr", "aucftotedhjxdl")))) + new StaticRouteProperties().withPrefix("pqjfoujeiagny").withNextHop(Arrays.asList("fjssayrwyf")), + new StaticRouteProperties().withPrefix("utezxrpxdhzwdyva") + .withNextHop(Arrays.asList("v", "hwexwho", "cinpmvcvnmgql")), + new StaticRouteProperties().withPrefix("hglympelazv") + .withNextHop(Arrays.asList("hiayro", "xeezlqw", "glytwzttkhyrwd", "npuoaorfpizybpj")), + new StaticRouteProperties().withPrefix("pqatkzghwcywrb").withNextHop(Arrays.asList("wlskkffwff")))) + .withIpv6Routes( + Arrays.asList(new StaticRouteProperties().withPrefix("zb").withNextHop(Arrays.asList("sqyjsw"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1002398908).withMultiplier(236779377)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("wntghjmmjmmj").withNextHop(Arrays.asList("hyf", "tsemnid")), + new StaticRouteProperties().withPrefix("aykvlrsbrn").withNextHop(Arrays.asList("c")), + new StaticRouteProperties().withPrefix("oqpim") + .withNextHop(Arrays.asList("hiskwaffsjqnj", "cybugojzcarg", "xmawlvaaga")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("f").withNextHop(Arrays.asList("jqvjyqmpmsknaxrh"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("qufudpypboq") - .withImportIpv6RoutePolicyId("fxfpwmaj")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("ijfdjjrvsvhmsmri") - .withExportIpv6RoutePolicyId("dnbwlbqntdderrx")) - .withEgressAclId("wuzpsvcm") - .withIngressAclId("fstyyysq") + new StaticRouteProperties().withPrefix("yjjwggpcdu").withNextHop(Arrays.asList("ddo", "pcs")), + new StaticRouteProperties().withPrefix("we").withNextHop(Arrays.asList("dzmmcgqifhy")), + new StaticRouteProperties().withPrefix("zugwkqnmh").withNextHop(Arrays.asList("ll"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("hthxcrweeqkdmpfm") + .withImportIpv6RoutePolicyId("celsnjf")) + .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("dcjtveibnt") + .withExportIpv6RoutePolicyId("kmgwxys")) + .withEgressAclId("sofdhrif") + .withIngressAclId("strms") + .withMicroBfdState(MicroBfdState.DISABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("keuplorn") + .withNextHop(Arrays.asList("ssmaaxz", "dlnv", "pisc", "zyhtbjyycacoelvo")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("mxqalqqrymjwwox") + .withNextHop(Arrays.asList("efellhdsgo", "dubwmalthc", "vuvwdp", "l"))))) .create(); - Assertions.assertEquals(NniType.CE, response.nniType()); + Assertions.assertEquals(NniType.NPB, response.nniType()); Assertions.assertEquals(IsManagementType.TRUE, response.isManagementType()); Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(1256241884, response.layer2Configuration().mtu()); - Assertions.assertEquals("npftkgm", response.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("usnaqsvruuh", response.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("cppmmwhjerlurgi", response.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("nbxlep", response.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("c", response.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5097067213361369198L, response.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(117467872, response.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(504409694, + Assertions.assertEquals(1751722977, response.layer2Configuration().mtu()); + Assertions.assertEquals("pfaqxpqrkeyh", response.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("irhg", response.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("phyacdhjm", response.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("vgkx", response.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("hljtkuyvytfuq", response.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(7959993218692272691L, response.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(47784374, response.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("cndwoyqvcyqjj", response.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(510444642, response.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1629493159, response.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1654510108, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("uv", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oiihrfcowlas", - response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uaiuvemqcb", response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ivexiathm", + Assertions.assertEquals(1636928380, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("k", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("i", response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("otcyyupaqd", response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dhnzkmjoybyog", response.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("djtgo", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ybseckgaxm", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zj", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tfstdwqdvzc", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kvw", response.egressAclId()); - Assertions.assertEquals("tkreisojhuswm", response.ingressAclId()); + Assertions.assertEquals(31842568, + response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(430305650, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("bdevjrbgcdx", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("steeksb", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("cijyxcmqcggksror", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jfharphl", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("u", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("fau", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("zekygnepjyuxqd", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hiyxjqr", response.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("pz", response.egressAclId()); + Assertions.assertEquals("achpfzsfutaapbrw", response.ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, response.microBfdState()); + Assertions.assertEquals("hsorca", response.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("fhyoigzwedftera", + response.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fvhbbnoevkkrlkdo", + response.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qscmdsjgo", + response.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java index 0cd063c8c8bd..cfe06fae4536 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import java.nio.charset.StandardCharsets; @@ -24,43 +26,65 @@ public final class NetworkToNetworkInterconnectsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":351886188,\"interfaces\":[\"nofkwhgyzwf\",\"fdbvooelmikdsqq\"]},\"optionBLayer3Configuration\":{\"peerASN\":5964055036515197618,\"vlanId\":1150172749,\"fabricASN\":6749661156074905652,\"primaryIpv4Prefix\":\"qmlmwjwsmnwb\",\"primaryIpv6Prefix\":\"cvemmriyz\",\"secondaryIpv4Prefix\":\"quesxplcsinbulo\",\"secondaryIpv6Prefix\":\"xhcynnmv\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1962708584,\"multiplier\":2038824069},\"ipv4Routes\":[{\"prefix\":\"idsjqc\",\"nextHop\":[\"z\"]},{\"prefix\":\"rtfdlgp\",\"nextHop\":[\"yjl\",\"kalbcyuwahwzagv\",\"idzcephn\",\"nuhgy\"]},{\"prefix\":\"zkhi\",\"nextHop\":[\"rwpekiprjb\",\"ertj\"]},{\"prefix\":\"airpwj\",\"nextHop\":[\"giwsywp\",\"jtvqopugrsergiuz\",\"qefzypult\",\"mcbcen\"]}],\"ipv6Routes\":[{\"prefix\":\"huepikwcxoasgukq\",\"nextHop\":[\"iy\",\"bfvkiwmqnwm\"]},{\"prefix\":\"tcctirgyu\",\"nextHop\":[\"x\"]},{\"prefix\":\"zhdmcg\",\"nextHop\":[\"brybfarkhko\",\"c\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"wmoyhd\",\"importIpv6RoutePolicyId\":\"jhqnzc\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pxoy\",\"exportIpv6RoutePolicyId\":\"mjn\"},\"egressAclId\":\"wu\",\"ingressAclId\":\"yxfknj\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"avntvklkw\",\"name\":\"isn\",\"type\":\"paymk\"}"; + = "{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":497534781,\"interfaces\":[\"kzhxadmauanxz\",\"qtmhaerhxdshk\",\"rkhjjbw\"]},\"optionBLayer3Configuration\":{\"peerASN\":1367050823225865981,\"vlanId\":1314876476,\"fabricASN\":472471701726957947,\"peLoopbackIpAddress\":[\"oguypmselwszqve\",\"kddxljjzdbzk\",\"wgwvkujshc\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":1181044241},{\"maximumRoutes\":666118004},{\"maximumRoutes\":1701870517},{\"maximumRoutes\":969744431}],\"primaryIpv4Prefix\":\"dvyypjkjirvjo\",\"primaryIpv6Prefix\":\"alvjlhnimuaeoky\",\"secondaryIpv4Prefix\":\"wqu\",\"secondaryIpv6Prefix\":\"lzofuzthszjyanh\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":90830154,\"multiplier\":1402806144},\"ipv4Routes\":[{\"prefix\":\"opdpufqs\",\"nextHop\":[\"qzxjbxolmehquqi\",\"gibog\",\"ojupenoupc\",\"lxcwrszwa\"]}],\"ipv6Routes\":[{\"prefix\":\"isdkcuhqtskyb\",\"nextHop\":[\"eeeucvvnbymrgel\",\"oduexx\",\"d\",\"fr\"]},{\"prefix\":\"envkqtvtq\",\"nextHop\":[\"qzvq\",\"nozwphkaqr\",\"c\",\"cbrtltpohbz\"]},{\"prefix\":\"bj\",\"nextHop\":[\"amit\",\"v\",\"vpdvdbyelr\",\"eunkwypum\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1638277433,\"multiplier\":328771490},\"ipv4Routes\":[{\"prefix\":\"fdmlylzdb\",\"nextHop\":[\"jlwfthfrxwiq\"]},{\"prefix\":\"sfgkwrcb\",\"nextHop\":[\"yprabp\",\"wecz\",\"izabjb\",\"y\"]},{\"prefix\":\"ddijfkkt\",\"nextHop\":[\"iseepl\"]}],\"ipv6Routes\":[{\"prefix\":\"rxydsompnce\",\"nextHop\":[\"kjtm\",\"aczkjkfakgrwt\",\"esfanmjmpceuwmfd\"]},{\"prefix\":\"lvpyhhgq\",\"nextHop\":[\"zj\",\"ijzhv\"]},{\"prefix\":\"jqjekoln\",\"nextHop\":[\"pykjpakaouyaan\",\"xaicheycak\",\"on\",\"yd\"]},{\"prefix\":\"dwyhadz\",\"nextHop\":[\"a\",\"nhwuqewcnhsksf\",\"kxfkeeqofwbe\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"erwss\",\"importIpv6RoutePolicyId\":\"mrpdjrylfpdudx\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"euriehxbanfsqfh\",\"exportIpv6RoutePolicyId\":\"qssngeviy\"},\"egressAclId\":\"gohrhjspsyhda\",\"ingressAclId\":\"npvg\",\"microBfdState\":\"Enabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"etzydtgpvn\",\"nextHop\":[\"fpoybjkuokaj\",\"yrhuc\",\"fkaqlpuzpte\",\"onbqaktao\"]},{\"prefix\":\"mgefobcqvzm\",\"nextHop\":[\"vsynsccmos\",\"vojgolmkklzab\",\"uvnclntaoidjhoy\",\"gtyvrnfikireet\"]},{\"prefix\":\"jfizafd\",\"nextHop\":[\"h\",\"uvndgrolgxajcsi\",\"fwlyeiaj\",\"pjmqteirrjj\"]},{\"prefix\":\"vrzfppopwxxdgzhn\",\"nextHop\":[\"buwauytq\",\"kgaxloafwsuaxqro\",\"w\"]}],\"ipv6Routes\":[{\"prefix\":\"pnd\",\"nextHop\":[\"lxjrhctbrv\"]}]},\"lastOperation\":{\"details\":\"amoyvqfjpkezq\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\"},\"id\":\"epcacgvlnpj\",\"name\":\"byry\",\"type\":\"ktuvdes\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkToNetworkInterconnect response = manager.networkToNetworkInterconnects() - .getWithResponse("ampqepef", "mubplzoepeqlhb", "y", com.azure.core.util.Context.NONE) + .getWithResponse("esvcs", "yimyg", "wduzp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(NniType.CE, response.nniType()); - Assertions.assertEquals(IsManagementType.TRUE, response.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(351886188, response.layer2Configuration().mtu()); - Assertions.assertEquals("nofkwhgyzwf", response.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("qmlmwjwsmnwb", response.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("cvemmriyz", response.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("quesxplcsinbulo", response.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("xhcynnmv", response.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5964055036515197618L, response.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1150172749, response.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1962708584, + Assertions.assertEquals(NniType.NPB, response.nniType()); + Assertions.assertEquals(IsManagementType.FALSE, response.isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, response.useOptionB()); + Assertions.assertEquals(497534781, response.layer2Configuration().mtu()); + Assertions.assertEquals("kzhxadmauanxz", response.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("dvyypjkjirvjo", response.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("alvjlhnimuaeoky", response.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("wqu", response.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("lzofuzthszjyanh", response.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(1367050823225865981L, response.optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1314876476, response.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("oguypmselwszqve", response.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1181044241, + response.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(90830154, response.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2038824069, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("idsjqc", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("z", response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("huepikwcxoasgukq", - response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iy", response.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("wmoyhd", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("jhqnzc", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pxoy", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("mjn", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wu", response.egressAclId()); - Assertions.assertEquals("yxfknj", response.ingressAclId()); + Assertions.assertEquals(1402806144, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("opdpufqs", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qzxjbxolmehquqi", + response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("isdkcuhqtskyb", response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("eeeucvvnbymrgel", + response.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1638277433, + response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(328771490, response.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("fdmlylzdb", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jlwfthfrxwiq", + response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("rxydsompnce", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kjtm", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("erwss", response.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mrpdjrylfpdudx", response.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("euriehxbanfsqfh", response.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qssngeviy", response.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("gohrhjspsyhda", response.egressAclId()); + Assertions.assertEquals("npvg", response.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, response.microBfdState()); + Assertions.assertEquals("etzydtgpvn", + response.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("fpoybjkuokaj", + response.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("pnd", response.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lxjrhctbrv", + response.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java index b59618d50c30..4b186aae821a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java @@ -1,18 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import java.nio.charset.StandardCharsets; @@ -25,50 +27,79 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricMockTests { @Test public void testListByNetworkFabric() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":856171902,\"interfaces\":[\"xxregykjmpadbz\"]},\"optionBLayer3Configuration\":{\"peerASN\":8569700774121890571,\"vlanId\":1427677061,\"fabricASN\":187712996489181130,\"primaryIpv4Prefix\":\"tyd\",\"primaryIpv6Prefix\":\"grpqua\",\"secondaryIpv4Prefix\":\"gjqqbactffxdb\",\"secondaryIpv6Prefix\":\"ihumw\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1611726934,\"multiplier\":1092461654},\"ipv4Routes\":[{\"prefix\":\"izqqihvb\",\"nextHop\":[\"fq\",\"qdd\",\"ynpgomzmkj\",\"ajlfpsvrljlhe\"]},{\"prefix\":\"cccpxbnwitaf\",\"nextHop\":[\"evpt\",\"itghz\",\"wvkpar\"]},{\"prefix\":\"kplqftqcxqmbs\",\"nextHop\":[\"cykgulellfwrmsux\"]},{\"prefix\":\"qbmqo\",\"nextHop\":[\"xlpkdsnbq\",\"ymsdlraduhgwaxz\",\"rppoy\"]}],\"ipv6Routes\":[{\"prefix\":\"ribeskkopbk\",\"nextHop\":[\"ibmbtmorikcze\",\"qtiqxgwsfrlyvzl\",\"jydg\"]},{\"prefix\":\"doqgrucw\",\"nextHop\":[\"yjudhgwjqegly\",\"nrruwsqp\",\"yxkm\",\"mgexqcilfiulgnn\"]},{\"prefix\":\"xwdpmc\",\"nextHop\":[\"qvvzxgbamqrb\",\"snptmmvdpavcj\",\"byjuwhizcbqj\",\"mhwdtunpc\"]},{\"prefix\":\"kd\",\"nextHop\":[\"fouwkoltjdauuj\",\"ltyhddzeykud\",\"zrimyehplmq\",\"oduk\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"znqqkqxkdglse\",\"importIpv6RoutePolicyId\":\"krbyy\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jg\",\"exportIpv6RoutePolicyId\":\"wgokrllbecannvxo\"},\"egressAclId\":\"dcftptfc\",\"ingressAclId\":\"pmfw\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"id\":\"ihifo\",\"name\":\"ocmgadhmqyufp\",\"type\":\"owweylszrtngiqc\"}]}"; + = "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":1815481604,\"interfaces\":[\"xjsvz\",\"l\",\"eotdscqkxzrfloqz\",\"vem\"]},\"optionBLayer3Configuration\":{\"peerASN\":4703007845031173996,\"vlanId\":1699690495,\"fabricASN\":8548818076168058188,\"peLoopbackIpAddress\":[\"trrhhgwawiz\",\"anvcfxdv\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":1100644461},{\"maximumRoutes\":154530214}],\"primaryIpv4Prefix\":\"txhqqvdhdyyad\",\"primaryIpv6Prefix\":\"nepubsdinfa\",\"secondaryIpv4Prefix\":\"t\",\"secondaryIpv6Prefix\":\"vsdyqyjkmfo\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1464382799,\"multiplier\":1461029317},\"ipv4Routes\":[{\"prefix\":\"xtpbapojknvxantl\",\"nextHop\":[\"piipfgdnqpkvvr\",\"oqyvqdv\"]}],\"ipv6Routes\":[{\"prefix\":\"oduexhskhkqlv\",\"nextHop\":[\"rddqxh\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":195356058,\"multiplier\":1905392711},\"ipv4Routes\":[{\"prefix\":\"qrunqwcrkka\",\"nextHop\":[\"xxyfnipywgjgfbsf\",\"vayge\",\"y\",\"okkiptnwpwskck\"]},{\"prefix\":\"wymfy\",\"nextHop\":[\"gvqioqrebwarljpl\",\"pemxcdreqaqvsp\"]},{\"prefix\":\"yvearwt\",\"nextHop\":[\"bscwbiwvwmcrhy\"]}],\"ipv6Routes\":[{\"prefix\":\"tplmy\",\"nextHop\":[\"hvyj\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rhxgstiawyw\",\"importIpv6RoutePolicyId\":\"qxujxbdyczplmlj\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"xbwsftytpj\",\"exportIpv6RoutePolicyId\":\"fd\"},\"egressAclId\":\"hqlzantahuykxsjy\",\"ingressAclId\":\"sx\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"qnsmp\",\"nextHop\":[\"yjvlzqsyvryoleq\",\"kcorkemobo\",\"xfhtbtuvw\"]},{\"prefix\":\"jycgcieagxikzvng\",\"nextHop\":[\"knrwchysnmyuvfm\",\"cnrapxw\",\"tpxoelfobe\",\"rcfgl\"]}],\"ipv6Routes\":[{\"prefix\":\"cz\",\"nextHop\":[\"tfwkvirmbr\",\"ognqahn\",\"msfybh\"]},{\"prefix\":\"dzvuhw\",\"nextHop\":[\"nazjvyiiezdnez\",\"tqzdbrmyutztt\",\"oymivkk\"]},{\"prefix\":\"zr\",\"nextHop\":[\"egyz\",\"zhcfu\",\"mxezzumklroogf\",\"h\"]}]},\"lastOperation\":{\"details\":\"pxb\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"id\":\"zye\",\"name\":\"woukdhnferdggjih\",\"type\":\"zvoehgwgqg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkToNetworkInterconnects() - .listByNetworkFabric("totktd", "ewwlkry", com.azure.core.util.Context.NONE); + .listByNetworkFabric("arul", "hbqtvyhsxhcrff", com.azure.core.util.Context.NONE); Assertions.assertEquals(NniType.NPB, response.iterator().next().nniType()); - Assertions.assertEquals(IsManagementType.TRUE, response.iterator().next().isManagementType()); + Assertions.assertEquals(IsManagementType.FALSE, response.iterator().next().isManagementType()); Assertions.assertEquals(BooleanEnumProperty.FALSE, response.iterator().next().useOptionB()); - Assertions.assertEquals(856171902, response.iterator().next().layer2Configuration().mtu()); - Assertions.assertEquals("xxregykjmpadbz", response.iterator().next().layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("tyd", response.iterator().next().optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("grpqua", response.iterator().next().optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gjqqbactffxdb", - response.iterator().next().optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("ihumw", response.iterator().next().optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(8569700774121890571L, + Assertions.assertEquals(1815481604, response.iterator().next().layer2Configuration().mtu()); + Assertions.assertEquals("xjsvz", response.iterator().next().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("txhqqvdhdyyad", + response.iterator().next().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("nepubsdinfa", + response.iterator().next().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("t", response.iterator().next().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("vsdyqyjkmfo", + response.iterator().next().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(4703007845031173996L, response.iterator().next().optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1427677061, response.iterator().next().optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1611726934, + Assertions.assertEquals(1699690495, response.iterator().next().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("trrhhgwawiz", + response.iterator().next().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.iterator().next().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1100644461, + response.iterator().next().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1464382799, response.iterator().next().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1092461654, + Assertions.assertEquals(1461029317, response.iterator().next().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("izqqihvb", + Assertions.assertEquals("xtpbapojknvxantl", response.iterator().next().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("fq", + Assertions.assertEquals("piipfgdnqpkvvr", response.iterator().next().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ribeskkopbk", + Assertions.assertEquals("oduexhskhkqlv", response.iterator().next().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ibmbtmorikcze", + Assertions.assertEquals("rddqxh", response.iterator().next().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("znqqkqxkdglse", + Assertions.assertEquals(195356058, + response.iterator().next().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1905392711, + response.iterator().next().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("qrunqwcrkka", + response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xxyfnipywgjgfbsf", + response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("tplmy", + response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hvyj", + response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("rhxgstiawyw", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("krbyy", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jg", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wgokrllbecannvxo", - response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("dcftptfc", response.iterator().next().egressAclId()); - Assertions.assertEquals("pmfw", response.iterator().next().ingressAclId()); + Assertions.assertEquals("qxujxbdyczplmlj", + response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("xbwsftytpj", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("fd", response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("hqlzantahuykxsjy", response.iterator().next().egressAclId()); + Assertions.assertEquals("sx", response.iterator().next().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, response.iterator().next().microBfdState()); + Assertions.assertEquals("qnsmp", + response.iterator().next().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("yjvlzqsyvryoleq", + response.iterator().next().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("cz", + response.iterator().next().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("tfwkvirmbr", + response.iterator().next().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java index 87e7ec701b4d..384b82ba9447 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java @@ -1,120 +1,66 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectsList; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkToNetworkInterconnectsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":129229845,\"interfaces\":[\"tgz\",\"xxlfejlzuql\"]},\"optionBLayer3Configuration\":{\"peerASN\":7855788189819438729,\"vlanId\":1357246745,\"fabricASN\":7344268812658971716,\"primaryIpv4Prefix\":\"mit\",\"primaryIpv6Prefix\":\"qlhchwhrktjle\",\"secondaryIpv4Prefix\":\"ibfiplhxfnsm\",\"secondaryIpv6Prefix\":\"jow\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":96286060,\"multiplier\":715436858},\"ipv4Routes\":[{\"prefix\":\"mhn\",\"nextHop\":[]},{\"prefix\":\"lzbuwodmachbkvn\",\"nextHop\":[]},{\"prefix\":\"pbjrmvgoqplehm\",\"nextHop\":[]},{\"prefix\":\"mkzdllczdprwnhk\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"goxsstci\",\"nextHop\":[]},{\"prefix\":\"rak\",\"nextHop\":[]},{\"prefix\":\"rrynjcwmhly\",\"nextHop\":[]},{\"prefix\":\"gnukxrkemjpe\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rlzaudg\",\"importIpv6RoutePolicyId\":\"f\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"akkuc\",\"exportIpv6RoutePolicyId\":\"wnhczbutou\"},\"egressAclId\":\"jtirjwayhicqq\",\"ingressAclId\":\"v\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"id\":\"zedv\",\"name\":\"iabvnsrgek\",\"type\":\"yqxadyfhbmw\"}],\"nextLink\":\"ojqttbsp\"}") + "{\"value\":[{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":423559092,\"interfaces\":[\"znjqswshe\",\"gcsqosecxlngou\",\"pizpbm\",\"xzspfy\"]},\"optionBLayer3Configuration\":{\"peerASN\":1223806933735819402,\"vlanId\":1731558660,\"fabricASN\":4844358657106659923,\"peLoopbackIpAddress\":[\"gtdumjty\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{},{}],\"primaryIpv4Prefix\":\"n\",\"primaryIpv6Prefix\":\"xozqthkwxfugfziz\",\"secondaryIpv4Prefix\":\"duyjnqzbr\",\"secondaryIpv6Prefix\":\"akmfc\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1115388108,\"multiplier\":1185749240},\"ipv4Routes\":[{\"prefix\":\"bqoitwhmucjiuh\",\"nextHop\":[]},{\"prefix\":\"xy\",\"nextHop\":[]},{\"prefix\":\"ehyklelyqdvpqfbx\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"udusdmtxqlefnohe\",\"nextHop\":[]},{\"prefix\":\"wvfopkyllrey\",\"nextHop\":[]},{\"prefix\":\"nj\",\"nextHop\":[]},{\"prefix\":\"w\",\"nextHop\":[]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":2027496783,\"multiplier\":1238684910},\"ipv4Routes\":[{\"prefix\":\"vcneqswxhqhgk\",\"nextHop\":[]},{\"prefix\":\"tbzvulqevvjncp\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"t\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"mvghcmixmlwkfefb\",\"importIpv6RoutePolicyId\":\"jrtalqeebudf\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ooaezktom\",\"exportIpv6RoutePolicyId\":\"oi\"},\"egressAclId\":\"qwbywaazbaeee\",\"ingressAclId\":\"ztvn\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ow\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"jdkxh\",\"nextHop\":[]},{\"prefix\":\"ewy\",\"nextHop\":[]},{\"prefix\":\"olclzxkrd\",\"nextHop\":[]},{\"prefix\":\"uyytbpkrpkhqetp\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"efno\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"id\":\"yrxowv\",\"name\":\"ufcmuajwblxp\",\"type\":\"tozfrfa\"}],\"nextLink\":\"nnsvrfajynihti\"}") .toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); + Assertions.assertEquals(NniType.CE, model.value().get(0).nniType()); Assertions.assertEquals(IsManagementType.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals(129229845, model.value().get(0).layer2Configuration().mtu()); - Assertions.assertEquals("tgz", model.value().get(0).layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("mit", model.value().get(0).optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("qlhchwhrktjle", model.value().get(0).optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("ibfiplhxfnsm", - model.value().get(0).optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jow", model.value().get(0).optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(7855788189819438729L, model.value().get(0).optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1357246745, model.value().get(0).optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(96286060, + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.value().get(0).useOptionB()); + Assertions.assertEquals(423559092, model.value().get(0).layer2Configuration().mtu()); + Assertions.assertEquals("znjqswshe", model.value().get(0).layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("n", model.value().get(0).optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("xozqthkwxfugfziz", + model.value().get(0).optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("duyjnqzbr", model.value().get(0).optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("akmfc", model.value().get(0).optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(1223806933735819402L, model.value().get(0).optionBLayer3Configuration().peerAsn()); + Assertions.assertEquals(1731558660, model.value().get(0).optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("gtdumjty", + model.value().get(0).optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.value().get(0).optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1115388108, model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(715436858, + Assertions.assertEquals(1185749240, model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("mhn", model.value().get(0).npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("goxsstci", + Assertions.assertEquals("bqoitwhmucjiuh", + model.value().get(0).npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("udusdmtxqlefnohe", model.value().get(0).npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("rlzaudg", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("f", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("akkuc", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wnhczbutou", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("jtirjwayhicqq", model.value().get(0).egressAclId()); - Assertions.assertEquals("v", model.value().get(0).ingressAclId()); - Assertions.assertEquals("ojqttbsp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectsList model = new NetworkToNetworkInterconnectsList() - .withValue(Arrays.asList(new NetworkToNetworkInterconnectInner().withNniType(NniType.NPB) - .withIsManagementType(IsManagementType.TRUE) - .withUseOptionB(BooleanEnumProperty.FALSE) - .withLayer2Configuration( - new Layer2Configuration().withMtu(129229845).withInterfaces(Arrays.asList("tgz", "xxlfejlzuql"))) - .withOptionBLayer3Configuration( - new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("mit") - .withPrimaryIpv6Prefix("qlhchwhrktjle") - .withSecondaryIpv4Prefix("ibfiplhxfnsm") - .withSecondaryIpv6Prefix("jow") - .withPeerAsn(7855788189819438729L) - .withVlanId(1357246745)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(96286060).withMultiplier(715436858)) - .withIpv4Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("mhn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("lzbuwodmachbkvn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("pbjrmvgoqplehm").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("mkzdllczdprwnhk").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("goxsstci").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("rak").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("rrynjcwmhly").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("gnukxrkemjpe").withNextHop(Arrays.asList())))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("rlzaudg") - .withImportIpv6RoutePolicyId("f")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("akkuc") - .withExportIpv6RoutePolicyId("wnhczbutou")) - .withEgressAclId("jtirjwayhicqq") - .withIngressAclId("v"))) - .withNextLink("ojqttbsp"); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); - Assertions.assertEquals(IsManagementType.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals(129229845, model.value().get(0).layer2Configuration().mtu()); - Assertions.assertEquals("tgz", model.value().get(0).layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("mit", model.value().get(0).optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("qlhchwhrktjle", model.value().get(0).optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("ibfiplhxfnsm", - model.value().get(0).optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jow", model.value().get(0).optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(7855788189819438729L, model.value().get(0).optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1357246745, model.value().get(0).optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(96286060, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(715436858, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("mhn", model.value().get(0).npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("goxsstci", - model.value().get(0).npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("rlzaudg", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("f", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("akkuc", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wnhczbutou", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("jtirjwayhicqq", model.value().get(0).egressAclId()); - Assertions.assertEquals("v", model.value().get(0).ingressAclId()); - Assertions.assertEquals("ojqttbsp", model.nextLink()); + Assertions.assertEquals(2027496783, + model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1238684910, + model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("vcneqswxhqhgk", + model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("t", model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("mvghcmixmlwkfefb", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jrtalqeebudf", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ooaezktom", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("oi", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("qwbywaazbaeee", model.value().get(0).egressAclId()); + Assertions.assertEquals("ztvn", model.value().get(0).ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.value().get(0).microBfdState()); + Assertions.assertEquals("ow", + model.value().get(0).conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jdkxh", + model.value().get(0).conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("nnsvrfajynihti", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..e5df0e0f16f5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class NniBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniBmpPatchProperties model + = BinaryData.fromString("{\"configurationState\":\"Disabled\"}").toObject(NniBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniBmpPatchProperties model + = new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(NniBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java new file mode 100644 index 000000000000..08511dd6d06a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import org.junit.jupiter.api.Assertions; + +public final class NniBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniBmpProperties model + = BinaryData.fromString("{\"configurationState\":\"Disabled\"}").toObject(NniBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniBmpProperties model = new NniBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(NniBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java new file mode 100644 index 000000000000..5fb905687a06 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NniStaticRouteConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniStaticRouteConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":994754921,\"multiplier\":1258889554},\"ipv4Routes\":[{\"prefix\":\"yixlv\",\"nextHop\":[\"gulaebxiauqs\",\"ptessjlw\",\"tatpvblskxgxqay\"]},{\"prefix\":\"aslkvcvwpvl\",\"nextHop\":[\"bvyezj\",\"jkqonbw\",\"iieyozvrc\"]}],\"ipv6Routes\":[{\"prefix\":\"ucwnbcgqefgzjv\",\"nextHop\":[\"qcbgoarxtuu\",\"iag\"]}]}") + .toObject(NniStaticRouteConfiguration.class); + Assertions.assertEquals(994754921, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1258889554, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("yixlv", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gulaebxiauqs", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ucwnbcgqefgzjv", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qcbgoarxtuu", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniStaticRouteConfiguration model = new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(994754921).withMultiplier(1258889554)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("yixlv") + .withNextHop(Arrays.asList("gulaebxiauqs", "ptessjlw", "tatpvblskxgxqay")), + new StaticRouteProperties().withPrefix("aslkvcvwpvl") + .withNextHop(Arrays.asList("bvyezj", "jkqonbw", "iieyozvrc")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("ucwnbcgqefgzjv") + .withNextHop(Arrays.asList("qcbgoarxtuu", "iag")))); + model = BinaryData.fromObject(model).toObject(NniStaticRouteConfiguration.class); + Assertions.assertEquals(994754921, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1258889554, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("yixlv", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("gulaebxiauqs", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ucwnbcgqefgzjv", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qcbgoarxtuu", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..7d2252370f43 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NniStaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniStaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":322494378,\"multiplier\":1253508971},\"ipv4Routes\":[{\"prefix\":\"swtdapsmirmnrije\",\"nextHop\":[\"rtwxce\",\"dspthg\",\"fmwtblgm\"]},{\"prefix\":\"okqoikx\",\"nextHop\":[\"fwlnmlkff\",\"nuestbsli\"]},{\"prefix\":\"jdnccote\",\"nextHop\":[\"kjiytehh\",\"tzxqdwby\",\"uqlngncrdor\"]}],\"ipv6Routes\":[{\"prefix\":\"s\",\"nextHop\":[\"pek\"]},{\"prefix\":\"xdbyhq\",\"nextHop\":[\"cvimmwck\",\"zvlfymtrts\",\"xup\"]}]}") + .toObject(NniStaticRoutePatchConfiguration.class); + Assertions.assertEquals(322494378, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1253508971, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("swtdapsmirmnrije", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rtwxce", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("s", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pek", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniStaticRoutePatchConfiguration model = new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(322494378).withMultiplier(1253508971)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("swtdapsmirmnrije") + .withNextHop(Arrays.asList("rtwxce", "dspthg", "fmwtblgm")), + new StaticRoutePatchProperties().withPrefix("okqoikx") + .withNextHop(Arrays.asList("fwlnmlkff", "nuestbsli")), + new StaticRoutePatchProperties().withPrefix("jdnccote") + .withNextHop(Arrays.asList("kjiytehh", "tzxqdwby", "uqlngncrdor")))) + .withIpv6Routes( + Arrays.asList(new StaticRoutePatchProperties().withPrefix("s").withNextHop(Arrays.asList("pek")), + new StaticRoutePatchProperties().withPrefix("xdbyhq") + .withNextHop(Arrays.asList("cvimmwck", "zvlfymtrts", "xup")))); + model = BinaryData.fromObject(model).toObject(NniStaticRoutePatchConfiguration.class); + Assertions.assertEquals(322494378, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1253508971, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("swtdapsmirmnrije", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rtwxce", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("s", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pek", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..185d3fdc3cef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateRequestTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; +import org.junit.jupiter.api.Assertions; + +public final class NniUpdateBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniUpdateBfdAdministrativeStateRequest model + = BinaryData.fromString("{\"routeType\":\"Static\",\"administrativeState\":\"Enabled\"}") + .toObject(NniUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(RouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniUpdateBfdAdministrativeStateRequest model + = new NniUpdateBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.ENABLED); + model = BinaryData.fromObject(model).toObject(NniUpdateBfdAdministrativeStateRequest.class); + Assertions.assertEquals(RouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateResponsePropertiesTests.java new file mode 100644 index 000000000000..a578b16028a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniUpdateBfdAdministrativeStateResponsePropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; +import org.junit.jupiter.api.Assertions; + +public final class NniUpdateBfdAdministrativeStateResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniUpdateBfdAdministrativeStateResponseProperties model + = BinaryData.fromString("{\"routeType\":\"OptionA\",\"administrativeState\":\"RMA\"}") + .toObject(NniUpdateBfdAdministrativeStateResponseProperties.class); + Assertions.assertEquals(RouteType.OPTIONA, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.RMA, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java new file mode 100644 index 000000000000..f892f74de176 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NpbStaticRouteConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NpbStaticRouteConfigurationPatch model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2097273618,\"multiplier\":364038370},\"ipv4Routes\":[{\"prefix\":\"rztir\",\"nextHop\":[\"qxvwk\",\"ocxoerjwbuo\"]},{\"prefix\":\"qflm\",\"nextHop\":[\"rlqxbctatez\",\"o\",\"dbcqq\",\"lsjxcscnito\"]},{\"prefix\":\"mra\",\"nextHop\":[\"jido\",\"nvlt\",\"vmah\",\"uwkup\"]},{\"prefix\":\"bnhi\",\"nextHop\":[\"hyzhrcqdfwbifn\"]}],\"ipv6Routes\":[{\"prefix\":\"sforsimtfcqmmyn\",\"nextHop\":[\"pelpfijtezgxmpe\",\"zamadlerzi\",\"f\"]}]}") + .toObject(NpbStaticRouteConfigurationPatch.class); + Assertions.assertEquals(2097273618, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(364038370, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("rztir", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qxvwk", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("sforsimtfcqmmyn", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pelpfijtezgxmpe", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NpbStaticRouteConfigurationPatch model = new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(2097273618).withMultiplier(364038370)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("rztir").withNextHop(Arrays.asList("qxvwk", "ocxoerjwbuo")), + new StaticRoutePatchProperties().withPrefix("qflm") + .withNextHop(Arrays.asList("rlqxbctatez", "o", "dbcqq", "lsjxcscnito")), + new StaticRoutePatchProperties().withPrefix("mra") + .withNextHop(Arrays.asList("jido", "nvlt", "vmah", "uwkup")), + new StaticRoutePatchProperties().withPrefix("bnhi").withNextHop(Arrays.asList("hyzhrcqdfwbifn")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("sforsimtfcqmmyn") + .withNextHop(Arrays.asList("pelpfijtezgxmpe", "zamadlerzi", "f")))); + model = BinaryData.fromObject(model).toObject(NpbStaticRouteConfigurationPatch.class); + Assertions.assertEquals(2097273618, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(364038370, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("rztir", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qxvwk", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("sforsimtfcqmmyn", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pelpfijtezgxmpe", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java index c58cb7d7ce98..5e2527d4b047 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,34 +15,33 @@ public final class NpbStaticRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NpbStaticRouteConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":703140986,\"multiplier\":468071165},\"ipv4Routes\":[{\"prefix\":\"gbzxmbtplefoioy\",\"nextHop\":[\"oxznvgvd\",\"muuv\"]},{\"prefix\":\"awsxmrszbknimxlp\",\"nextHop\":[\"rxrzutylcur\",\"aqmnbxqaehtd\",\"jmbnvynf\",\"ooeactedc\"]}],\"ipv6Routes\":[{\"prefix\":\"kakddidahzllrqm\",\"nextHop\":[\"pbyxroiduyqy\",\"ffmnoiics\",\"dyhbrjj\"]}]}") + "{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1054708375,\"multiplier\":1734793687},\"ipv4Routes\":[{\"prefix\":\"gqgagenvqbugihc\",\"nextHop\":[\"foizorbloejz\"]},{\"prefix\":\"axz\",\"nextHop\":[\"qwvdepp\"]},{\"prefix\":\"naphifkfrpmpl\",\"nextHop\":[\"p\",\"brmjjn\"]}],\"ipv6Routes\":[{\"prefix\":\"htbttpkimskhnkkh\",\"nextHop\":[\"krsmhrcmely\",\"pgokuthrvybnzbnv\"]}]}") .toObject(NpbStaticRouteConfiguration.class); - Assertions.assertEquals(703140986, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(468071165, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("gbzxmbtplefoioy", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oxznvgvd", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kakddidahzllrqm", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("pbyxroiduyqy", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1054708375, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1734793687, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("gqgagenvqbugihc", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("foizorbloejz", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("htbttpkimskhnkkh", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("krsmhrcmely", model.ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NpbStaticRouteConfiguration model = new NpbStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(703140986).withMultiplier(468071165)) + new BfdConfiguration().withIntervalInMilliSeconds(1054708375).withMultiplier(1734793687)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("gbzxmbtplefoioy") - .withNextHop(Arrays.asList("oxznvgvd", "muuv")), - new StaticRouteProperties().withPrefix("awsxmrszbknimxlp") - .withNextHop(Arrays.asList("rxrzutylcur", "aqmnbxqaehtd", "jmbnvynf", "ooeactedc")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("kakddidahzllrqm") - .withNextHop(Arrays.asList("pbyxroiduyqy", "ffmnoiics", "dyhbrjj")))); + new StaticRouteProperties().withPrefix("gqgagenvqbugihc").withNextHop(Arrays.asList("foizorbloejz")), + new StaticRouteProperties().withPrefix("axz").withNextHop(Arrays.asList("qwvdepp")), + new StaticRouteProperties().withPrefix("naphifkfrpmpl").withNextHop(Arrays.asList("p", "brmjjn")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("htbttpkimskhnkkh") + .withNextHop(Arrays.asList("krsmhrcmely", "pgokuthrvybnzbnv")))); model = BinaryData.fromObject(model).toObject(NpbStaticRouteConfiguration.class); - Assertions.assertEquals(703140986, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(468071165, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("gbzxmbtplefoioy", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oxznvgvd", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kakddidahzllrqm", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("pbyxroiduyqy", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1054708375, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1734793687, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("gqgagenvqbugihc", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("foizorbloejz", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("htbttpkimskhnkkh", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("krsmhrcmely", model.ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java index 3bbd27d82a04..792ba3fabaea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,13 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"hgd\",\"resource\":\"ubwggxzsshxliqm\",\"operation\":\"kwhfmdoiiyobqzwj\",\"description\":\"wrsofxcacrm\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java index 8ddb517501e3..ca513acfe84f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner; -import com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"lzs\",\"isDataAction\":true,\"display\":{\"provider\":\"fdrslzymqx\",\"resource\":\"rwycu\",\"operation\":\"tjwgetfigwn\",\"description\":\"jxzi\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java index d681cd32e1af..987a79d177ba 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OperationListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"owagehxuihwes\",\"isDataAction\":true,\"display\":{\"provider\":\"gblkkncyp\",\"resource\":\"evspsaney\",\"operation\":\"erpiobnhrfbrj\",\"description\":\"jwqdmr\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"pqcaigazwfwlrfd\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java index cb6c073a7573..d8f8029ec5a7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"spbibsnxmfooinp\",\"isDataAction\":true,\"display\":{\"provider\":\"gcuwgkmqcb\",\"resource\":\"wtfuxktsxnik\",\"operation\":\"ittfmlp\",\"description\":\"tep\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"ou\",\"isDataAction\":false,\"display\":{\"provider\":\"gjsqqqairoo\",\"resource\":\"wujobdqiup\",\"operation\":\"v\",\"description\":\"vijpmeg\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java deleted file mode 100644 index 8527b66fa24f..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class OptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptionAProperties model = BinaryData.fromString( - "{\"mtu\":387260273,\"vlanId\":1121842631,\"peerASN\":3961448692771285787,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":113330919,\"multiplier\":1820596748}}") - .toObject(OptionAProperties.class); - Assertions.assertEquals(387260273, model.mtu()); - Assertions.assertEquals(1121842631, model.vlanId()); - Assertions.assertEquals(3961448692771285787L, model.peerAsn()); - Assertions.assertEquals(113330919, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1820596748, model.bfdConfiguration().multiplier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionAProperties model = new OptionAProperties().withMtu(387260273) - .withVlanId(1121842631) - .withPeerAsn(3961448692771285787L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(113330919).withMultiplier(1820596748)); - model = BinaryData.fromObject(model).toObject(OptionAProperties.class); - Assertions.assertEquals(387260273, model.mtu()); - Assertions.assertEquals(1121842631, model.vlanId()); - Assertions.assertEquals(3961448692771285787L, model.peerAsn()); - Assertions.assertEquals(113330919, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1820596748, model.bfdConfiguration().multiplier()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..81bbf056bb1b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3ConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3ConfigurationPatchProperties model = BinaryData.fromString( + "{\"peerASN\":8278215974801858009,\"vlanId\":418993281,\"fabricASN\":5458833762732606760,\"peLoopbackIpAddress\":[\"slzymqxserwycuhy\",\"jwgetfigwneqjxz\",\"zebjrahg\",\"stubw\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":2120959166}],\"primaryIpv4Prefix\":\"iqmsckwhfmdoiiyo\",\"primaryIpv6Prefix\":\"zw\",\"secondaryIpv4Prefix\":\"lwrsofxcacrmv\",\"secondaryIpv6Prefix\":\"mrs\"}") + .toObject(OptionBLayer3ConfigurationPatchProperties.class); + Assertions.assertEquals("iqmsckwhfmdoiiyo", model.primaryIpv4Prefix()); + Assertions.assertEquals("zw", model.primaryIpv6Prefix()); + Assertions.assertEquals("lwrsofxcacrmv", model.secondaryIpv4Prefix()); + Assertions.assertEquals("mrs", model.secondaryIpv6Prefix()); + Assertions.assertEquals(8278215974801858009L, model.peerAsn()); + Assertions.assertEquals(418993281, model.vlanId()); + Assertions.assertEquals("slzymqxserwycuhy", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(2120959166, model.prefixLimits().get(0).maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3ConfigurationPatchProperties model + = new OptionBLayer3ConfigurationPatchProperties().withPrimaryIpv4Prefix("iqmsckwhfmdoiiyo") + .withPrimaryIpv6Prefix("zw") + .withSecondaryIpv4Prefix("lwrsofxcacrmv") + .withSecondaryIpv6Prefix("mrs") + .withPeerAsn(8278215974801858009L) + .withVlanId(418993281) + .withPeLoopbackIpAddress(Arrays.asList("slzymqxserwycuhy", "jwgetfigwneqjxz", "zebjrahg", "stubw")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(2120959166))); + model = BinaryData.fromObject(model).toObject(OptionBLayer3ConfigurationPatchProperties.class); + Assertions.assertEquals("iqmsckwhfmdoiiyo", model.primaryIpv4Prefix()); + Assertions.assertEquals("zw", model.primaryIpv6Prefix()); + Assertions.assertEquals("lwrsofxcacrmv", model.secondaryIpv4Prefix()); + Assertions.assertEquals("mrs", model.secondaryIpv6Prefix()); + Assertions.assertEquals(8278215974801858009L, model.peerAsn()); + Assertions.assertEquals(418993281, model.vlanId()); + Assertions.assertEquals("slzymqxserwycuhy", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(2120959166, model.prefixLimits().get(0).maximumRoutes()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java index 37902b1d30f2..f37683b0d7fa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java @@ -1,41 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OptionBLayer3ConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OptionBLayer3Configuration model = BinaryData.fromString( - "{\"peerASN\":4947142165522560944,\"vlanId\":1587213878,\"fabricASN\":7583012268187491181,\"primaryIpv4Prefix\":\"obguqisqsqk\",\"primaryIpv6Prefix\":\"mioyjpn\",\"secondaryIpv4Prefix\":\"viqcpszp\",\"secondaryIpv6Prefix\":\"vqdvrdmvxyrxdhg\"}") + "{\"peerASN\":4546698248555011124,\"vlanId\":1259597547,\"fabricASN\":713758433803605007,\"peLoopbackIpAddress\":[\"uz\",\"ilmciwu\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":569782692}],\"primaryIpv4Prefix\":\"ovljlbzdlbybpaxh\",\"primaryIpv6Prefix\":\"ysovsn\",\"secondaryIpv4Prefix\":\"hanzgesfhsha\",\"secondaryIpv6Prefix\":\"ahn\"}") .toObject(OptionBLayer3Configuration.class); - Assertions.assertEquals("obguqisqsqk", model.primaryIpv4Prefix()); - Assertions.assertEquals("mioyjpn", model.primaryIpv6Prefix()); - Assertions.assertEquals("viqcpszp", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.secondaryIpv6Prefix()); - Assertions.assertEquals(4947142165522560944L, model.peerAsn()); - Assertions.assertEquals(1587213878, model.vlanId()); + Assertions.assertEquals("ovljlbzdlbybpaxh", model.primaryIpv4Prefix()); + Assertions.assertEquals("ysovsn", model.primaryIpv6Prefix()); + Assertions.assertEquals("hanzgesfhsha", model.secondaryIpv4Prefix()); + Assertions.assertEquals("ahn", model.secondaryIpv6Prefix()); + Assertions.assertEquals(4546698248555011124L, model.peerAsn()); + Assertions.assertEquals(1259597547, model.vlanId()); + Assertions.assertEquals("uz", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(569782692, model.prefixLimits().get(0).maximumRoutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OptionBLayer3Configuration model = new OptionBLayer3Configuration().withPrimaryIpv4Prefix("obguqisqsqk") - .withPrimaryIpv6Prefix("mioyjpn") - .withSecondaryIpv4Prefix("viqcpszp") - .withSecondaryIpv6Prefix("vqdvrdmvxyrxdhg") - .withPeerAsn(4947142165522560944L) - .withVlanId(1587213878); + OptionBLayer3Configuration model = new OptionBLayer3Configuration().withPrimaryIpv4Prefix("ovljlbzdlbybpaxh") + .withPrimaryIpv6Prefix("ysovsn") + .withSecondaryIpv4Prefix("hanzgesfhsha") + .withSecondaryIpv6Prefix("ahn") + .withPeerAsn(4546698248555011124L) + .withVlanId(1259597547) + .withPeLoopbackIpAddress(Arrays.asList("uz", "ilmciwu")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(569782692))); model = BinaryData.fromObject(model).toObject(OptionBLayer3Configuration.class); - Assertions.assertEquals("obguqisqsqk", model.primaryIpv4Prefix()); - Assertions.assertEquals("mioyjpn", model.primaryIpv6Prefix()); - Assertions.assertEquals("viqcpszp", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.secondaryIpv6Prefix()); - Assertions.assertEquals(4947142165522560944L, model.peerAsn()); - Assertions.assertEquals(1587213878, model.vlanId()); + Assertions.assertEquals("ovljlbzdlbybpaxh", model.primaryIpv4Prefix()); + Assertions.assertEquals("ysovsn", model.primaryIpv6Prefix()); + Assertions.assertEquals("hanzgesfhsha", model.secondaryIpv4Prefix()); + Assertions.assertEquals("ahn", model.secondaryIpv6Prefix()); + Assertions.assertEquals(4546698248555011124L, model.peerAsn()); + Assertions.assertEquals(1259597547, model.vlanId()); + Assertions.assertEquals("uz", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(569782692, model.prefixLimits().get(0).maximumRoutes()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..8cbf87367533 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3PrefixLimitPatchProperties model = BinaryData.fromString("{\"maximumRoutes\":1974657590}") + .toObject(OptionBLayer3PrefixLimitPatchProperties.class); + Assertions.assertEquals(1974657590, model.maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3PrefixLimitPatchProperties model + = new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1974657590); + model = BinaryData.fromObject(model).toObject(OptionBLayer3PrefixLimitPatchProperties.class); + Assertions.assertEquals(1974657590, model.maximumRoutes()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..c276f3ff1566 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3PrefixLimitProperties model = BinaryData.fromString("{\"maximumRoutes\":1531671679}") + .toObject(OptionBLayer3PrefixLimitProperties.class); + Assertions.assertEquals(1531671679, model.maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3PrefixLimitProperties model + = new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1531671679); + model = BinaryData.fromObject(model).toObject(OptionBLayer3PrefixLimitProperties.class); + Assertions.assertEquals(1531671679, model.maximumRoutes()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java deleted file mode 100644 index 7fe342a18da0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OptionBPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptionBProperties model = BinaryData.fromString( - "{\"importRouteTargets\":[\"bcakzn\",\"okh\",\"itwhrjsdmmazdnck\",\"dbjp\"],\"exportRouteTargets\":[\"zqpxzbawkikcd\",\"fhbssdpjeyoqxded\",\"cfiwhagxsurejq\",\"shzz\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"lcxiqqzjko\"],\"importIpv6RouteTargets\":[\"pnamgl\",\"ouigdmfivjqte\",\"dqqigdydkghpc\"],\"exportIpv4RouteTargets\":[\"qirvtk\",\"yhhmvfxl\",\"pjajodmkrrwe\"],\"exportIpv6RouteTargets\":[\"vqokql\",\"jqgir\"]}}") - .toObject(OptionBProperties.class); - Assertions.assertEquals("bcakzn", model.importRouteTargets().get(0)); - Assertions.assertEquals("zqpxzbawkikcd", model.exportRouteTargets().get(0)); - Assertions.assertEquals("lcxiqqzjko", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("pnamgl", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vqokql", model.routeTargets().exportIpv6RouteTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionBProperties model - = new OptionBProperties().withImportRouteTargets(Arrays.asList("bcakzn", "okh", "itwhrjsdmmazdnck", "dbjp")) - .withExportRouteTargets(Arrays.asList("zqpxzbawkikcd", "fhbssdpjeyoqxded", "cfiwhagxsurejq", "shzz")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("lcxiqqzjko")) - .withImportIpv6RouteTargets(Arrays.asList("pnamgl", "ouigdmfivjqte", "dqqigdydkghpc")) - .withExportIpv4RouteTargets(Arrays.asList("qirvtk", "yhhmvfxl", "pjajodmkrrwe")) - .withExportIpv6RouteTargets(Arrays.asList("vqokql", "jqgir"))); - model = BinaryData.fromObject(model).toObject(OptionBProperties.class); - Assertions.assertEquals("bcakzn", model.importRouteTargets().get(0)); - Assertions.assertEquals("zqpxzbawkikcd", model.exportRouteTargets().get(0)); - Assertions.assertEquals("lcxiqqzjko", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("pnamgl", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vqokql", model.routeTargets().exportIpv6RouteTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java new file mode 100644 index 000000000000..5a6f1de184aa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class PoliceRateConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoliceRateConfigurationProperties model = BinaryData.fromString( + "{\"bitRate\":{\"rate\":3873613137312097491,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":5930186203336174884,\"unit\":\"Packets\"}}") + .toObject(PoliceRateConfigurationProperties.class); + Assertions.assertEquals(3873613137312097491L, model.bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.bitRate().unit()); + Assertions.assertEquals(5930186203336174884L, model.burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.PACKETS, model.burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoliceRateConfigurationProperties model = new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(3873613137312097491L).withUnit(BitRateUnit.MBPS)) + .withBurstSize(new BurstSize().withSize(5930186203336174884L).withUnit(BurstSizeUnit.PACKETS)); + model = BinaryData.fromObject(model).toObject(PoliceRateConfigurationProperties.class); + Assertions.assertEquals(3873613137312097491L, model.bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.bitRate().unit()); + Assertions.assertEquals(5930186203336174884L, model.burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.PACKETS, model.burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java new file mode 100644 index 000000000000..d782cf80ed43 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PortConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortConditionPatch model = BinaryData.fromString( + "{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"hmoz\",\"sgzv\",\"ns\",\"nj\"],\"portGroupNames\":[\"afolpymwamxqzrag\",\"gdphtvdula\"]}") + .toObject(PortConditionPatch.class); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); + Assertions.assertEquals("hmoz", model.ports().get(0)); + Assertions.assertEquals("afolpymwamxqzrag", model.portGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortConditionPatch model = new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("hmoz", "sgzv", "ns", "nj")) + .withPortGroupNames(Arrays.asList("afolpymwamxqzrag", "gdphtvdula")); + model = BinaryData.fromObject(model).toObject(PortConditionPatch.class); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); + Assertions.assertEquals("hmoz", model.ports().get(0)); + Assertions.assertEquals("afolpymwamxqzrag", model.portGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java index 810afcb0400a..06517dfdd885 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,24 +15,24 @@ public final class PortConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PortCondition model = BinaryData.fromString( - "{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xitmmqtgqqq\",\"hrnxrxc\",\"juisavokqdzf\",\"azivjlfrqttbajl\"],\"portGroupNames\":[\"nwxyiop\",\"dkqqfkuvscxkd\"]}") + "{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"gcvizqzdwlvwlyou\",\"fgfb\"],\"portGroupNames\":[\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}") .toObject(PortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("xitmmqtgqqq", model.ports().get(0)); - Assertions.assertEquals("nwxyiop", model.portGroupNames().get(0)); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); + Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PortCondition model = new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xitmmqtgqqq", "hrnxrxc", "juisavokqdzf", "azivjlfrqttbajl")) - .withPortGroupNames(Arrays.asList("nwxyiop", "dkqqfkuvscxkd")); + PortCondition model = new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("gcvizqzdwlvwlyou", "fgfb")) + .withPortGroupNames(Arrays.asList("bdyhgkfminsgowz", "ttsttktlahbqact")); model = BinaryData.fromObject(model).toObject(PortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("xitmmqtgqqq", model.ports().get(0)); - Assertions.assertEquals("nwxyiop", model.portGroupNames().get(0)); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); + Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..cd7f9b65dadc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PortGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortGroupPatchProperties model = BinaryData + .fromString("{\"name\":\"snsqowxwcoml\",\"ports\":[\"twvc\",\"cswkacvejy\",\"dvlvhbwrnfxtgdd\",\"qthe\"]}") + .toObject(PortGroupPatchProperties.class); + Assertions.assertEquals("snsqowxwcoml", model.name()); + Assertions.assertEquals("twvc", model.ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortGroupPatchProperties model = new PortGroupPatchProperties().withName("snsqowxwcoml") + .withPorts(Arrays.asList("twvc", "cswkacvejy", "dvlvhbwrnfxtgdd", "qthe")); + model = BinaryData.fromObject(model).toObject(PortGroupPatchProperties.class); + Assertions.assertEquals("snsqowxwcoml", model.name()); + Assertions.assertEquals("twvc", model.ports().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java index 482eb5cdc565..923ec02fd7fb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,19 @@ public final class PortGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PortGroupProperties model = BinaryData.fromString("{\"name\":\"yuvvfonkp\",\"ports\":[\"yik\",\"y\"]}") - .toObject(PortGroupProperties.class); - Assertions.assertEquals("yuvvfonkp", model.name()); - Assertions.assertEquals("yik", model.ports().get(0)); + PortGroupProperties model + = BinaryData.fromString("{\"name\":\"jbkkdmflvestmjl\",\"ports\":[\"ilozapeewchpxlk\"]}") + .toObject(PortGroupProperties.class); + Assertions.assertEquals("jbkkdmflvestmjl", model.name()); + Assertions.assertEquals("ilozapeewchpxlk", model.ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PortGroupProperties model - = new PortGroupProperties().withName("yuvvfonkp").withPorts(Arrays.asList("yik", "y")); + = new PortGroupProperties().withName("jbkkdmflvestmjl").withPorts(Arrays.asList("ilozapeewchpxlk")); model = BinaryData.fromObject(model).toObject(PortGroupProperties.class); - Assertions.assertEquals("yuvvfonkp", model.name()); - Assertions.assertEquals("yik", model.ports().get(0)); + Assertions.assertEquals("jbkkdmflvestmjl", model.name()); + Assertions.assertEquals("ilozapeewchpxlk", model.ports().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..3045d4b64809 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrefixLimitPatchProperties model = BinaryData + .fromString("{\"maximumRoutes\":1917543946,\"threshold\":2004089002,\"idleTimeExpiry\":1189896831}") + .toObject(PrefixLimitPatchProperties.class); + Assertions.assertEquals(1917543946, model.maximumRoutes()); + Assertions.assertEquals(2004089002, model.threshold()); + Assertions.assertEquals(1189896831, model.idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrefixLimitPatchProperties model = new PrefixLimitPatchProperties().withMaximumRoutes(1917543946) + .withThreshold(2004089002) + .withIdleTimeExpiry(1189896831); + model = BinaryData.fromObject(model).toObject(PrefixLimitPatchProperties.class); + Assertions.assertEquals(1917543946, model.maximumRoutes()); + Assertions.assertEquals(2004089002, model.threshold()); + Assertions.assertEquals(1189896831, model.idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..fcc497f48694 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrefixLimitProperties model = BinaryData + .fromString("{\"maximumRoutes\":310121381,\"threshold\":1138865865,\"idleTimeExpiry\":781193837}") + .toObject(PrefixLimitProperties.class); + Assertions.assertEquals(310121381, model.maximumRoutes()); + Assertions.assertEquals(1138865865, model.threshold()); + Assertions.assertEquals(781193837, model.idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrefixLimitProperties model = new PrefixLimitProperties().withMaximumRoutes(310121381) + .withThreshold(1138865865) + .withIdleTimeExpiry(781193837); + model = BinaryData.fromObject(model).toObject(PrefixLimitProperties.class); + Assertions.assertEquals(310121381, model.maximumRoutes()); + Assertions.assertEquals(1138865865, model.threshold()); + Assertions.assertEquals(781193837, model.idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ProxyResourceBaseTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ProxyResourceBaseTests.java new file mode 100644 index 000000000000..d8ac9503b287 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ProxyResourceBaseTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ProxyResourceBase; + +public final class ProxyResourceBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProxyResourceBase model = BinaryData.fromString("{\"id\":\"qnmelyksy\",\"type\":\"hiclmslnunk\"}") + .toObject(ProxyResourceBase.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProxyResourceBase model = new ProxyResourceBase(); + model = BinaryData.fromObject(model).toObject(ProxyResourceBase.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPatchPropertiesTests.java new file mode 100644 index 000000000000..f8669b50b674 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPatchPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.QosConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.QosPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class QosPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QosPatchProperties model + = BinaryData.fromString("{\"qosConfigurationState\":\"Enabled\"}").toObject(QosPatchProperties.class); + Assertions.assertEquals(QosConfigurationState.ENABLED, model.qosConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QosPatchProperties model = new QosPatchProperties().withQosConfigurationState(QosConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(QosPatchProperties.class); + Assertions.assertEquals(QosConfigurationState.ENABLED, model.qosConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPropertiesTests.java new file mode 100644 index 000000000000..97ca707f995d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/QosPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.QosConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.QosProperties; +import org.junit.jupiter.api.Assertions; + +public final class QosPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QosProperties model + = BinaryData.fromString("{\"qosConfigurationState\":\"Disabled\"}").toObject(QosProperties.class); + Assertions.assertEquals(QosConfigurationState.DISABLED, model.qosConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QosProperties model = new QosProperties().withQosConfigurationState(QosConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(QosProperties.class); + Assertions.assertEquals(QosConfigurationState.DISABLED, model.qosConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java index 974e3cd80d29..f155e4c9cd36 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,14 +13,14 @@ public final class RebootPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RebootProperties model - = BinaryData.fromString("{\"rebootType\":\"GracefulRebootWithoutZTP\"}").toObject(RebootProperties.class); - Assertions.assertEquals(RebootType.GRACEFUL_REBOOT_WITHOUT_ZTP, model.rebootType()); + = BinaryData.fromString("{\"rebootType\":\"UngracefulRebootWithZTP\"}").toObject(RebootProperties.class); + Assertions.assertEquals(RebootType.UNGRACEFUL_REBOOT_WITH_ZTP, model.rebootType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RebootProperties model = new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITHOUT_ZTP); + RebootProperties model = new RebootProperties().withRebootType(RebootType.UNGRACEFUL_REBOOT_WITH_ZTP); model = BinaryData.fromObject(model).toObject(RebootProperties.class); - Assertions.assertEquals(RebootType.GRACEFUL_REBOOT_WITHOUT_ZTP, model.rebootType()); + Assertions.assertEquals(RebootType.UNGRACEFUL_REBOOT_WITH_ZTP, model.rebootType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java index 46307a090bef..016e1f4d5194 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; @@ -33,89 +33,66 @@ public final class RoutePoliciesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"qeonyizqdwvg\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":2421775876641234866,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"rfuzedud\",\"ipExtendedCommunityIds\":[\"dv\",\"a\"],\"ipCommunityIds\":[\"jvumimbcf\",\"hycluounvrqvxno\"]},\"action\":{\"localPreference\":4590405392307652745,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"ezeewcrblksdd\"},{\"sequenceNumber\":4132120253192181163,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"hoezjikw\",\"ipExtendedCommunityIds\":[\"rsoxtxuuypdcgx\",\"kbwv\"],\"ipCommunityIds\":[\"bzcmpbymsgcl\"]},\"action\":{\"localPreference\":2915333026435586464,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"fmjckct\"}],\"annotation\":\"hs\"},\"location\":\"iumktslmeyon\",\"tags\":{\"rgwtynqbhhfhi\":\"evmaw\",\"yihpsrjzpvojwjan\":\"wwkhiyubykxzcvut\"},\"id\":\"olqqpa\",\"name\":\"zpzmojupqlus\",\"type\":\"kzdnotgyowis\"}"; + = "{\"properties\":{\"annotation\":\"gfgchlcbtx\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":6959679343751112608,\"condition\":{\"ipCommunityIds\":[\"kl\",\"hmymkcccl\",\"fawfeeatvnmm\"],\"ipExtendedCommunityIds\":[\"wfqrykikh\",\"gwtcll\"],\"type\":\"Or\",\"ipPrefixId\":\"ifohtsmk\"},\"action\":{\"localPreference\":941890972826581005,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"sehb\"}],\"networkFabricId\":\"bqionnqszn\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"y\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"teyvpvxcqjgwt\",\"tags\":{\"xxxhbrysns\":\"fbpcm\",\"egvwbykrndxbkv\":\"seh\"},\"id\":\"wqg\",\"name\":\"fhl\",\"type\":\"qyedhyfncwiyfzu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RoutePolicy response = manager.routePolicies() - .define("uiuvkcnqonj") - .withRegion("z") - .withExistingResourceGroup("vpdjytme") - .withNetworkFabricId("b") - .withTags(mapOf("cmeyxypxlzcr", "l", "vetpdezebvtkg", "mfvjz", "cxuounzzckogcv", "jnadfhheilnh")) - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.PERMIT) + .define("bzykk") + .withRegion("yrcqsyq") + .withExistingResourceGroup("bvuxpyveavst") .withStatements( Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("sdqnqqzqdvg") - .withSequenceNumber(2097893229649830526L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds( - Arrays.asList("ttqils", "abqtjchxsfwe", "leiyemjips", "ekdqqwcspfhrndq")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("yejsgbpjjnblbkak") - .withIpExtendedCommunityIds(Arrays.asList("wbddnddctkjcqhx"))) - .withAction(new StatementActionProperties().withLocalPreference(5478096301196384502L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("wjfkmnjtkswmyjd") - .withSequenceNumber(1967239015461212501L) + new RoutePolicyStatementProperties().withAnnotation("eq") + .withSequenceNumber(3584131533256265203L) .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("kctpaiw", "rjwyxduwimwnuv")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("oynya") - .withIpExtendedCommunityIds(Arrays.asList("ph", "uzmv", "iltl"))) - .withAction(new StatementActionProperties().withLocalPreference(7266690499667397309L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("fwugo") - .withSequenceNumber(4942587917021188500L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("ctnpp")) + .withIpCommunityIds(Arrays.asList("xgzpmw", "vfrmvtww")) + .withIpExtendedCommunityIds( + Arrays.asList("iv", "osbrqeywhlqyd", "hypuvhucaw", "hbqjlly")) .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("jtmpdkcbpkiguv") - .withIpExtendedCommunityIds(Arrays.asList("tkcen", "wg"))) - .withAction(new StatementActionProperties() - .withLocalPreference(6704049784410967385L) - .withActionType(RoutePolicyActionType.PERMIT) + .withIpPrefixId("nbxgkudioum")) + .withAction(new StatementActionProperties().withLocalPreference(1146624147470852785L) + .withActionType(RoutePolicyActionType.CONTINUE) .withIpCommunityProperties(new ActionIpCommunityProperties()) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("nkrarjii") - .withSequenceNumber(1443615554749895796L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("jxocmmv", "amorhkneu")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("nvzmvnbck") - .withIpExtendedCommunityIds( - Arrays.asList("xuuksvfsukpkieal", "ckpnnenrcez", "or", "zwk"))) - .withAction(new StatementActionProperties().withLocalPreference(4056003480349765622L) - .withActionType(RoutePolicyActionType.DENY) + new RoutePolicyStatementProperties().withAnnotation("iwgkozlpsfraj") + .withSequenceNumber(5221409209177168311L) + .withCondition( + new StatementConditionProperties().withIpCommunityIds(Arrays.asList("mwuaxxcbihgcdujh")) + .withIpExtendedCommunityIds(Arrays.asList("wkqrbtrmifleizd", "ka")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("ufvabci")) + .withAction(new StatementActionProperties().withLocalPreference(3462817851058629850L) + .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties(new ActionIpCommunityProperties()) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())))) - .withAnnotation("bychcwhl") + .withNetworkFabricId("yuwrggfg") + .withTags(mapOf("aetgmmfdf", "j")) + .withAnnotation("j") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withAddressFamilyType(AddressFamilyType.IPV6) .create(); - Assertions.assertEquals("iumktslmeyon", response.location()); - Assertions.assertEquals("evmaw", response.tags().get("rgwtynqbhhfhi")); - Assertions.assertEquals("qeonyizqdwvg", response.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); + Assertions.assertEquals("teyvpvxcqjgwt", response.location()); + Assertions.assertEquals("fbpcm", response.tags().get("xxxhbrysns")); + Assertions.assertEquals("gfgchlcbtx", response.annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("ezeewcrblksdd", response.statements().get(0).annotation()); - Assertions.assertEquals(2421775876641234866L, response.statements().get(0).sequenceNumber()); - Assertions.assertEquals("jvumimbcf", response.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, response.statements().get(0).condition().type()); - Assertions.assertEquals("rfuzedud", response.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("dv", response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(4590405392307652745L, response.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.statements().get(0).action().actionType()); - Assertions.assertEquals("hs", response.annotation()); + Assertions.assertEquals("sehb", response.statements().get(0).annotation()); + Assertions.assertEquals(6959679343751112608L, response.statements().get(0).sequenceNumber()); + Assertions.assertEquals("kl", response.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("wfqrykikh", response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, response.statements().get(0).condition().type()); + Assertions.assertEquals("ifohtsmk", response.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(941890972826581005L, response.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, response.statements().get(0).action().actionType()); + Assertions.assertEquals("bqionnqszn", response.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java index eb2f118b4ebf..bd9c2feb3ed7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; @@ -25,32 +25,33 @@ public final class RoutePoliciesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"in\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":335872430827651416,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"qtkrjucazwedm\",\"ipExtendedCommunityIds\":[\"lx\",\"cem\",\"oanudvqannenxgo\"],\"ipCommunityIds\":[\"gblqyf\",\"zbfpqifsgzfgxw\",\"xjiqpdsohw\"]},\"action\":{\"localPreference\":7185211741376169644,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"jxhpppnksqiwlmeg\"}],\"annotation\":\"oseohoygowdzizzu\"},\"location\":\"orcppqvovsir\",\"tags\":{\"e\":\"epiplpexhhjjat\",\"c\":\"zbiroxamnv\",\"nsihdzxeufj\":\"jpba\"},\"id\":\"b\",\"name\":\"zm\",\"type\":\"xdmppib\"}"; + = "{\"properties\":{\"annotation\":\"rctco\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":9168688154509726931,\"condition\":{\"ipCommunityIds\":[\"rbqc\"],\"ipExtendedCommunityIds\":[\"wbcycwasmrf\",\"wsicmhhvbovb\",\"xfylez\",\"dp\"],\"type\":\"And\",\"ipPrefixId\":\"emny\"},\"action\":{\"localPreference\":4440331383296213551,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"ezszlr\"}],\"networkFabricId\":\"z\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"ijnpkx\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\"},\"location\":\"hj\",\"tags\":{\"jkqlruhhkkbfgrms\":\"l\"},\"id\":\"bmdrbtg\",\"name\":\"fpd\",\"type\":\"ed\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RoutePolicy response = manager.routePolicies() - .getByResourceGroupWithResponse("rinvfcds", "j", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("sdnobxcdxpnrae", "dixoflxvsu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("orcppqvovsir", response.location()); - Assertions.assertEquals("epiplpexhhjjat", response.tags().get("e")); - Assertions.assertEquals("in", response.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.defaultAction()); - Assertions.assertEquals("jxhpppnksqiwlmeg", response.statements().get(0).annotation()); - Assertions.assertEquals(335872430827651416L, response.statements().get(0).sequenceNumber()); - Assertions.assertEquals("gblqyf", response.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("hj", response.location()); + Assertions.assertEquals("l", response.tags().get("jkqlruhhkkbfgrms")); + Assertions.assertEquals("rctco", response.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); + Assertions.assertEquals("ezszlr", response.statements().get(0).annotation()); + Assertions.assertEquals(9168688154509726931L, response.statements().get(0).sequenceNumber()); + Assertions.assertEquals("rbqc", response.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("wbcycwasmrf", + response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.AND, response.statements().get(0).condition().type()); - Assertions.assertEquals("qtkrjucazwedm", response.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("lx", response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(7185211741376169644L, response.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.statements().get(0).action().actionType()); - Assertions.assertEquals("oseohoygowdzizzu", response.annotation()); + Assertions.assertEquals("emny", response.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(4440331383296213551L, response.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, response.statements().get(0).action().actionType()); + Assertions.assertEquals("z", response.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java index 687e85297c3a..0b99ea4d413a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; @@ -26,36 +26,36 @@ public final class RoutePoliciesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"wplx\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":95459084041814942,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"xls\",\"ipExtendedCommunityIds\":[\"kjrqdt\",\"kcaocjuuxqnki\",\"wmrwc\",\"ynjcvewl\"],\"ipCommunityIds\":[\"naktjopiglah\",\"eqjchhrrx\",\"cztrqnuahh\"]},\"action\":{\"localPreference\":4040197137610560802,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"ujpshisziv\"},{\"sequenceNumber\":2369172499266349672,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"wzjorv\",\"ipExtendedCommunityIds\":[\"kkelesbjck\"],\"ipCommunityIds\":[\"ybrlwdm\",\"sdfslaektn\"]},\"action\":{\"localPreference\":8543860576467248968,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"pqumexnpoaeruy\"}],\"annotation\":\"hltwlzlm\"},\"location\":\"prlcgqewm\",\"tags\":{\"papepwpbnjckow\":\"hqlybmkmxusm\"},\"id\":\"uniu\",\"name\":\"ysvnddllbwnmvh\",\"type\":\"zypmmyr\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"uyfcfdedeup\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":4259685317906175096,\"condition\":{\"ipCommunityIds\":[\"bjeboel\",\"sghsowmvtmjdhw\"],\"ipExtendedCommunityIds\":[\"jhhpfjz\"],\"type\":\"Or\",\"ipPrefixId\":\"pwavdope\"},\"action\":{\"localPreference\":5807333109944256853,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"tldijg\"}],\"networkFabricId\":\"bitudwuoxir\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"okxphcj\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"EnabledDegraded\"},\"location\":\"mgctw\",\"tags\":{\"hopedmkxtdyxz\":\"jwvmugistnyzm\",\"tgfbmocvblrvkqx\":\"f\",\"rcqpxaajt\":\"khj\",\"tzmubxngspazm\":\"yrqtu\"},\"id\":\"ssbvlj\",\"name\":\"atbecuh\",\"type\":\"cakkewgz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.routePolicies().listByResourceGroup("wqjcphofyoqfvm", com.azure.core.util.Context.NONE); + = manager.routePolicies().listByResourceGroup("vwsbsdyxqjyr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("prlcgqewm", response.iterator().next().location()); - Assertions.assertEquals("hqlybmkmxusm", response.iterator().next().tags().get("papepwpbnjckow")); - Assertions.assertEquals("wplx", response.iterator().next().networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().addressFamilyType()); + Assertions.assertEquals("mgctw", response.iterator().next().location()); + Assertions.assertEquals("jwvmugistnyzm", response.iterator().next().tags().get("hopedmkxtdyxz")); + Assertions.assertEquals("uyfcfdedeup", response.iterator().next().annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("ujpshisziv", response.iterator().next().statements().get(0).annotation()); - Assertions.assertEquals(95459084041814942L, response.iterator().next().statements().get(0).sequenceNumber()); - Assertions.assertEquals("naktjopiglah", + Assertions.assertEquals("tldijg", response.iterator().next().statements().get(0).annotation()); + Assertions.assertEquals(4259685317906175096L, response.iterator().next().statements().get(0).sequenceNumber()); + Assertions.assertEquals("bjeboel", response.iterator().next().statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, - response.iterator().next().statements().get(0).condition().type()); - Assertions.assertEquals("xls", response.iterator().next().statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kjrqdt", + Assertions.assertEquals("jhhpfjz", response.iterator().next().statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(4040197137610560802L, + Assertions.assertEquals(RoutePolicyConditionType.OR, + response.iterator().next().statements().get(0).condition().type()); + Assertions.assertEquals("pwavdope", response.iterator().next().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(5807333109944256853L, response.iterator().next().statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.iterator().next().statements().get(0).action().actionType()); - Assertions.assertEquals("hltwlzlm", response.iterator().next().annotation()); + Assertions.assertEquals("bitudwuoxir", response.iterator().next().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().addressFamilyType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java index 8d64fd0516d3..8232a74af81f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; @@ -26,36 +26,35 @@ public final class RoutePoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"gsdo\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":8892366462938685872,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"lmczcxouaneu\",\"ipExtendedCommunityIds\":[\"qztakov\",\"lvwpvdmtfcstucmi\"],\"ipCommunityIds\":[\"snu\",\"q\",\"sqitiuttkasxjkcl\"]},\"action\":{\"localPreference\":5014050499766158651,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"etbhlbhkijqgcvqe\"},{\"sequenceNumber\":8806210245617066019,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"x\",\"ipExtendedCommunityIds\":[\"uh\",\"izoak\"],\"ipCommunityIds\":[\"yvobevfbmxz\"]},\"action\":{\"localPreference\":8738446998224680215,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"kp\"},{\"sequenceNumber\":5054072910955069059,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"byil\",\"ipExtendedCommunityIds\":[\"b\",\"meuyxhcwu\",\"t\",\"go\"],\"ipCommunityIds\":[\"oji\"]},\"action\":{\"localPreference\":2708035609660166820,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"iplxrifbsb\"},{\"sequenceNumber\":7442335067660473618,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"bbpoijs\",\"ipExtendedCommunityIds\":[\"utjit\"],\"ipCommunityIds\":[\"knarscxnk\",\"pjinz\",\"sxrsmvnn\"]},\"action\":{\"localPreference\":5504107041706044506,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"zwwqchxow\"}],\"annotation\":\"vuxqactoqqehnqi\"},\"location\":\"gnvuolv\",\"tags\":{\"eq\":\"nlbkizebbrwl\"},\"id\":\"isoiqgetzgwywy\",\"name\":\"bwuamo\",\"type\":\"opqqiyjrehe\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"usjlqtjj\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":4721860429819384541,\"condition\":{\"ipCommunityIds\":[\"mevahqjdihjol\",\"wahehud\"],\"ipExtendedCommunityIds\":[\"olmm\",\"fdgv\"],\"type\":\"Or\",\"ipPrefixId\":\"bm\"},\"action\":{\"localPreference\":1812199928715825554,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"vogrripopzyde\"},{\"sequenceNumber\":8497289798873482339,\"condition\":{\"ipCommunityIds\":[\"dmsnezdumjqdhr\",\"wyq\",\"qmelm\"],\"ipExtendedCommunityIds\":[\"ep\"],\"type\":\"And\",\"ipPrefixId\":\"ve\"},\"action\":{\"localPreference\":5160782763481893595,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"nl\"},{\"sequenceNumber\":8442014316834448522,\"condition\":{\"ipCommunityIds\":[\"pwqksknstjfkjb\",\"yggrmztcxyphd\",\"xws\"],\"ipExtendedCommunityIds\":[\"gejopveg\"],\"type\":\"And\",\"ipPrefixId\":\"eayhojdgwezcr\"},\"action\":{\"localPreference\":7206213179804720989,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"fdpxbwqgkfxcdtj\"}],\"networkFabricId\":\"yevvuddnwj\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"lemxbmaii\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"evh\",\"tags\":{\"sis\":\"jpumpqlugzydylf\",\"i\":\"dmfo\",\"tkprbm\":\"svfnxxkmrfz\",\"duh\":\"azrfhfjwikvakj\"},\"id\":\"ilvajctpwlf\",\"name\":\"fardjqwdrooooobs\",\"type\":\"dqv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.routePolicies().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("gnvuolv", response.iterator().next().location()); - Assertions.assertEquals("nlbkizebbrwl", response.iterator().next().tags().get("eq")); - Assertions.assertEquals("gsdo", response.iterator().next().networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().addressFamilyType()); + Assertions.assertEquals("evh", response.iterator().next().location()); + Assertions.assertEquals("jpumpqlugzydylf", response.iterator().next().tags().get("sis")); + Assertions.assertEquals("usjlqtjj", response.iterator().next().annotation()); Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().defaultAction()); - Assertions.assertEquals("etbhlbhkijqgcvqe", response.iterator().next().statements().get(0).annotation()); - Assertions.assertEquals(8892366462938685872L, response.iterator().next().statements().get(0).sequenceNumber()); - Assertions.assertEquals("snu", + Assertions.assertEquals("vogrripopzyde", response.iterator().next().statements().get(0).annotation()); + Assertions.assertEquals(4721860429819384541L, response.iterator().next().statements().get(0).sequenceNumber()); + Assertions.assertEquals("mevahqjdihjol", response.iterator().next().statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, - response.iterator().next().statements().get(0).condition().type()); - Assertions.assertEquals("lmczcxouaneu", - response.iterator().next().statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("qztakov", + Assertions.assertEquals("olmm", response.iterator().next().statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5014050499766158651L, + Assertions.assertEquals(RoutePolicyConditionType.OR, + response.iterator().next().statements().get(0).condition().type()); + Assertions.assertEquals("bm", response.iterator().next().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(1812199928715825554L, response.iterator().next().statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.iterator().next().statements().get(0).action().actionType()); - Assertions.assertEquals("vuxqactoqqehnqi", response.iterator().next().annotation()); + Assertions.assertEquals("yevvuddnwj", response.iterator().next().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, response.iterator().next().addressFamilyType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java index f325b4803da6..33d6a41fffbe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java @@ -1,108 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePoliciesListResult; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePoliciesListResult; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class RoutePoliciesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePoliciesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"kmpwyvlhnh\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":3554896702556402412,\"condition\":{},\"action\":{\"actionType\":\"Permit\"},\"annotation\":\"giflr\"}],\"annotation\":\"got\"},\"location\":\"zwtoidhbxi\",\"tags\":{\"zhlutjsjzels\":\"p\"},\"id\":\"iemv\",\"name\":\"pmeakosysycv\",\"type\":\"de\"},{\"properties\":{\"networkFabricId\":\"hcbsaipusuo\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":4239327806826104427,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"sluazz\"},{\"sequenceNumber\":149979462311042814,\"condition\":{},\"action\":{\"actionType\":\"Continue\"},\"annotation\":\"ugpxzeempup\"},{\"sequenceNumber\":7582568444217997281,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"xr\"}],\"annotation\":\"dczmrjgobekx\"},\"location\":\"eowse\",\"tags\":{\"bmseesacuicnvq\":\"drzzbskiwrjsb\"},\"id\":\"qsuivmrfaptndrmm\",\"name\":\"lh\",\"type\":\"k\"},{\"properties\":{\"networkFabricId\":\"xrqkekcdavi\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":1290612405435899521,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"iuceplbrzgk\"}],\"annotation\":\"rwpqbstweobptsc\"},\"location\":\"ykk\",\"tags\":{\"flsmsbnlyoifg\":\"ayynoyj\",\"cvoevcwfz\":\"fzjqthy\",\"xgbsdzcgcvypj\":\"tkxxlwwo\"},\"id\":\"ubdmg\",\"name\":\"bxehujcqgzwvx\",\"type\":\"iuaoibmjklqrljd\"}],\"nextLink\":\"kylaxrjiqoqovqhg\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"jcvmkkbp\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":3324945329555913943,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"d\"}],\"networkFabricId\":\"iembrwqwvcwc\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"rgpdlbtbxhyfwjfq\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"e\",\"tags\":{\"pbhj\":\"kbqfzbvttqjntvhn\",\"uxyeeafdxsuwly\":\"ugcupcyfrhooyvm\",\"hj\":\"xzhgbspdx\"},\"id\":\"u\",\"name\":\"k\",\"type\":\"xqomzdfaupqve\"},{\"properties\":{\"annotation\":\"zwnkbjqpz\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":2841731151744469955,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"sochtuxap\"},{\"sequenceNumber\":1183271586003783289,\"condition\":{},\"action\":{\"actionType\":\"Permit\"},\"annotation\":\"lbxmynslcvynavwt\"},{\"sequenceNumber\":968921338925482263,\"condition\":{},\"action\":{\"actionType\":\"Permit\"},\"annotation\":\"z\"}],\"networkFabricId\":\"oddcaqi\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"jmjxkhbucmz\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\"},\"location\":\"ktavcebgodjfypla\",\"tags\":{\"bnzot\":\"secedsoqwexi\"},\"id\":\"ikf\",\"name\":\"jqdfadgywyla\",\"type\":\"etqj\"}],\"nextLink\":\"hyst\"}") .toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("zwtoidhbxi", model.value().get(0).location()); - Assertions.assertEquals("p", model.value().get(0).tags().get("zhlutjsjzels")); - Assertions.assertEquals("kmpwyvlhnh", model.value().get(0).networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, model.value().get(0).addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).defaultAction()); - Assertions.assertEquals("giflr", model.value().get(0).statements().get(0).annotation()); - Assertions.assertEquals(3554896702556402412L, model.value().get(0).statements().get(0).sequenceNumber()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, + Assertions.assertEquals("e", model.value().get(0).location()); + Assertions.assertEquals("kbqfzbvttqjntvhn", model.value().get(0).tags().get("pbhj")); + Assertions.assertEquals("jcvmkkbp", model.value().get(0).annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).defaultAction()); + Assertions.assertEquals("d", model.value().get(0).statements().get(0).annotation()); + Assertions.assertEquals(3324945329555913943L, model.value().get(0).statements().get(0).sequenceNumber()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.value().get(0).statements().get(0).action().actionType()); - Assertions.assertEquals("got", model.value().get(0).annotation()); - Assertions.assertEquals("kylaxrjiqoqovqhg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePoliciesListResult model = new RoutePoliciesListResult().withValue(Arrays.asList( - new RoutePolicyInner().withLocation("zwtoidhbxi") - .withTags(mapOf("zhlutjsjzels", "p")) - .withNetworkFabricId("kmpwyvlhnh") - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("giflr") - .withSequenceNumber(3554896702556402412L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.PERMIT)))) - .withAnnotation("got"), - new RoutePolicyInner().withLocation("eowse") - .withTags(mapOf("bmseesacuicnvq", "drzzbskiwrjsb")) - .withNetworkFabricId("hcbsaipusuo") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("sluazz") - .withSequenceNumber(4239327806826104427L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)), - new RoutePolicyStatementProperties().withAnnotation("ugpxzeempup") - .withSequenceNumber(149979462311042814L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.CONTINUE)), - new RoutePolicyStatementProperties().withAnnotation("xr") - .withSequenceNumber(7582568444217997281L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)))) - .withAnnotation("dczmrjgobekx"), - new RoutePolicyInner().withLocation("ykk") - .withTags(mapOf("flsmsbnlyoifg", "ayynoyj", "cvoevcwfz", "fzjqthy", "xgbsdzcgcvypj", "tkxxlwwo")) - .withNetworkFabricId("xrqkekcdavi") - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("iuceplbrzgk") - .withSequenceNumber(1290612405435899521L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)))) - .withAnnotation("rwpqbstweobptsc"))) - .withNextLink("kylaxrjiqoqovqhg"); - model = BinaryData.fromObject(model).toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("zwtoidhbxi", model.value().get(0).location()); - Assertions.assertEquals("p", model.value().get(0).tags().get("zhlutjsjzels")); - Assertions.assertEquals("kmpwyvlhnh", model.value().get(0).networkFabricId()); + Assertions.assertEquals("iembrwqwvcwc", model.value().get(0).networkFabricId()); Assertions.assertEquals(AddressFamilyType.IPV6, model.value().get(0).addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).defaultAction()); - Assertions.assertEquals("giflr", model.value().get(0).statements().get(0).annotation()); - Assertions.assertEquals(3554896702556402412L, model.value().get(0).statements().get(0).sequenceNumber()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, - model.value().get(0).statements().get(0).action().actionType()); - Assertions.assertEquals("got", model.value().get(0).annotation()); - Assertions.assertEquals("kylaxrjiqoqovqhg", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("hyst", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java index 76ac8a4b9545..bdd22ab12294 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -26,122 +26,124 @@ public final class RoutePolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"jf\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":4448738498634238178,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"ztirjvqxvwkiocxo\",\"ipExtendedCommunityIds\":[\"wbuocqflmnlrlqx\"],\"ipCommunityIds\":[\"ate\",\"yozdbc\",\"qnl\"]},\"action\":{\"localPreference\":2247099392682138883,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"hjjidodnvltc\"},{\"sequenceNumber\":9175709040224729929,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wkupbbnhic\",\"ipExtendedCommunityIds\":[\"zhrcqdfwbif\",\"nhlsforsimtfcqm\",\"ynb\",\"pelpfijtezgxmpe\"],\"ipCommunityIds\":[\"madlerzinfuivcz\",\"tllxsw\",\"dapsmir\"]},\"action\":{\"localPreference\":2955918462156050023,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"vdsp\"},{\"sequenceNumber\":2451432701721525303,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wtblgmkokqoi\",\"ipExtendedCommunityIds\":[\"efwlnm\",\"kffcnuestbsl\"],\"ipCommunityIds\":[\"dnccotelik\",\"iytehhxtzxqdwbym\"]},\"action\":{\"localPreference\":1174159606945652119,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"s\"},{\"sequenceNumber\":804072634972443064,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"xdbyhq\",\"ipExtendedCommunityIds\":[\"vimmwc\",\"ozvlfymt\"],\"ipCommunityIds\":[\"v\",\"upqtzckj\"]},\"action\":{\"localPreference\":5472309175848968118,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"xncqz\"}],\"annotation\":\"gt\"},\"location\":\"gdobimor\",\"tags\":{\"bmxqfgvz\":\"xosgihtrxue\",\"osecxlngouf\":\"jqswshesgcs\"},\"id\":\"izp\",\"name\":\"mfxzspf\",\"type\":\"vsl\"}") + "{\"properties\":{\"annotation\":\"mfcfsuiwex\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":8669789560777175436,\"condition\":{\"ipCommunityIds\":[\"mlyxbwslx\",\"cmxtoejt\",\"vqctmlidkxz\"],\"ipExtendedCommunityIds\":[\"uzntbpcadd\",\"x\",\"rxiperrplfm\",\"vmjjfz\"],\"type\":\"And\",\"ipPrefixId\":\"biqqeb\"},\"action\":{\"localPreference\":87253281423455907,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"ahdbtjmkuzonr\"},{\"sequenceNumber\":2233706256650197670,\"condition\":{\"ipCommunityIds\":[\"rxhuqfvp\"],\"ipExtendedCommunityIds\":[\"oqovvcxgqt\"],\"type\":\"Or\",\"ipPrefixId\":\"gopgzatuc\"},\"action\":{\"localPreference\":7239214680202663986,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"quoqhqrcsk\"},{\"sequenceNumber\":6923862865309459951,\"condition\":{\"ipCommunityIds\":[\"lrvuvdagv\",\"jcdpncvfyeqyo\"],\"ipExtendedCommunityIds\":[\"jc\",\"apqhipajsnivnme\",\"ljbcuwrf\",\"pjf\"],\"type\":\"And\",\"ipPrefixId\":\"seodvlmdzgv\"},\"action\":{\"localPreference\":2226713991858156404,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"u\"},{\"sequenceNumber\":414899130636706326,\"condition\":{\"ipCommunityIds\":[\"crsm\",\"ojmxwc\",\"umnru\",\"q\"],\"ipExtendedCommunityIds\":[\"qjftvltj\"],\"type\":\"And\",\"ipPrefixId\":\"vpkbz\"},\"action\":{\"localPreference\":3577296933047235807,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"bbzadzglmuuz\"}],\"networkFabricId\":\"suhsypx\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"frerkqp\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"sbuqfm\",\"tags\":{\"ggnowxhyvdbrdv\":\"jkmnx\",\"usgiikhrcthype\":\"vghbtycvl\",\"dvkymktcwm\":\"xshmrdisc\"},\"id\":\"voxgzegnglafnfga\",\"name\":\"aghddcozwxuxorru\",\"type\":\"uhvemgxlss\"}") .toObject(RoutePolicyInner.class); - Assertions.assertEquals("gdobimor", model.location()); - Assertions.assertEquals("xosgihtrxue", model.tags().get("bmxqfgvz")); - Assertions.assertEquals("jf", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("hjjidodnvltc", model.statements().get(0).annotation()); - Assertions.assertEquals(4448738498634238178L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ate", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("sbuqfm", model.location()); + Assertions.assertEquals("jkmnx", model.tags().get("ggnowxhyvdbrdv")); + Assertions.assertEquals("mfcfsuiwex", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("ahdbtjmkuzonr", model.statements().get(0).annotation()); + Assertions.assertEquals(8669789560777175436L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("mlyxbwslx", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("uzntbpcadd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("ztirjvqxvwkiocxo", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("wbuocqflmnlrlqx", - model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(2247099392682138883L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("gt", model.annotation()); + Assertions.assertEquals("biqqeb", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(87253281423455907L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("suhsypx", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, model.addressFamilyType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RoutePolicyInner model - = new RoutePolicyInner().withLocation("gdobimor") - .withTags(mapOf("bmxqfgvz", "xosgihtrxue", "osecxlngouf", "jqswshesgcs")) - .withNetworkFabricId("jf") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("hjjidodnvltc") - .withSequenceNumber(4448738498634238178L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("ate", "yozdbc", "qnl")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("ztirjvqxvwkiocxo") - .withIpExtendedCommunityIds(Arrays.asList("wbuocqflmnlrlqx"))) - .withAction(new StatementActionProperties() - .withLocalPreference(2247099392682138883L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("vdsp") - .withSequenceNumber(9175709040224729929L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("madlerzinfuivcz", "tllxsw", "dapsmir")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wkupbbnhic") - .withIpExtendedCommunityIds( - Arrays.asList("zhrcqdfwbif", "nhlsforsimtfcqm", "ynb", "pelpfijtezgxmpe"))) - .withAction(new StatementActionProperties().withLocalPreference(2955918462156050023L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("s") - .withSequenceNumber(2451432701721525303L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("dnccotelik", "iytehhxtzxqdwbym")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wtblgmkokqoi") - .withIpExtendedCommunityIds(Arrays.asList("efwlnm", "kffcnuestbsl"))) - .withAction(new StatementActionProperties() - .withLocalPreference(1174159606945652119L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("xncqz") - .withSequenceNumber(804072634972443064L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("v", "upqtzckj")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("xdbyhq") - .withIpExtendedCommunityIds(Arrays.asList("vimmwc", "ozvlfymt"))) - .withAction(new StatementActionProperties().withLocalPreference(5472309175848968118L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))))) - .withAnnotation("gt"); + = new RoutePolicyInner().withLocation("sbuqfm") + .withTags(mapOf("ggnowxhyvdbrdv", "jkmnx", "usgiikhrcthype", "vghbtycvl", "dvkymktcwm", "xshmrdisc")) + .withAnnotation("mfcfsuiwex") + .withDefaultAction(CommunityActionTypes.DENY) + .withStatements( + Arrays + .asList( + new RoutePolicyStatementProperties().withAnnotation("ahdbtjmkuzonr") + .withSequenceNumber(8669789560777175436L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("mlyxbwslx", "cmxtoejt", "vqctmlidkxz")) + .withIpExtendedCommunityIds( + Arrays.asList("uzntbpcadd", "x", "rxiperrplfm", "vmjjfz")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("biqqeb")) + .withAction(new StatementActionProperties().withLocalPreference(87253281423455907L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityProperties() + .withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))), + new RoutePolicyStatementProperties().withAnnotation("quoqhqrcsk") + .withSequenceNumber(2233706256650197670L) + .withCondition( + new StatementConditionProperties().withIpCommunityIds(Arrays.asList("rxhuqfvp")) + .withIpExtendedCommunityIds(Arrays.asList("oqovvcxgqt")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("gopgzatuc")) + .withAction(new StatementActionProperties().withLocalPreference(7239214680202663986L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties( + new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))), + new RoutePolicyStatementProperties().withAnnotation("u") + .withSequenceNumber(6923862865309459951L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("lrvuvdagv", "jcdpncvfyeqyo")) + .withIpExtendedCommunityIds( + Arrays.asList("jc", "apqhipajsnivnme", "ljbcuwrf", "pjf")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("seodvlmdzgv")) + .withAction( + new StatementActionProperties().withLocalPreference(2226713991858156404L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties( + new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))), + new RoutePolicyStatementProperties().withAnnotation("bbzadzglmuuz") + .withSequenceNumber(414899130636706326L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("crsm", "ojmxwc", "umnru", "q")) + .withIpExtendedCommunityIds(Arrays.asList("qjftvltj")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("vpkbz")) + .withAction(new StatementActionProperties().withLocalPreference(3577296933047235807L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties( + new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))))) + .withNetworkFabricId("suhsypx") + .withAddressFamilyType(AddressFamilyType.IPV6); model = BinaryData.fromObject(model).toObject(RoutePolicyInner.class); - Assertions.assertEquals("gdobimor", model.location()); - Assertions.assertEquals("xosgihtrxue", model.tags().get("bmxqfgvz")); - Assertions.assertEquals("jf", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("hjjidodnvltc", model.statements().get(0).annotation()); - Assertions.assertEquals(4448738498634238178L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ate", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("sbuqfm", model.location()); + Assertions.assertEquals("jkmnx", model.tags().get("ggnowxhyvdbrdv")); + Assertions.assertEquals("mfcfsuiwex", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("ahdbtjmkuzonr", model.statements().get(0).annotation()); + Assertions.assertEquals(8669789560777175436L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("mlyxbwslx", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("uzntbpcadd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("ztirjvqxvwkiocxo", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("wbuocqflmnlrlqx", - model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(2247099392682138883L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("gt", model.annotation()); + Assertions.assertEquals("biqqeb", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(87253281423455907L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("suhsypx", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, model.addressFamilyType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java index d5fb6b147346..6c5fe92a6dba 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java @@ -1,21 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -25,99 +25,70 @@ public final class RoutePolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyPatch model = BinaryData.fromString( - "{\"properties\":{\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":5960291481089340541,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"hjcwwva\",\"ipExtendedCommunityIds\":[\"kfavhkhpsp\",\"weifdyfa\"],\"ipCommunityIds\":[\"ng\",\"wnrdp\"]},\"action\":{\"localPreference\":5849652728940512099,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"szamijxejpd\"},{\"sequenceNumber\":7302281233372122767,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"utiye\",\"ipExtendedCommunityIds\":[\"hhjtvh\",\"sznsyovqmqcud\",\"toqwrnfc\"],\"ipCommunityIds\":[\"hlokmxwawfubk\",\"gejjxum\",\"wynjmoozm\"]},\"action\":{\"localPreference\":5927456601729899613,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"o\"},{\"sequenceNumber\":125614563308320468,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"dtstia\",\"ipExtendedCommunityIds\":[\"rnuhcfhepisqbc\",\"lr\",\"i\",\"mmemsoqgblcye\"],\"ipCommunityIds\":[\"bobaqca\",\"ebckcesrsixwnlpj\"]},\"action\":{\"localPreference\":1096091315863363994,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"idzfpsfy\"},{\"sequenceNumber\":7384396009518029284,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"mlxrqkekn\",\"ipExtendedCommunityIds\":[\"qafz\",\"ptriysjrgtruwpu\",\"p\",\"rcek\"],\"ipCommunityIds\":[\"oyd\",\"edggwgclvbwatza\",\"rjbjngoarsr\"]},\"action\":{\"localPreference\":9662774513548733,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"pimrxirqwipzes\"}]},\"tags\":{\"vzjoyxjgahxue\":\"inytkmlfupjzcx\",\"cerfcvcpvf\":\"rdaktnytk\"}}") + "{\"properties\":{\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":2093640883406047481,\"condition\":{\"ipCommunityIds\":[\"yga\",\"yhpwmdkyfg\",\"elvyhvvpuqy\"],\"ipExtendedCommunityIds\":[\"bbkhc\"],\"type\":\"And\",\"ipPrefixId\":\"wo\"},\"action\":{\"localPreference\":1623247197219586993,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"zaupgblnag\"},{\"sequenceNumber\":1523320837225712558,\"condition\":{\"ipCommunityIds\":[\"zhpqscuyileqjz\"],\"ipExtendedCommunityIds\":[\"ebmuiongmndwohoe\",\"s\",\"uxfvbjimzwynsm\"],\"type\":\"And\",\"ipPrefixId\":\"kye\"},\"action\":{\"localPreference\":8048221052456098188,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}},\"annotation\":\"slqreofzrkrzt\"}]},\"tags\":{\"axsymnrtvqmimav\":\"ymhxlnm\",\"hhpkvyqpvzxxzndw\":\"otpcvp\",\"r\":\"omi\"}}") .toObject(RoutePolicyPatch.class); - Assertions.assertEquals("inytkmlfupjzcx", model.tags().get("vzjoyxjgahxue")); + Assertions.assertEquals("ymhxlnm", model.tags().get("axsymnrtvqmimav")); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("szamijxejpd", model.statements().get(0).annotation()); - Assertions.assertEquals(5960291481089340541L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ng", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("zaupgblnag", model.statements().get(0).annotation()); + Assertions.assertEquals(2093640883406047481L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("yga", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("bbkhc", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("hjcwwva", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kfavhkhpsp", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5849652728940512099L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals("wo", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(1623247197219586993L, model.statements().get(0).action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RoutePolicyPatch model = new RoutePolicyPatch() - .withTags(mapOf("vzjoyxjgahxue", "inytkmlfupjzcx", "cerfcvcpvf", "rdaktnytk")) + .withTags(mapOf("axsymnrtvqmimav", "ymhxlnm", "hhpkvyqpvzxxzndw", "otpcvp", "r", "omi")) .withDefaultAction(CommunityActionTypes.PERMIT) .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("szamijxejpd") - .withSequenceNumber(5960291481089340541L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("ng", "wnrdp")) + new RoutePolicyStatementPatchProperties().withAnnotation("zaupgblnag") + .withSequenceNumber(2093640883406047481L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("yga", "yhpwmdkyfg", "elvyhvvpuqy")) + .withIpExtendedCommunityIds(Arrays.asList("bbkhc")) .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("hjcwwva") - .withIpExtendedCommunityIds(Arrays.asList("kfavhkhpsp", "weifdyfa"))) - .withAction(new StatementActionProperties().withLocalPreference(5849652728940512099L) + .withIpPrefixId("wo")) + .withAction(new StatementActionPatchProperties().withLocalPreference(1623247197219586993L) .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) + .withIpCommunityProperties( + new ActionIpCommunityPatchProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) + new ActionIpExtendedCommunityPatchProperties().withAdd(new IpExtendedCommunityIdList()) .withDelete(new IpExtendedCommunityIdList()) .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("o") - .withSequenceNumber(7302281233372122767L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("hlokmxwawfubk", "gejjxum", "wynjmoozm")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("utiye") - .withIpExtendedCommunityIds(Arrays.asList("hhjtvh", "sznsyovqmqcud", "toqwrnfc"))) - .withAction(new StatementActionProperties().withLocalPreference(5927456601729899613L) + new RoutePolicyStatementPatchProperties().withAnnotation("slqreofzrkrzt") + .withSequenceNumber(1523320837225712558L) + .withCondition( + new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList("zhpqscuyileqjz")) + .withIpExtendedCommunityIds(Arrays.asList("ebmuiongmndwohoe", "s", "uxfvbjimzwynsm")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("kye")) + .withAction(new StatementActionPatchProperties().withLocalPreference(8048221052456098188L) .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) + .withIpCommunityProperties( + new ActionIpCommunityPatchProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("idzfpsfy") - .withSequenceNumber(125614563308320468L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("bobaqca", "ebckcesrsixwnlpj")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("dtstia") - .withIpExtendedCommunityIds(Arrays.asList("rnuhcfhepisqbc", "lr", "i", "mmemsoqgblcye"))) - .withAction(new StatementActionProperties().withLocalPreference(1096091315863363994L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("pimrxirqwipzes") - .withSequenceNumber(7384396009518029284L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("oyd", "edggwgclvbwatza", "rjbjngoarsr")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("mlxrqkekn") - .withIpExtendedCommunityIds(Arrays.asList("qafz", "ptriysjrgtruwpu", "p", "rcek"))) - .withAction(new StatementActionProperties().withLocalPreference(9662774513548733L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) + new ActionIpExtendedCommunityPatchProperties().withAdd(new IpExtendedCommunityIdList()) .withDelete(new IpExtendedCommunityIdList()) .withSet(new IpExtendedCommunityIdList()))))); model = BinaryData.fromObject(model).toObject(RoutePolicyPatch.class); - Assertions.assertEquals("inytkmlfupjzcx", model.tags().get("vzjoyxjgahxue")); + Assertions.assertEquals("ymhxlnm", model.tags().get("axsymnrtvqmimav")); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("szamijxejpd", model.statements().get(0).annotation()); - Assertions.assertEquals(5960291481089340541L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ng", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("zaupgblnag", model.statements().get(0).annotation()); + Assertions.assertEquals(2093640883406047481L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("yga", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("bbkhc", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("hjcwwva", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kfavhkhpsp", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5849652728940512099L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals("wo", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(1623247197219586993L, model.statements().get(0).action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java index fc6f60361a10..cfc9d34533f1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java @@ -1,21 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,26 +23,26 @@ public final class RoutePolicyPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyPatchableProperties model = BinaryData.fromString( - "{\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":449688958623242350,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"fgi\",\"ipExtendedCommunityIds\":[\"gg\",\"wdqbxexfyznv\",\"ssuqksl\",\"sfx\"],\"ipCommunityIds\":[\"qbyeywpmoh\",\"rtlikff\",\"dzt\",\"qrf\"]},\"action\":{\"localPreference\":8955635498046885793,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"dteqjmyqxuhg\",\"axnyprijyoxxjxbs\",\"wrrlccklyf\",\"jmspauemqomxoa\"]},\"set\":{\"ipCommunityIds\":[\"yapvibzic\",\"vic\",\"captkhjxnrkbnvf\",\"cklzhznfgvlxy\"]},\"add\":{\"ipCommunityIds\":[\"tigpksywicklktg\",\"dprtqjytdcfe\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"wbvjsbgmlamoa\",\"caytnpkvbpbltcws\",\"xheeocnqo\",\"bvepvlryszfhd\"]},\"set\":{\"ipExtendedCommunityIds\":[\"xohzb\",\"hhavzfuxnvk\",\"slcof\",\"vtf\"]},\"add\":{\"ipExtendedCommunityIds\":[\"uisaklhjfddxqfu\",\"subzsspmj\"]}}},\"annotation\":\"ilfauyvxpq\"},{\"sequenceNumber\":3891325791370492170,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wbztrt\",\"ipExtendedCommunityIds\":[\"wvoglff\",\"dhg\"],\"ipCommunityIds\":[\"rmhbtofcv\"]},\"action\":{\"localPreference\":2118422597275895008,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"ylmnqunkygb\",\"tmsgkwedwl\"]},\"set\":{\"ipCommunityIds\":[\"gbg\",\"hudhrpj\",\"mvrrqfibpk\"]},\"add\":{\"ipCommunityIds\":[\"rlfizju\",\"dndihupngy\",\"ylqya\",\"ewcmodxwuuytxnxr\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"eargvfvkhbjh\",\"vpjxsdhweignybff\",\"cwwynepktvmw\"]},\"set\":{\"ipExtendedCommunityIds\":[\"ny\",\"eb\",\"ijfhpxnikouoxfal\",\"kbskkypo\"]},\"add\":{\"ipExtendedCommunityIds\":[\"ieunbydlgfaphwuu\"]}}},\"annotation\":\"tsaynr\"}]}") + "{\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":740153296759141909,\"condition\":{\"ipCommunityIds\":[\"sfmhbxvewkq\",\"atxvuzccaliry\"],\"ipExtendedCommunityIds\":[\"caq\",\"johlcbnrvxyyhh\"],\"type\":\"And\",\"ipPrefixId\":\"tq\"},\"action\":{\"localPreference\":8541856603295749551,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"w\",\"uukaamimkjz\"]},\"delete\":{\"ipCommunityIds\":[\"jdfxvksijrjgyin\"]},\"set\":{\"ipCommunityIds\":[\"jovuyx\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"addat\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"phvjgvjzykngqyi\",\"jxzxbth\"]},\"set\":{\"ipExtendedCommunityIds\":[\"puonrmdlk\",\"abfcve\"]}}},\"annotation\":\"wxpmgyqshsasm\"},{\"sequenceNumber\":81047502144924284,\"condition\":{\"ipCommunityIds\":[\"t\",\"bxrgrztkyqgu\"],\"ipExtendedCommunityIds\":[\"ihkybgkyncyzj\"],\"type\":\"Or\",\"ipPrefixId\":\"emxiurpfivypmwd\"},\"action\":{\"localPreference\":8122296926620224830,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"poqimy\",\"xnpdggllyduyu\",\"dmzu\",\"xvzvwlxd\"]},\"delete\":{\"ipCommunityIds\":[\"zeurdoxkl\",\"zatsiznymwzldp\",\"ihqhnfubevwad\"]},\"set\":{\"ipCommunityIds\":[\"xevlt\",\"ebq\",\"qiaklqakps\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"twrphmriipzgf\",\"fuadcj\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"qkgt\"]},\"set\":{\"ipExtendedCommunityIds\":[\"gee\"]}}},\"annotation\":\"qlsnr\"},{\"sequenceNumber\":2330916565639610985,\"condition\":{\"ipCommunityIds\":[\"vgjjpfyxhsppvjsd\",\"ouoq\",\"enqsom\",\"ogeqeapas\"],\"ipExtendedCommunityIds\":[\"ppypfreuwvzhnd\",\"vtoiqofzttqg\"],\"type\":\"And\",\"ipPrefixId\":\"yoxzu\"},\"action\":{\"localPreference\":3194194792377697191,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"pivrsgqbmolx\"]},\"delete\":{\"ipCommunityIds\":[\"bzvtvxx\",\"sfoyacgihnal\",\"cuedybkbgdwbmi\",\"zikatywedb\"]},\"set\":{\"ipCommunityIds\":[\"zpa\",\"zbbhxncszdwpave\",\"xgmigsoebd\",\"tniuiim\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"gvcymddo\",\"ilhggaj\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"bobmolj\",\"rchhwlzi\"]},\"set\":{\"ipExtendedCommunityIds\":[\"quajpo\",\"pdj\",\"yotg\",\"raxhntoiwfszkr\"]}}},\"annotation\":\"osjwrretsluqf\"},{\"sequenceNumber\":3083415435588666948,\"condition\":{\"ipCommunityIds\":[\"imioixviobuwbnge\"],\"ipExtendedCommunityIds\":[\"dqngqamhb\"],\"type\":\"Or\",\"ipPrefixId\":\"qxn\"},\"action\":{\"localPreference\":5673373577449798896,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"odokstkvomdqxno\"]},\"delete\":{\"ipCommunityIds\":[\"papi\",\"ccydbjghunqnttrw\",\"cbzvvxd\"]},\"set\":{\"ipCommunityIds\":[\"mwwvxcaicbic\",\"ogsfovkmam\",\"y\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"ukcy\",\"aalbkubzqazd\",\"rkvit\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"qbxmnnidotmp\",\"mzuhoodttqhpv\",\"rum\"]},\"set\":{\"ipExtendedCommunityIds\":[\"yu\",\"qfpqqllavzlh\",\"gmrodb\",\"apqra\"]}}},\"annotation\":\"vtniwfcubwhxmyib\"}]}") .toObject(RoutePolicyPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("ilfauyvxpq", model.statements().get(0).annotation()); - Assertions.assertEquals(449688958623242350L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("qbyeywpmoh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); - Assertions.assertEquals("fgi", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("gg", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(8955635498046885793L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("tigpksywicklktg", + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("wxpmgyqshsasm", model.statements().get(0).annotation()); + Assertions.assertEquals(740153296759141909L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("sfmhbxvewkq", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("caq", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); + Assertions.assertEquals("tq", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8541856603295749551L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("w", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dteqjmyqxuhg", + Assertions.assertEquals("jdfxvksijrjgyin", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("yapvibzic", + Assertions.assertEquals("jovuyx", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("uisaklhjfddxqfu", + Assertions.assertEquals("addat", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("wbvjsbgmlamoa", + Assertions.assertEquals("phvjgvjzykngqyi", model.statements() .get(0) .action() @@ -50,79 +50,134 @@ public void testDeserialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("xohzb", + Assertions.assertEquals("puonrmdlk", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyPatchableProperties model = new RoutePolicyPatchableProperties() - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("ilfauyvxpq") - .withSequenceNumber(449688958623242350L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("qbyeywpmoh", "rtlikff", "dzt", "qrf")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("fgi") - .withIpExtendedCommunityIds(Arrays.asList("gg", "wdqbxexfyznv", "ssuqksl", "sfx"))) - .withAction(new StatementActionProperties().withLocalPreference(8955635498046885793L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("tigpksywicklktg", "dprtqjytdcfe"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("dteqjmyqxuhg", "axnyprijyoxxjxbs", "wrrlccklyf", "jmspauemqomxoa"))) - .withSet(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("yapvibzic", "vic", "captkhjxnrkbnvf", "cklzhznfgvlxy")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("uisaklhjfddxqfu", "subzsspmj"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("wbvjsbgmlamoa", "caytnpkvbpbltcws", "xheeocnqo", "bvepvlryszfhd"))) - .withSet(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xohzb", "hhavzfuxnvk", "slcof", "vtf"))))), - new RoutePolicyStatementProperties().withAnnotation("tsaynr") - .withSequenceNumber(3891325791370492170L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("rmhbtofcv")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wbztrt") - .withIpExtendedCommunityIds(Arrays.asList("wvoglff", "dhg"))) - .withAction(new StatementActionProperties().withLocalPreference(2118422597275895008L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("rlfizju", "dndihupngy", "ylqya", "ewcmodxwuuytxnxr"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ylmnqunkygb", "tmsgkwedwl"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("gbg", "hudhrpj", "mvrrqfibpk")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ieunbydlgfaphwuu"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("eargvfvkhbjh", "vpjxsdhweignybff", "cwwynepktvmw"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("ny", "eb", "ijfhpxnikouoxfal", "kbskkypo"))))))); + RoutePolicyPatchableProperties model + = new RoutePolicyPatchableProperties().withDefaultAction(CommunityActionTypes.DENY) + .withStatements( + Arrays + .asList( + new RoutePolicyStatementPatchProperties().withAnnotation("wxpmgyqshsasm") + .withSequenceNumber(740153296759141909L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("sfmhbxvewkq", "atxvuzccaliry")) + .withIpExtendedCommunityIds(Arrays.asList("caq", "johlcbnrvxyyhh")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("tq")) + .withAction(new StatementActionPatchProperties() + .withLocalPreference(8541856603295749551L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("w", "uukaamimkjz"))) + .withDelete(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("jdfxvksijrjgyin"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("jovuyx")))) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("addat"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("phvjgvjzykngqyi", "jxzxbth"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("puonrmdlk", "abfcve"))))), + new RoutePolicyStatementPatchProperties().withAnnotation("qlsnr") + .withSequenceNumber(81047502144924284L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("t", "bxrgrztkyqgu")) + .withIpExtendedCommunityIds(Arrays.asList("ihkybgkyncyzj")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("emxiurpfivypmwd")) + .withAction( + new StatementActionPatchProperties().withLocalPreference(8122296926620224830L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("poqimy", "xnpdggllyduyu", "dmzu", "xvzvwlxd"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("zeurdoxkl", "zatsiznymwzldp", "ihqhnfubevwad"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("xevlt", "ebq", "qiaklqakps")))) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("twrphmriipzgf", "fuadcj"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("qkgt"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("gee"))))), + new RoutePolicyStatementPatchProperties().withAnnotation("osjwrretsluqf") + .withSequenceNumber(2330916565639610985L) + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds( + Arrays.asList("vgjjpfyxhsppvjsd", "ouoq", "enqsom", "ogeqeapas")) + .withIpExtendedCommunityIds(Arrays.asList("ppypfreuwvzhnd", "vtoiqofzttqg")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("yoxzu")) + .withAction(new StatementActionPatchProperties() + .withLocalPreference(3194194792377697191L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("pivrsgqbmolx"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("bzvtvxx", "sfoyacgihnal", "cuedybkbgdwbmi", "zikatywedb"))) + .withSet(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("zpa", "zbbhxncszdwpave", "xgmigsoebd", "tniuiim")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("gvcymddo", "ilhggaj"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("bobmolj", "rchhwlzi"))) + .withSet( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("quajpo", "pdj", "yotg", "raxhntoiwfszkr"))))), + new RoutePolicyStatementPatchProperties().withAnnotation("vtniwfcubwhxmyib") + .withSequenceNumber(3083415435588666948L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("imioixviobuwbnge")) + .withIpExtendedCommunityIds(Arrays.asList("dqngqamhb")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("qxn")) + .withAction(new StatementActionPatchProperties() + .withLocalPreference(5673373577449798896L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("odokstkvomdqxno"))) + .withDelete(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("papi", "ccydbjghunqnttrw", "cbzvvxd"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("mwwvxcaicbic", "ogsfovkmam", "y")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("ukcy", "aalbkubzqazd", "rkvit"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("qbxmnnidotmp", "mzuhoodttqhpv", "rum"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("yu", "qfpqqllavzlh", "gmrodb", "apqra"))))))); model = BinaryData.fromObject(model).toObject(RoutePolicyPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("ilfauyvxpq", model.statements().get(0).annotation()); - Assertions.assertEquals(449688958623242350L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("qbyeywpmoh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); - Assertions.assertEquals("fgi", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("gg", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(8955635498046885793L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("tigpksywicklktg", + Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); + Assertions.assertEquals("wxpmgyqshsasm", model.statements().get(0).annotation()); + Assertions.assertEquals(740153296759141909L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("sfmhbxvewkq", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("caq", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); + Assertions.assertEquals("tq", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8541856603295749551L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("w", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dteqjmyqxuhg", + Assertions.assertEquals("jdfxvksijrjgyin", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("yapvibzic", + Assertions.assertEquals("jovuyx", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("uisaklhjfddxqfu", + Assertions.assertEquals("addat", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("wbvjsbgmlamoa", + Assertions.assertEquals("phvjgvjzykngqyi", model.statements() .get(0) .action() @@ -130,7 +185,7 @@ public void testSerialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("xohzb", + Assertions.assertEquals("puonrmdlk", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java index aa22bfd60781..6267f28a97b9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -24,29 +24,27 @@ public final class RoutePolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"zipplxg\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":244241643935550643,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"z\",\"ipExtendedCommunityIds\":[\"kwxfugfzizyxd\",\"yjnqzbrqcakmfckv\",\"yjucamnsb\"],\"ipCommunityIds\":[\"twhmucjiuhcxyveh\",\"klely\",\"dvpqfbxgy\"]},\"action\":{\"localPreference\":535781383491737294,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"qlefnohey\"]},\"set\":{\"ipCommunityIds\":[\"pkyll\",\"ey\",\"nj\",\"w\"]},\"add\":{\"ipCommunityIds\":[\"w\",\"wrsvevcn\",\"qswxhqhgkhtbzvul\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"ncpmyh\",\"xgdmvghcmixmlwkf\"]},\"set\":{\"ipExtendedCommunityIds\":[\"yjrtalqeebu\",\"fyim\",\"oaezktomsgoihlq\"]},\"add\":{\"ipExtendedCommunityIds\":[\"aazbaeeekfzt\",\"n\",\"bfb\"]}}},\"annotation\":\"ow\"},{\"sequenceNumber\":1344289763375947200,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"xhmewyaol\",\"ipExtendedCommunityIds\":[\"x\",\"rdpuyytbpkrp\",\"hqetp\",\"enefnoafpcnrx\"],\"ipCommunityIds\":[\"xowvhufcmuaj\",\"blx\",\"htozfrfaw\",\"nnsvrfajynihti\"]},\"action\":{\"localPreference\":7910534423394817555,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"uctblfehbgcgyoh\",\"cmeqljxdum\"]},\"set\":{\"ipCommunityIds\":[\"onebldxa\",\"mdfjwcngkwxjsj\",\"uvohufzdtsrp\"]},\"add\":{\"ipCommunityIds\":[\"zacrzhnsbylgmgbh\",\"qczouanbfulvcxgl\",\"oqwb\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"bzbwbgwzhbhfljey\",\"dpiov\",\"lhrwyakzuafapwx\"]},\"set\":{\"ipExtendedCommunityIds\":[\"atjiobnirgoextqd\",\"wtgntimznupb\",\"tbsetko\"]},\"add\":{\"ipExtendedCommunityIds\":[\"hedaakghcrzmm\"]}}},\"annotation\":\"yvdhdgdiwmlg\"},{\"sequenceNumber\":8604498652692523406,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"qjisjmolzcaqf\",\"ipExtendedCommunityIds\":[\"hgkrv\"],\"ipCommunityIds\":[\"cvytv\",\"ejqaw\"]},\"action\":{\"localPreference\":5965499479787157061,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"czbdypbbimh\",\"bozvo\"]},\"set\":{\"ipCommunityIds\":[\"lnh\"]},\"add\":{\"ipCommunityIds\":[\"uzlybqs\",\"ibvylkv\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"nwqhawvcnvi\",\"lbylmgjzrycwpbgu\",\"whm\"]},\"set\":{\"ipExtendedCommunityIds\":[\"knsastlpsmgomi\",\"ttrvlvvjmxokxxa\",\"qecjrzvlcivqx\",\"emklphx\"]},\"add\":{\"ipExtendedCommunityIds\":[\"ojk\",\"gnfbrzj\",\"fsunh\"]}}},\"annotation\":\"vlahxczywy\"}],\"annotation\":\"ahwcorewcnn\"}") + "{\"annotation\":\"qyp\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":5806615201815447926,\"condition\":{\"ipCommunityIds\":[\"rkqvrv\",\"dojcvzfcmxmjpjak\"],\"ipExtendedCommunityIds\":[\"uod\",\"cg\",\"u\"],\"type\":\"Or\",\"ipPrefixId\":\"xp\"},\"action\":{\"localPreference\":728407182731221314,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"n\",\"qikdipkxsqkuzabr\"]},\"delete\":{\"ipCommunityIds\":[\"atajdtacvsynss\",\"ylsuioado\",\"sjyiehkxgfuzq\"]},\"set\":{\"ipCommunityIds\":[\"wlxqdsxip\",\"nlbyitfz\",\"wwgze\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"imxacrkt\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"ynsixgz\",\"bn\",\"glquarbru\",\"qbeyxwrmu\"]},\"set\":{\"ipExtendedCommunityIds\":[\"xzb\",\"gjajkvwko\",\"xfbdzllvnatbg\",\"lpgfygenfak\"]}}},\"annotation\":\"epsihzqieo\"}],\"networkFabricId\":\"m\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"jsfgbyyts\"},\"configurationState\":\"PendingAdministrativeUpdate\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"}") .toObject(RoutePolicyProperties.class); - Assertions.assertEquals("ahwcorewcnn", model.annotation()); - Assertions.assertEquals("zipplxg", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("ow", model.statements().get(0).annotation()); - Assertions.assertEquals(244241643935550643L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("twhmucjiuhcxyveh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("z", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kwxfugfzizyxd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(535781383491737294L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.statements().get(0).action().actionType()); - Assertions.assertEquals("w", + Assertions.assertEquals("qyp", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("epsihzqieo", model.statements().get(0).annotation()); + Assertions.assertEquals(5806615201815447926L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("rkqvrv", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("uod", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); + Assertions.assertEquals("xp", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(728407182731221314L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); + Assertions.assertEquals("n", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("qlefnohey", + Assertions.assertEquals("atajdtacvsynss", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pkyll", + Assertions.assertEquals("wlxqdsxip", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("aazbaeeekfzt", + Assertions.assertEquals("imxacrkt", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ncpmyh", + Assertions.assertEquals("ynsixgz", model.statements() .get(0) .action() @@ -54,106 +52,61 @@ public void testDeserialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("yjrtalqeebu", + Assertions.assertEquals("xzb", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("m", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyProperties model = new RoutePolicyProperties().withAnnotation("ahwcorewcnn") - .withNetworkFabricId("zipplxg") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("ow") - .withSequenceNumber(244241643935550643L) + RoutePolicyProperties model + = new RoutePolicyProperties().withAnnotation("qyp") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("epsihzqieo") + .withSequenceNumber(5806615201815447926L) .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("twhmucjiuhcxyveh", "klely", "dvpqfbxgy")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("z") - .withIpExtendedCommunityIds(Arrays.asList("kwxfugfzizyxd", "yjnqzbrqcakmfckv", "yjucamnsb"))) - .withAction( - new StatementActionProperties().withLocalPreference(535781383491737294L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("w", "wrsvevcn", "qswxhqhgkhtbzvul"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("qlefnohey"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("pkyll", "ey", "nj", "w")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("aazbaeeekfzt", "n", "bfb"))) - .withDelete(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ncpmyh", "xgdmvghcmixmlwkf"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("yjrtalqeebu", "fyim", "oaezktomsgoihlq"))))), - new RoutePolicyStatementProperties().withAnnotation("yvdhdgdiwmlg") - .withSequenceNumber(1344289763375947200L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("xowvhufcmuaj", "blx", "htozfrfaw", "nnsvrfajynihti")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("xhmewyaol") - .withIpExtendedCommunityIds(Arrays.asList("x", "rdpuyytbpkrp", "hqetp", "enefnoafpcnrx"))) - .withAction(new StatementActionProperties().withLocalPreference(7910534423394817555L) - .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityIds(Arrays.asList("rkqvrv", "dojcvzfcmxmjpjak")) + .withIpExtendedCommunityIds(Arrays.asList("uod", "cg", "u")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("xp")) + .withAction(new StatementActionProperties().withLocalPreference(728407182731221314L) + .withActionType(RoutePolicyActionType.DENY) .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("zacrzhnsbylgmgbh", "qczouanbfulvcxgl", "oqwb"))) + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("n", "qikdipkxsqkuzabr"))) .withDelete(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("uctblfehbgcgyoh", "cmeqljxdum"))) + .withIpCommunityIds(Arrays.asList("atajdtacvsynss", "ylsuioado", "sjyiehkxgfuzq"))) .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("onebldxa", "mdfjwcngkwxjsj", "uvohufzdtsrp")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("hedaakghcrzmm"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("bzbwbgwzhbhfljey", "dpiov", "lhrwyakzuafapwx"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("atjiobnirgoextqd", "wtgntimznupb", "tbsetko"))))), - new RoutePolicyStatementProperties().withAnnotation("vlahxczywy") - .withSequenceNumber(8604498652692523406L) - .withCondition( - new StatementConditionProperties().withIpCommunityIds(Arrays.asList("cvytv", "ejqaw")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("qjisjmolzcaqf") - .withIpExtendedCommunityIds(Arrays.asList("hgkrv"))) - .withAction(new StatementActionProperties().withLocalPreference(5965499479787157061L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("uzlybqs", "ibvylkv"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("czbdypbbimh", "bozvo"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("lnh")))) + .withIpCommunityIds(Arrays.asList("wlxqdsxip", "nlbyitfz", "wwgze")))) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ojk", "gnfbrzj", "fsunh"))) + .withAdd( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("imxacrkt"))) .withDelete(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("nwqhawvcnvi", "lbylmgjzrycwpbgu", "whm"))) + .withIpExtendedCommunityIds(Arrays.asList("ynsixgz", "bn", "glquarbru", "qbeyxwrmu"))) .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("knsastlpsmgomi", "ttrvlvvjmxokxxa", "qecjrzvlcivqx", "emklphx"))))))); + Arrays.asList("xzb", "gjajkvwko", "xfbdzllvnatbg", "lpgfygenfak"))))))) + .withNetworkFabricId("m") + .withAddressFamilyType(AddressFamilyType.IPV4); model = BinaryData.fromObject(model).toObject(RoutePolicyProperties.class); - Assertions.assertEquals("ahwcorewcnn", model.annotation()); - Assertions.assertEquals("zipplxg", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("ow", model.statements().get(0).annotation()); - Assertions.assertEquals(244241643935550643L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("twhmucjiuhcxyveh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("z", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kwxfugfzizyxd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(535781383491737294L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.statements().get(0).action().actionType()); - Assertions.assertEquals("w", + Assertions.assertEquals("qyp", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); + Assertions.assertEquals("epsihzqieo", model.statements().get(0).annotation()); + Assertions.assertEquals(5806615201815447926L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("rkqvrv", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("uod", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); + Assertions.assertEquals("xp", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(728407182731221314L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); + Assertions.assertEquals("n", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("qlefnohey", + Assertions.assertEquals("atajdtacvsynss", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pkyll", + Assertions.assertEquals("wlxqdsxip", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("aazbaeeekfzt", + Assertions.assertEquals("imxacrkt", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ncpmyh", + Assertions.assertEquals("ynsixgz", model.statements() .get(0) .action() @@ -161,7 +114,9 @@ public void testSerialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("yjrtalqeebu", + Assertions.assertEquals("xzb", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("m", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java new file mode 100644 index 000000000000..3fb4f9374704 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoutePolicyStatementPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePolicyStatementPatchProperties model = BinaryData.fromString( + "{\"sequenceNumber\":6552637583211214033,\"condition\":{\"ipCommunityIds\":[\"cttg\",\"kxtcxb\",\"jbeyqohviawp\"],\"ipExtendedCommunityIds\":[\"rare\",\"dlgbvtpxow\"],\"type\":\"And\",\"ipPrefixId\":\"docjasuamegjkfis\"},\"action\":{\"localPreference\":4327040815306864873,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"w\",\"sloblitxr\"]},\"delete\":{\"ipCommunityIds\":[\"c\",\"sanjsou\",\"rztog\",\"jgb\"]},\"set\":{\"ipCommunityIds\":[\"hwkzfggsuzkvda\",\"tpzu\",\"wazoabthutctc\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"abzfihsz\",\"kpoidfzwegvu\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"gweccvufj\",\"vf\",\"fsssmy\",\"emkrhbsdgktluifi\"]},\"set\":{\"ipExtendedCommunityIds\":[\"cpenobqysbees\",\"qb\"]}}},\"annotation\":\"aerszsufzsa\"}") + .toObject(RoutePolicyStatementPatchProperties.class); + Assertions.assertEquals("aerszsufzsa", model.annotation()); + Assertions.assertEquals(6552637583211214033L, model.sequenceNumber()); + Assertions.assertEquals("cttg", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("rare", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("docjasuamegjkfis", model.condition().ipPrefixId()); + Assertions.assertEquals(4327040815306864873L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); + Assertions.assertEquals("w", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("c", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("hwkzfggsuzkvda", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("abzfihsz", + model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gweccvufj", + model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("cpenobqysbees", + model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePolicyStatementPatchProperties model + = new RoutePolicyStatementPatchProperties().withAnnotation("aerszsufzsa") + .withSequenceNumber(6552637583211214033L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("cttg", "kxtcxb", "jbeyqohviawp")) + .withIpExtendedCommunityIds(Arrays.asList("rare", "dlgbvtpxow")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("docjasuamegjkfis")) + .withAction(new StatementActionPatchProperties().withLocalPreference(4327040815306864873L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("w", "sloblitxr"))) + .withDelete( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("c", "sanjsou", "rztog", "jgb"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("hwkzfggsuzkvda", "tpzu", "wazoabthutctc")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("abzfihsz", "kpoidfzwegvu"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("gweccvufj", "vf", "fsssmy", "emkrhbsdgktluifi"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("cpenobqysbees", "qb"))))); + model = BinaryData.fromObject(model).toObject(RoutePolicyStatementPatchProperties.class); + Assertions.assertEquals("aerszsufzsa", model.annotation()); + Assertions.assertEquals(6552637583211214033L, model.sequenceNumber()); + Assertions.assertEquals("cttg", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("rare", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("docjasuamegjkfis", model.condition().ipPrefixId()); + Assertions.assertEquals(4327040815306864873L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); + Assertions.assertEquals("w", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("c", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("hwkzfggsuzkvda", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("abzfihsz", + model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gweccvufj", + model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("cpenobqysbees", + model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java index 04f666ee172c..58ca30f13dbf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -21,70 +21,64 @@ public final class RoutePolicyStatementPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyStatementProperties model = BinaryData.fromString( - "{\"sequenceNumber\":7155823942423502567,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"eeoxvqjmrnbl\",\"ipExtendedCommunityIds\":[\"dbfbmdiv\",\"xzhpjgqzmiaoawea\",\"fxaubuhruetcnx\"],\"ipCommunityIds\":[\"zzdckhs\",\"drrjsu\",\"nowobwx\"]},\"action\":{\"localPreference\":836975660473857424,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"sfjfouqjpzheahu\",\"kqxqkva\"]},\"set\":{\"ipCommunityIds\":[\"ymudj\",\"aajzdebhsermcl\"]},\"add\":{\"ipCommunityIds\":[\"uhyqkaaptbssv\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"twybloccuhplxzbn\",\"shvqnpszbeuyb\",\"tc\",\"zjfjtvpey\"]},\"set\":{\"ipExtendedCommunityIds\":[\"xurxrltqmmijgp\",\"fkwnaeikczscymqf\"]},\"add\":{\"ipExtendedCommunityIds\":[\"pqnyumzapdok\"]}}},\"annotation\":\"vpezknfzqnzbflbq\"}") + "{\"sequenceNumber\":4580399490762319649,\"condition\":{\"ipCommunityIds\":[\"khqbuoyrbdkgqd\"],\"ipExtendedCommunityIds\":[\"vjmfjjf\"],\"type\":\"And\",\"ipPrefixId\":\"sveamsea\"},\"action\":{\"localPreference\":8305272475169816409,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"glmufzuuyszhae\"]},\"delete\":{\"ipCommunityIds\":[\"osdpxtsdyw\",\"gef\"]},\"set\":{\"ipCommunityIds\":[\"phwxia\",\"wmixaqgfpuhhzwrs\",\"umlkjsv\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"ixalphkgminh\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"djdjmsngmluy\"]},\"set\":{\"ipExtendedCommunityIds\":[\"i\"]}}},\"annotation\":\"mrmrjpjthizsa\"}") .toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("vpezknfzqnzbflbq", model.annotation()); - Assertions.assertEquals(7155823942423502567L, model.sequenceNumber()); - Assertions.assertEquals("zzdckhs", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.condition().type()); - Assertions.assertEquals("eeoxvqjmrnbl", model.condition().ipPrefixId()); - Assertions.assertEquals("dbfbmdiv", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(836975660473857424L, model.action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); - Assertions.assertEquals("uhyqkaaptbssv", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("sfjfouqjpzheahu", - model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("ymudj", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("pqnyumzapdok", + Assertions.assertEquals("mrmrjpjthizsa", model.annotation()); + Assertions.assertEquals(4580399490762319649L, model.sequenceNumber()); + Assertions.assertEquals("khqbuoyrbdkgqd", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("vjmfjjf", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("sveamsea", model.condition().ipPrefixId()); + Assertions.assertEquals(8305272475169816409L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.action().actionType()); + Assertions.assertEquals("glmufzuuyszhae", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("osdpxtsdyw", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("phwxia", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("ixalphkgminh", model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("twybloccuhplxzbn", + Assertions.assertEquals("djdjmsngmluy", model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("xurxrltqmmijgp", + Assertions.assertEquals("i", model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyStatementProperties model - = new RoutePolicyStatementProperties().withAnnotation("vpezknfzqnzbflbq") - .withSequenceNumber(7155823942423502567L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("zzdckhs", "drrjsu", "nowobwx")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("eeoxvqjmrnbl") - .withIpExtendedCommunityIds(Arrays.asList("dbfbmdiv", "xzhpjgqzmiaoawea", "fxaubuhruetcnx"))) - .withAction(new StatementActionProperties().withLocalPreference(836975660473857424L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("uhyqkaaptbssv"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("sfjfouqjpzheahu", "kqxqkva"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ymudj", "aajzdebhsermcl")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd( - new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("pqnyumzapdok"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("twybloccuhplxzbn", "shvqnpszbeuyb", "tc", "zjfjtvpey"))) - .withSet(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xurxrltqmmijgp", "fkwnaeikczscymqf"))))); + RoutePolicyStatementProperties model = new RoutePolicyStatementProperties().withAnnotation("mrmrjpjthizsa") + .withSequenceNumber(4580399490762319649L) + .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("khqbuoyrbdkgqd")) + .withIpExtendedCommunityIds(Arrays.asList("vjmfjjf")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("sveamsea")) + .withAction(new StatementActionProperties().withLocalPreference(8305272475169816409L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("glmufzuuyszhae"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("osdpxtsdyw", "gef"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("phwxia", "wmixaqgfpuhhzwrs", "umlkjsv")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ixalphkgminh"))) + .withDelete( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("djdjmsngmluy"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("i"))))); model = BinaryData.fromObject(model).toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("vpezknfzqnzbflbq", model.annotation()); - Assertions.assertEquals(7155823942423502567L, model.sequenceNumber()); - Assertions.assertEquals("zzdckhs", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.condition().type()); - Assertions.assertEquals("eeoxvqjmrnbl", model.condition().ipPrefixId()); - Assertions.assertEquals("dbfbmdiv", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(836975660473857424L, model.action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); - Assertions.assertEquals("uhyqkaaptbssv", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("sfjfouqjpzheahu", - model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("ymudj", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("pqnyumzapdok", + Assertions.assertEquals("mrmrjpjthizsa", model.annotation()); + Assertions.assertEquals(4580399490762319649L, model.sequenceNumber()); + Assertions.assertEquals("khqbuoyrbdkgqd", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("vjmfjjf", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("sveamsea", model.condition().ipPrefixId()); + Assertions.assertEquals(8305272475169816409L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.action().actionType()); + Assertions.assertEquals("glmufzuuyszhae", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("osdpxtsdyw", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("phwxia", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("ixalphkgminh", model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("twybloccuhplxzbn", + Assertions.assertEquals("djdjmsngmluy", model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("xurxrltqmmijgp", + Assertions.assertEquals("i", model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..cab14a5b1f82 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class RoutePrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePrefixLimitPatchProperties model + = BinaryData.fromString("{\"hardLimit\":476616488,\"threshold\":606826553}") + .toObject(RoutePrefixLimitPatchProperties.class); + Assertions.assertEquals(476616488, model.hardLimit()); + Assertions.assertEquals(606826553, model.threshold()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePrefixLimitPatchProperties model + = new RoutePrefixLimitPatchProperties().withHardLimit(476616488).withThreshold(606826553); + model = BinaryData.fromObject(model).toObject(RoutePrefixLimitPatchProperties.class); + Assertions.assertEquals(476616488, model.hardLimit()); + Assertions.assertEquals(606826553, model.threshold()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..ff9958156d9e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class RoutePrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePrefixLimitProperties model = BinaryData.fromString("{\"hardLimit\":1232558880,\"threshold\":918409300}") + .toObject(RoutePrefixLimitProperties.class); + Assertions.assertEquals(1232558880, model.hardLimit()); + Assertions.assertEquals(918409300, model.threshold()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePrefixLimitProperties model + = new RoutePrefixLimitProperties().withHardLimit(1232558880).withThreshold(918409300); + model = BinaryData.fromObject(model).toObject(RoutePrefixLimitProperties.class); + Assertions.assertEquals(1232558880, model.hardLimit()); + Assertions.assertEquals(918409300, model.threshold()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java index 7db04fe30785..4a884c418861 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,25 +13,25 @@ public final class RouteTargetInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RouteTargetInformation model = BinaryData.fromString( - "{\"importIpv4RouteTargets\":[\"cmh\",\"dfjeceho\",\"wcpqtwl\"],\"importIpv6RouteTargets\":[\"qrg\",\"vrbnyrukoil\",\"ciduwjle\",\"pjlh\"],\"exportIpv4RouteTargets\":[\"p\",\"ruzythqkkwhbg\",\"vellvulnxdmnitm\"],\"exportIpv6RouteTargets\":[\"tvmcly\"]}") + "{\"importIpv4RouteTargets\":[\"vqokql\",\"jqgir\"],\"importIpv6RouteTargets\":[\"lyvxchp\"],\"exportIpv4RouteTargets\":[\"tsfaeuh\",\"wsknstvzuzhasup\",\"lppdpgz\",\"zqazvb\"],\"exportIpv6RouteTargets\":[\"kptgongruat\",\"yiysjqheni\",\"beqngubabyjde\",\"ysc\"]}") .toObject(RouteTargetInformation.class); - Assertions.assertEquals("cmh", model.importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qrg", model.importIpv6RouteTargets().get(0)); - Assertions.assertEquals("p", model.exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("tvmcly", model.exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("vqokql", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("lyvxchp", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tsfaeuh", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("kptgongruat", model.exportIpv6RouteTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RouteTargetInformation model - = new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("cmh", "dfjeceho", "wcpqtwl")) - .withImportIpv6RouteTargets(Arrays.asList("qrg", "vrbnyrukoil", "ciduwjle", "pjlh")) - .withExportIpv4RouteTargets(Arrays.asList("p", "ruzythqkkwhbg", "vellvulnxdmnitm")) - .withExportIpv6RouteTargets(Arrays.asList("tvmcly")); + = new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("vqokql", "jqgir")) + .withImportIpv6RouteTargets(Arrays.asList("lyvxchp")) + .withExportIpv4RouteTargets(Arrays.asList("tsfaeuh", "wsknstvzuzhasup", "lppdpgz", "zqazvb")) + .withExportIpv6RouteTargets(Arrays.asList("kptgongruat", "yiysjqheni", "beqngubabyjde", "ysc")); model = BinaryData.fromObject(model).toObject(RouteTargetInformation.class); - Assertions.assertEquals("cmh", model.importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qrg", model.importIpv6RouteTargets().get(0)); - Assertions.assertEquals("p", model.exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("tvmcly", model.exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("vqokql", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("lyvxchp", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tsfaeuh", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("kptgongruat", model.exportIpv6RouteTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java new file mode 100644 index 000000000000..2d17ce453ac4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RouteTargetPatchInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RouteTargetPatchInformation model = BinaryData.fromString( + "{\"importIpv4RouteTargets\":[\"auqmllfeoth\"],\"importIpv6RouteTargets\":[\"rigrjdljlkq\",\"vkrbzkuastaxklpr\",\"ulhgltoiz\",\"xvsc\"],\"exportIpv4RouteTargets\":[\"fyy\",\"ky\"],\"exportIpv6RouteTargets\":[\"afxcz\",\"fcck\"]}") + .toObject(RouteTargetPatchInformation.class); + Assertions.assertEquals("auqmllfeoth", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("rigrjdljlkq", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fyy", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("afxcz", model.exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RouteTargetPatchInformation model + = new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("auqmllfeoth")) + .withImportIpv6RouteTargets(Arrays.asList("rigrjdljlkq", "vkrbzkuastaxklpr", "ulhgltoiz", "xvsc")) + .withExportIpv4RouteTargets(Arrays.asList("fyy", "ky")) + .withExportIpv6RouteTargets(Arrays.asList("afxcz", "fcck")); + model = BinaryData.fromObject(model).toObject(RouteTargetPatchInformation.class); + Assertions.assertEquals("auqmllfeoth", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("rigrjdljlkq", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fyy", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("afxcz", model.exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java index 70c9a321e859..13146f8ed55e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -13,18 +15,38 @@ public final class RulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RuleProperties model = BinaryData.fromString("{\"action\":\"Deny\",\"addressList\":[\"mozusgzvlnsnnjz\"]}") + RuleProperties model = BinaryData.fromString( + "{\"action\":\"Allow\",\"addressList\":[\"ftptnuwj\"],\"condition\":\"And\",\"destinationAddressList\":[\"gcgqyhleseyqrhvy\"],\"sourceAddressList\":[\"otjvdkwiswskukjt\",\"sbvw\"],\"headerAddressList\":[{\"headerName\":\"xkdtxfkndlqvtwkn\",\"addressList\":[\"mb\",\"gtywatmqaqkue\",\"tgroesh\",\"ygzc\"]},{\"headerName\":\"fqxkfaoyteh\",\"addressList\":[\"vjmvqmtdwckygr\",\"ejnndljdju\"]},{\"headerName\":\"br\",\"addressList\":[\"ynkceysfaqegpl\"]}]}") .toObject(RuleProperties.class); - Assertions.assertEquals(Action.DENY, model.action()); - Assertions.assertEquals("mozusgzvlnsnnjz", model.addressList().get(0)); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("ftptnuwj", model.addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.condition()); + Assertions.assertEquals("gcgqyhleseyqrhvy", model.destinationAddressList().get(0)); + Assertions.assertEquals("otjvdkwiswskukjt", model.sourceAddressList().get(0)); + Assertions.assertEquals("xkdtxfkndlqvtwkn", model.headerAddressList().get(0).headerName()); + Assertions.assertEquals("mb", model.headerAddressList().get(0).addressList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RuleProperties model - = new RuleProperties().withAction(Action.DENY).withAddressList(Arrays.asList("mozusgzvlnsnnjz")); + RuleProperties model = new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("ftptnuwj")) + .withCondition(RuleCondition.AND) + .withDestinationAddressList(Arrays.asList("gcgqyhleseyqrhvy")) + .withSourceAddressList(Arrays.asList("otjvdkwiswskukjt", "sbvw")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("xkdtxfkndlqvtwkn") + .withAddressList(Arrays.asList("mb", "gtywatmqaqkue", "tgroesh", "ygzc")), + new HeaderAddressProperties().withHeaderName("fqxkfaoyteh") + .withAddressList(Arrays.asList("vjmvqmtdwckygr", "ejnndljdju")), + new HeaderAddressProperties().withHeaderName("br").withAddressList(Arrays.asList("ynkceysfaqegpl")))); model = BinaryData.fromObject(model).toObject(RuleProperties.class); - Assertions.assertEquals(Action.DENY, model.action()); - Assertions.assertEquals("mozusgzvlnsnnjz", model.addressList().get(0)); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("ftptnuwj", model.addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.condition()); + Assertions.assertEquals("gcgqyhleseyqrhvy", model.destinationAddressList().get(0)); + Assertions.assertEquals("otjvdkwiswskukjt", model.sourceAddressList().get(0)); + Assertions.assertEquals("xkdtxfkndlqvtwkn", model.headerAddressList().get(0).headerName()); + Assertions.assertEquals("mb", model.headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java new file mode 100644 index 000000000000..13024f300cd8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StatementActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StatementActionPatchProperties model = BinaryData.fromString( + "{\"localPreference\":7956415939657825690,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"lghkvoxdpor\",\"k\",\"vbkutogecyqoy\"]},\"delete\":{\"ipCommunityIds\":[\"bvqnpwdwdmuvya\"]},\"set\":{\"ipCommunityIds\":[\"pwxnblzrmi\",\"k\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"jbpn\",\"dhfrvsi\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"npcjn\",\"affwcgjjioqw\"]},\"set\":{\"ipExtendedCommunityIds\":[\"dkpnmwrfuqjdeby\",\"q\",\"cnbgibklscwdko\"]}}}") + .toObject(StatementActionPatchProperties.class); + Assertions.assertEquals(7956415939657825690L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.actionType()); + Assertions.assertEquals("lghkvoxdpor", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("bvqnpwdwdmuvya", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("pwxnblzrmi", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("jbpn", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("npcjn", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("dkpnmwrfuqjdeby", + model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StatementActionPatchProperties model = new StatementActionPatchProperties() + .withLocalPreference(7956415939657825690L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("lghkvoxdpor", "k", "vbkutogecyqoy"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("bvqnpwdwdmuvya"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("pwxnblzrmi", "k")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("jbpn", "dhfrvsi"))) + .withDelete( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("npcjn", "affwcgjjioqw"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("dkpnmwrfuqjdeby", "q", "cnbgibklscwdko")))); + model = BinaryData.fromObject(model).toObject(StatementActionPatchProperties.class); + Assertions.assertEquals(7956415939657825690L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.actionType()); + Assertions.assertEquals("lghkvoxdpor", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("bvqnpwdwdmuvya", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("pwxnblzrmi", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("jbpn", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("npcjn", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("dkpnmwrfuqjdeby", + model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java index 43fdbec3618f..1c977ffb459a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,43 +18,46 @@ public final class StatementActionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatementActionProperties model = BinaryData.fromString( - "{\"localPreference\":9104169219578934391,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"dwdsoqtbfkvuozbz\",\"hn\",\"ekwanklp\",\"rlcydjht\"]},\"set\":{\"ipCommunityIds\":[\"rwiyndurdonkgobx\"]},\"add\":{\"ipCommunityIds\":[\"olenrswknpdr\",\"nmzaofro\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"ie\",\"yr\"]},\"set\":{\"ipExtendedCommunityIds\":[\"ybkqftus\"]},\"add\":{\"ipExtendedCommunityIds\":[\"rtvvbucn\"]}}}") + "{\"localPreference\":6893031547362937650,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"i\",\"dkewqwamp\",\"ldddorzljhnxf\",\"ffngfpilloirm\"]},\"delete\":{\"ipCommunityIds\":[\"ktuqnbcjknrqmznw\",\"tk\",\"ytwiieinl\"]},\"set\":{\"ipCommunityIds\":[\"oyoioxdwffwyzqke\",\"curr\",\"uecokyduqzusc\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"ehtekx\",\"vkdvcgowrd\",\"ddddwzdlbbcztam\",\"yrkwsthpivocf\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"nodqqzjbfyrosw\",\"fqd\",\"wvsxfrwvlypzt\"]},\"set\":{\"ipExtendedCommunityIds\":[\"nc\",\"ocl\",\"epjzaqbods\"]}}}") .toObject(StatementActionProperties.class); - Assertions.assertEquals(9104169219578934391L, model.localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); - Assertions.assertEquals("olenrswknpdr", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dwdsoqtbfkvuozbz", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("rwiyndurdonkgobx", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("rtvvbucn", - model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ie", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ybkqftus", - model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(6893031547362937650L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.actionType()); + Assertions.assertEquals("i", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("ktuqnbcjknrqmznw", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("oyoioxdwffwyzqke", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("ehtekx", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("nodqqzjbfyrosw", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("nc", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatementActionProperties model = new StatementActionProperties().withLocalPreference(9104169219578934391L) - .withActionType(RoutePolicyActionType.CONTINUE) + StatementActionProperties model = new StatementActionProperties().withLocalPreference(6893031547362937650L) + .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("olenrswknpdr", "nmzaofro"))) - .withDelete(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("dwdsoqtbfkvuozbz", "hn", "ekwanklp", "rlcydjht"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("rwiyndurdonkgobx")))) + .withAdd(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("i", "dkewqwamp", "ldddorzljhnxf", "ffngfpilloirm"))) + .withDelete( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ktuqnbcjknrqmznw", "tk", "ytwiieinl"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("oyoioxdwffwyzqke", "curr", "uecokyduqzusc")))) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("rtvvbucn"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ie", "yr"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ybkqftus")))); + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("ehtekx", "vkdvcgowrd", "ddddwzdlbbcztam", "yrkwsthpivocf"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("nodqqzjbfyrosw", "fqd", "wvsxfrwvlypzt"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("nc", "ocl", "epjzaqbods")))); model = BinaryData.fromObject(model).toObject(StatementActionProperties.class); - Assertions.assertEquals(9104169219578934391L, model.localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); - Assertions.assertEquals("olenrswknpdr", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dwdsoqtbfkvuozbz", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("rwiyndurdonkgobx", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("rtvvbucn", - model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ie", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ybkqftus", - model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(6893031547362937650L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.actionType()); + Assertions.assertEquals("i", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("ktuqnbcjknrqmznw", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("oyoioxdwffwyzqke", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("ehtekx", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("nodqqzjbfyrosw", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("nc", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java new file mode 100644 index 000000000000..a195a6ea801b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StatementConditionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StatementConditionPatchProperties model = BinaryData.fromString( + "{\"ipCommunityIds\":[\"ricv\"],\"ipExtendedCommunityIds\":[\"enintz\",\"nhyyqxckd\",\"xjpisrdnowinc\"],\"type\":\"And\",\"ipPrefixId\":\"vijnubxfiiytqx\"}") + .toObject(StatementConditionPatchProperties.class); + Assertions.assertEquals("ricv", model.ipCommunityIds().get(0)); + Assertions.assertEquals("enintz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("vijnubxfiiytqx", model.ipPrefixId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StatementConditionPatchProperties model + = new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList("ricv")) + .withIpExtendedCommunityIds(Arrays.asList("enintz", "nhyyqxckd", "xjpisrdnowinc")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("vijnubxfiiytqx"); + model = BinaryData.fromObject(model).toObject(StatementConditionPatchProperties.class); + Assertions.assertEquals("ricv", model.ipCommunityIds().get(0)); + Assertions.assertEquals("enintz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("vijnubxfiiytqx", model.ipPrefixId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java index 5371bb138721..c52bfc97a8fe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,25 +14,25 @@ public final class StatementConditionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatementConditionProperties model = BinaryData.fromString( - "{\"type\":\"Or\",\"ipPrefixId\":\"yxxvwedhagqbbse\",\"ipExtendedCommunityIds\":[\"yuflmsyzzdcrolrz\",\"sb\",\"mphzkymunw\"],\"ipCommunityIds\":[\"tbuszbd\",\"rdf\"]}") + "{\"ipCommunityIds\":[\"lzzietumzenkr\",\"ruesxe\",\"awx\"],\"ipExtendedCommunityIds\":[\"dctjwfebqq\",\"eet\"],\"type\":\"Or\",\"ipPrefixId\":\"lczf\"}") .toObject(StatementConditionProperties.class); - Assertions.assertEquals("tbuszbd", model.ipCommunityIds().get(0)); + Assertions.assertEquals("lzzietumzenkr", model.ipCommunityIds().get(0)); + Assertions.assertEquals("dctjwfebqq", model.ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.OR, model.type()); - Assertions.assertEquals("yxxvwedhagqbbse", model.ipPrefixId()); - Assertions.assertEquals("yuflmsyzzdcrolrz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("lczf", model.ipPrefixId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StatementConditionProperties model - = new StatementConditionProperties().withIpCommunityIds(Arrays.asList("tbuszbd", "rdf")) + = new StatementConditionProperties().withIpCommunityIds(Arrays.asList("lzzietumzenkr", "ruesxe", "awx")) + .withIpExtendedCommunityIds(Arrays.asList("dctjwfebqq", "eet")) .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("yxxvwedhagqbbse") - .withIpExtendedCommunityIds(Arrays.asList("yuflmsyzzdcrolrz", "sb", "mphzkymunw")); + .withIpPrefixId("lczf"); model = BinaryData.fromObject(model).toObject(StatementConditionProperties.class); - Assertions.assertEquals("tbuszbd", model.ipCommunityIds().get(0)); + Assertions.assertEquals("lzzietumzenkr", model.ipCommunityIds().get(0)); + Assertions.assertEquals("dctjwfebqq", model.ipExtendedCommunityIds().get(0)); Assertions.assertEquals(RoutePolicyConditionType.OR, model.type()); - Assertions.assertEquals("yxxvwedhagqbbse", model.ipPrefixId()); - Assertions.assertEquals("yuflmsyzzdcrolrz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("lczf", model.ipPrefixId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java index afd948e6c4cb..56e577436562 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -15,39 +16,42 @@ public final class StaticRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StaticRouteConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":311792360,\"multiplier\":1817187769},\"ipv4Routes\":[{\"prefix\":\"tyvkunmignohi\",\"nextHop\":[\"gqogjwpindedva\",\"bxbhmedeilbj\"]},{\"prefix\":\"wfcfxzirzz\",\"nextHop\":[\"vwypusuvjsl\",\"zwci\"]},{\"prefix\":\"djsllfr\",\"nextHop\":[\"dmvxadq\",\"cfrgnawbabgfbkt\",\"jmfczlfsyqkf\"]},{\"prefix\":\"bzgowoxqmje\",\"nextHop\":[\"cxn\"]}],\"ipv6Routes\":[{\"prefix\":\"xhlusrvxis\",\"nextHop\":[\"jceagb\",\"qvlsumywzas\",\"xgo\"]},{\"prefix\":\"oyjfqipu\",\"nextHop\":[\"znclkfkeebgv\",\"pemtuoqu\",\"l\"]}]}") + "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1445178910,\"multiplier\":760143821},\"ipv4Routes\":[{\"prefix\":\"acwras\",\"nextHop\":[\"wefcvoinw\",\"qartwy\"]},{\"prefix\":\"qicladv\",\"nextHop\":[\"davuqmcbyms\",\"ob\",\"lquvjezcjumvp\",\"imioyo\"]},{\"prefix\":\"glkmiqwnnr\",\"nextHop\":[\"libbf\",\"pspkladydgnhautw\",\"kexzgpmnmabeddqi\"]},{\"prefix\":\"wg\",\"nextHop\":[\"pfqfpc\",\"stcl\"]}],\"ipv6Routes\":[{\"prefix\":\"vwerfwxbsmtb\",\"nextHop\":[\"jehhci\"]},{\"prefix\":\"kwdvbtb\",\"nextHop\":[\"kqhs\",\"htfpwpqb\"]},{\"prefix\":\"ejuwyqwdqigmghgi\",\"nextHop\":[\"txlujkhnjcmr\"]},{\"prefix\":\"kfmkhcqtwmlmhjn\",\"nextHop\":[\"qe\",\"hj\"]}],\"extension\":\"NPB\"}") .toObject(StaticRouteConfiguration.class); - Assertions.assertEquals(311792360, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1817187769, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("tyvkunmignohi", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gqogjwpindedva", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("xhlusrvxis", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jceagb", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1445178910, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(760143821, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("acwras", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wefcvoinw", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("vwerfwxbsmtb", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jehhci", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.extension()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StaticRouteConfiguration model = new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(311792360).withMultiplier(1817187769)) + new BfdConfiguration().withIntervalInMilliSeconds(1445178910).withMultiplier(760143821)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("tyvkunmignohi") - .withNextHop(Arrays.asList("gqogjwpindedva", "bxbhmedeilbj")), - new StaticRouteProperties().withPrefix("wfcfxzirzz").withNextHop(Arrays.asList("vwypusuvjsl", "zwci")), - new StaticRouteProperties().withPrefix("djsllfr") - .withNextHop(Arrays.asList("dmvxadq", "cfrgnawbabgfbkt", "jmfczlfsyqkf")), - new StaticRouteProperties().withPrefix("bzgowoxqmje").withNextHop(Arrays.asList("cxn")))) + new StaticRouteProperties().withPrefix("acwras").withNextHop(Arrays.asList("wefcvoinw", "qartwy")), + new StaticRouteProperties().withPrefix("qicladv") + .withNextHop(Arrays.asList("davuqmcbyms", "ob", "lquvjezcjumvp", "imioyo")), + new StaticRouteProperties().withPrefix("glkmiqwnnr") + .withNextHop(Arrays.asList("libbf", "pspkladydgnhautw", "kexzgpmnmabeddqi")), + new StaticRouteProperties().withPrefix("wg").withNextHop(Arrays.asList("pfqfpc", "stcl")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xhlusrvxis") - .withNextHop(Arrays.asList("jceagb", "qvlsumywzas", "xgo")), - new StaticRouteProperties().withPrefix("oyjfqipu") - .withNextHop(Arrays.asList("znclkfkeebgv", "pemtuoqu", "l")))); + new StaticRouteProperties().withPrefix("vwerfwxbsmtb").withNextHop(Arrays.asList("jehhci")), + new StaticRouteProperties().withPrefix("kwdvbtb").withNextHop(Arrays.asList("kqhs", "htfpwpqb")), + new StaticRouteProperties().withPrefix("ejuwyqwdqigmghgi").withNextHop(Arrays.asList("txlujkhnjcmr")), + new StaticRouteProperties().withPrefix("kfmkhcqtwmlmhjn").withNextHop(Arrays.asList("qe", "hj")))) + .withExtension(Extension.NPB); model = BinaryData.fromObject(model).toObject(StaticRouteConfiguration.class); - Assertions.assertEquals(311792360, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1817187769, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("tyvkunmignohi", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gqogjwpindedva", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("xhlusrvxis", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jceagb", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1445178910, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(760143821, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("acwras", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wefcvoinw", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("vwerfwxbsmtb", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("jehhci", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.extension()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..64aa540672f8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":80001822,\"multiplier\":1414466268},\"ipv4Routes\":[{\"prefix\":\"zrlrmlccmetjs\",\"nextHop\":[\"ivfqbqnasdsy\",\"nzsieuscplh\",\"vdgxly\",\"kxitds\"]},{\"prefix\":\"ezsvkolrupjov\",\"nextHop\":[\"zsayebrazw\",\"lpzbtzuykykipf\"]},{\"prefix\":\"dyepfno\",\"nextHop\":[\"bezacfpztga\",\"wyqejgaao\",\"ctgkppgkqzkcyzmf\"]}],\"ipv6Routes\":[{\"prefix\":\"dyfcix\",\"nextHop\":[\"lcqvhoejgoiutgw\",\"mkahpqha\"]},{\"prefix\":\"yntacihnco\",\"nextHop\":[\"ipnmliqmv\"]},{\"prefix\":\"bhikeaqgr\",\"nextHop\":[\"pomxpu\",\"dtsdfjy\"]},{\"prefix\":\"esocwiqbuou\",\"nextHop\":[\"py\",\"gleofjsbgbw\"]}]}") + .toObject(StaticRoutePatchConfiguration.class); + Assertions.assertEquals(80001822, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1414466268, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("zrlrmlccmetjs", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ivfqbqnasdsy", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dyfcix", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lcqvhoejgoiutgw", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRoutePatchConfiguration model = new StaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(80001822).withMultiplier(1414466268)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("zrlrmlccmetjs") + .withNextHop(Arrays.asList("ivfqbqnasdsy", "nzsieuscplh", "vdgxly", "kxitds")), + new StaticRoutePatchProperties().withPrefix("ezsvkolrupjov") + .withNextHop(Arrays.asList("zsayebrazw", "lpzbtzuykykipf")), + new StaticRoutePatchProperties().withPrefix("dyepfno") + .withNextHop(Arrays.asList("bezacfpztga", "wyqejgaao", "ctgkppgkqzkcyzmf")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("dyfcix") + .withNextHop(Arrays.asList("lcqvhoejgoiutgw", "mkahpqha")), + new StaticRoutePatchProperties().withPrefix("yntacihnco").withNextHop(Arrays.asList("ipnmliqmv")), + new StaticRoutePatchProperties().withPrefix("bhikeaqgr") + .withNextHop(Arrays.asList("pomxpu", "dtsdfjy")), + new StaticRoutePatchProperties().withPrefix("esocwiqbuou") + .withNextHop(Arrays.asList("py", "gleofjsbgbw")))); + model = BinaryData.fromObject(model).toObject(StaticRoutePatchConfiguration.class); + Assertions.assertEquals(80001822, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1414466268, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("zrlrmlccmetjs", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ivfqbqnasdsy", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dyfcix", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lcqvhoejgoiutgw", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java new file mode 100644 index 000000000000..5440b16ae7b3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StaticRoutePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRoutePatchProperties model + = BinaryData.fromString("{\"prefix\":\"zvdajfwnncf\",\"nextHop\":[\"ciqgjjrlhiqlwixv\"]}") + .toObject(StaticRoutePatchProperties.class); + Assertions.assertEquals("zvdajfwnncf", model.prefix()); + Assertions.assertEquals("ciqgjjrlhiqlwixv", model.nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRoutePatchProperties model + = new StaticRoutePatchProperties().withPrefix("zvdajfwnncf").withNextHop(Arrays.asList("ciqgjjrlhiqlwixv")); + model = BinaryData.fromObject(model).toObject(StaticRoutePatchProperties.class); + Assertions.assertEquals("zvdajfwnncf", model.prefix()); + Assertions.assertEquals("ciqgjjrlhiqlwixv", model.nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java index 778bdd77447b..95507877d156 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,19 @@ public final class StaticRoutePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StaticRouteProperties model = BinaryData - .fromString("{\"prefix\":\"egqavnigflqqb\",\"nextHop\":[\"yjpylxdbfva\",\"mvmsxbae\",\"wjcnkottl\"]}") - .toObject(StaticRouteProperties.class); - Assertions.assertEquals("egqavnigflqqb", model.prefix()); - Assertions.assertEquals("yjpylxdbfva", model.nextHop().get(0)); + StaticRouteProperties model + = BinaryData.fromString("{\"prefix\":\"r\",\"nextHop\":[\"pok\",\"dxe\",\"hhkvguavtptbk\",\"wkqyns\"]}") + .toObject(StaticRouteProperties.class); + Assertions.assertEquals("r", model.prefix()); + Assertions.assertEquals("pok", model.nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StaticRouteProperties model = new StaticRouteProperties().withPrefix("egqavnigflqqb") - .withNextHop(Arrays.asList("yjpylxdbfva", "mvmsxbae", "wjcnkottl")); + StaticRouteProperties model = new StaticRouteProperties().withPrefix("r") + .withNextHop(Arrays.asList("pok", "dxe", "hhkvguavtptbk", "wkqyns")); model = BinaryData.fromObject(model).toObject(StaticRouteProperties.class); - Assertions.assertEquals("egqavnigflqqb", model.prefix()); - Assertions.assertEquals("yjpylxdbfva", model.nextHop().get(0)); + Assertions.assertEquals("r", model.prefix()); + Assertions.assertEquals("pok", model.nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java new file mode 100644 index 000000000000..daa2f705e7f6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class StaticRouteRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRouteRoutePolicyPatch model = BinaryData.fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"hsidsjtdlpbnin\",\"exportIpv6RoutePolicyId\":\"azlsvbzfcpuo\"}}") + .toObject(StaticRouteRoutePolicyPatch.class); + Assertions.assertEquals("hsidsjtdlpbnin", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("azlsvbzfcpuo", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRouteRoutePolicyPatch model = new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("hsidsjtdlpbnin") + .withExportIpv6RoutePolicyId("azlsvbzfcpuo")); + model = BinaryData.fromObject(model).toObject(StaticRouteRoutePolicyPatch.class); + Assertions.assertEquals("hsidsjtdlpbnin", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("azlsvbzfcpuo", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java new file mode 100644 index 000000000000..1e82f20e8db8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import org.junit.jupiter.api.Assertions; + +public final class StaticRouteRoutePolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRouteRoutePolicy model = BinaryData + .fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"uim\",\"exportIpv6RoutePolicyId\":\"wxs\"}}") + .toObject(StaticRouteRoutePolicy.class); + Assertions.assertEquals("uim", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("wxs", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRouteRoutePolicy model = new StaticRouteRoutePolicy().withExportRoutePolicy( + new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("uim").withExportIpv6RoutePolicyId("wxs")); + model = BinaryData.fromObject(model).toObject(StaticRouteRoutePolicy.class); + Assertions.assertEquals("uim", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("wxs", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java new file mode 100644 index 000000000000..c971b569d3ba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class StationConnectionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StationConnectionPatchProperties model = BinaryData + .fromString("{\"keepaliveIdleTime\":1371323388,\"probeInterval\":1290231034,\"probeCount\":1209125322}") + .toObject(StationConnectionPatchProperties.class); + Assertions.assertEquals(1371323388, model.keepaliveIdleTime()); + Assertions.assertEquals(1290231034, model.probeInterval()); + Assertions.assertEquals(1209125322, model.probeCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StationConnectionPatchProperties model + = new StationConnectionPatchProperties().withKeepaliveIdleTime(1371323388) + .withProbeInterval(1290231034) + .withProbeCount(1209125322); + model = BinaryData.fromObject(model).toObject(StationConnectionPatchProperties.class); + Assertions.assertEquals(1371323388, model.keepaliveIdleTime()); + Assertions.assertEquals(1290231034, model.probeInterval()); + Assertions.assertEquals(1209125322, model.probeCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java new file mode 100644 index 000000000000..7c24bb1023ee --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class StationConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StationConnectionProperties model = BinaryData + .fromString("{\"keepaliveIdleTime\":1757090605,\"probeInterval\":769762169,\"probeCount\":1892888275}") + .toObject(StationConnectionProperties.class); + Assertions.assertEquals(1757090605, model.keepaliveIdleTime()); + Assertions.assertEquals(769762169, model.probeInterval()); + Assertions.assertEquals(1892888275, model.probeCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StationConnectionProperties model = new StationConnectionProperties().withKeepaliveIdleTime(1757090605) + .withProbeInterval(769762169) + .withProbeCount(1892888275); + model = BinaryData.fromObject(model).toObject(StationConnectionProperties.class); + Assertions.assertEquals(1757090605, model.keepaliveIdleTime()); + Assertions.assertEquals(769762169, model.probeInterval()); + Assertions.assertEquals(1892888275, model.probeCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java new file mode 100644 index 000000000000..917a931ffcd6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class StorageAccountConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageAccountConfiguration model = BinaryData.fromString( + "{\"storageAccountId\":\"xclfrs\",\"storageAccountIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"muvwvp\"}}") + .toObject(StorageAccountConfiguration.class); + Assertions.assertEquals("xclfrs", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("muvwvp", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageAccountConfiguration model = new StorageAccountConfiguration().withStorageAccountId("xclfrs") + .withStorageAccountIdentity( + new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("muvwvp")); + model = BinaryData.fromObject(model).toObject(StorageAccountConfiguration.class); + Assertions.assertEquals("xclfrs", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("muvwvp", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java new file mode 100644 index 000000000000..6261242100b0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class StorageAccountPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageAccountPatchConfiguration model = BinaryData.fromString( + "{\"storageAccountId\":\"ev\",\"storageAccountIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"pfhga\"}}") + .toObject(StorageAccountPatchConfiguration.class); + Assertions.assertEquals("ev", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("pfhga", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageAccountPatchConfiguration model = new StorageAccountPatchConfiguration().withStorageAccountId("ev") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("pfhga")); + model = BinaryData.fromObject(model).toObject(StorageAccountPatchConfiguration.class); + Assertions.assertEquals("ev", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("pfhga", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java index 06528b94981f..94357fd08314 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,9 @@ public final class SupportedConnectorPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedConnectorProperties model - = BinaryData.fromString("{\"connectorType\":\"omv\",\"maxSpeedInMbps\":1816993869}") + = BinaryData.fromString("{\"connectorType\":\"bgzancoinmphymcq\",\"maxSpeedInMbps\":978970547}") .toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("omv", model.connectorType()); - Assertions.assertEquals(1816993869, model.maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedConnectorProperties model - = new SupportedConnectorProperties().withConnectorType("omv").withMaxSpeedInMbps(1816993869); - model = BinaryData.fromObject(model).toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("omv", model.connectorType()); - Assertions.assertEquals(1816993869, model.maxSpeedInMbps()); + Assertions.assertEquals("bgzancoinmphymcq", model.connectorType()); + Assertions.assertEquals(978970547, model.maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java index 27ffd271ce4b..ada6dd71609a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,24 +13,11 @@ public final class SupportedVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedVersionProperties model = BinaryData.fromString( - "{\"version\":\"gouarhwvixqq\",\"vendorOsVersion\":\"ljky\",\"vendorFirmwareVersion\":\"jrclrvtzq\",\"isDefault\":\"True\"}") + "{\"version\":\"aklwzlwee\",\"vendorOsVersion\":\"nejzltkaszfjsxs\",\"vendorFirmwareVersion\":\"dux\",\"isDefault\":\"False\"}") .toObject(SupportedVersionProperties.class); - Assertions.assertEquals("gouarhwvixqq", model.version()); - Assertions.assertEquals("ljky", model.vendorOsVersion()); - Assertions.assertEquals("jrclrvtzq", model.vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isDefault()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionProperties model = new SupportedVersionProperties().withVersion("gouarhwvixqq") - .withVendorOsVersion("ljky") - .withVendorFirmwareVersion("jrclrvtzq") - .withIsDefault(BooleanEnumProperty.TRUE); - model = BinaryData.fromObject(model).toObject(SupportedVersionProperties.class); - Assertions.assertEquals("gouarhwvixqq", model.version()); - Assertions.assertEquals("ljky", model.vendorOsVersion()); - Assertions.assertEquals("jrclrvtzq", model.vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isDefault()); + Assertions.assertEquals("aklwzlwee", model.version()); + Assertions.assertEquals("nejzltkaszfjsxs", model.vendorOsVersion()); + Assertions.assertEquals("dux", model.vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isDefault()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java index ebc27467ccd8..a787122e4b0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,15 +14,15 @@ public final class TagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagsUpdate model - = BinaryData.fromString("{\"tags\":{\"nszonwpngaj\":\"bauiropi\"}}").toObject(TagsUpdate.class); - Assertions.assertEquals("bauiropi", model.tags().get("nszonwpngaj")); + = BinaryData.fromString("{\"tags\":{\"jltfvnzcyjtotpv\":\"pmdtz\"}}").toObject(TagsUpdate.class); + Assertions.assertEquals("pmdtz", model.tags().get("jltfvnzcyjtotpv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsUpdate model = new TagsUpdate().withTags(mapOf("nszonwpngaj", "bauiropi")); + TagsUpdate model = new TagsUpdate().withTags(mapOf("jltfvnzcyjtotpv", "pmdtz")); model = BinaryData.fromObject(model).toObject(TagsUpdate.class); - Assertions.assertEquals("bauiropi", model.tags().get("nszonwpngaj")); + Assertions.assertEquals("pmdtz", model.tags().get("jltfvnzcyjtotpv")); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java new file mode 100644 index 000000000000..de4a1d6222c2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class UniqueRouteDistinguisherPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UniqueRouteDistinguisherPatchProperties model = BinaryData + .fromString( + "{\"uniqueRdConfigurationState\":\"Disabled\",\"nniDerivedUniqueRdConfigurationState\":\"Disabled\"}") + .toObject(UniqueRouteDistinguisherPatchProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UniqueRouteDistinguisherPatchProperties model = new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.DISABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(UniqueRouteDistinguisherPatchProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java new file mode 100644 index 000000000000..a3e41a1b01e0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import org.junit.jupiter.api.Assertions; + +public final class UniqueRouteDistinguisherPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UniqueRouteDistinguisherProperties model = BinaryData.fromString( + "{\"uniqueRdConfigurationState\":\"Disabled\",\"uniqueRds\":[\"kwonrzpghl\",\"dtbgblxbuib\",\"vjztaflvsmfj\"],\"nniDerivedUniqueRdConfigurationState\":\"Disabled\"}") + .toObject(UniqueRouteDistinguisherProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UniqueRouteDistinguisherProperties model = new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.DISABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(UniqueRouteDistinguisherProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateResponsePropertiesTests.java new file mode 100644 index 000000000000..39fb54e7adb1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateResponsePropertiesTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class UpdateAdministrativeStateResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateAdministrativeStateResponseProperties model = BinaryData.fromString( + "{\"successfulResources\":[\"vboclzhzjk\",\"yuxgvttxpnrupz\",\"amrdixtrekidswys\",\"br\"],\"failedResources\":[\"gllukkutvlxhrpqh\",\"mblcouqehbhbcds\",\"iryr\"]}") + .toObject(UpdateAdministrativeStateResponseProperties.class); + Assertions.assertEquals("vboclzhzjk", model.successfulResources().get(0)); + Assertions.assertEquals("gllukkutvlxhrpqh", model.failedResources().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java index 99c2211c071b..90c31bf6070f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,18 +13,20 @@ public final class UpdateAdministrativeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateAdministrativeState model = BinaryData.fromString("{\"state\":\"Enable\",\"resourceIds\":[\"vtzn\"]}") - .toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("vtzn", model.resourceIds().get(0)); + UpdateAdministrativeState model + = BinaryData.fromString("{\"state\":\"Enable\",\"resourceIds\":[\"oe\",\"dogiyetesyp\",\"idbz\",\"jhqt\"]}") + .toObject(UpdateAdministrativeState.class); + Assertions.assertEquals("oe", model.resourceIds().get(0)); Assertions.assertEquals(EnableDisableState.ENABLE, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateAdministrativeState model = new UpdateAdministrativeState().withResourceIds(Arrays.asList("vtzn")) - .withState(EnableDisableState.ENABLE); + UpdateAdministrativeState model + = new UpdateAdministrativeState().withResourceIds(Arrays.asList("oe", "dogiyetesyp", "idbz", "jhqt")) + .withState(EnableDisableState.ENABLE); model = BinaryData.fromObject(model).toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("vtzn", model.resourceIds().get(0)); + Assertions.assertEquals("oe", model.resourceIds().get(0)); Assertions.assertEquals(EnableDisableState.ENABLE, model.state()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java index d1575da4e7dd..9641342ee4ee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,19 +14,19 @@ public final class UpdateDeviceAdministrativeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateDeviceAdministrativeState model = BinaryData.fromString( - "{\"state\":\"Resync\",\"resourceIds\":[\"aprhknqiijgencdg\",\"oqueqihkkyowltj\",\"uwhldxwhieproqks\"]}") + "{\"state\":\"Quarantine\",\"resourceIds\":[\"u\",\"qkotauratn\",\"cppfzsclefyrle\",\"ndqlmfdggnbbuy\"]}") .toObject(UpdateDeviceAdministrativeState.class); - Assertions.assertEquals("aprhknqiijgencdg", model.resourceIds().get(0)); - Assertions.assertEquals(DeviceAdministrativeState.RESYNC, model.state()); + Assertions.assertEquals("u", model.resourceIds().get(0)); + Assertions.assertEquals(DeviceAdministrativeState.QUARANTINE, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateDeviceAdministrativeState model = new UpdateDeviceAdministrativeState() - .withResourceIds(Arrays.asList("aprhknqiijgencdg", "oqueqihkkyowltj", "uwhldxwhieproqks")) - .withState(DeviceAdministrativeState.RESYNC); + .withResourceIds(Arrays.asList("u", "qkotauratn", "cppfzsclefyrle", "ndqlmfdggnbbuy")) + .withState(DeviceAdministrativeState.QUARANTINE); model = BinaryData.fromObject(model).toObject(UpdateDeviceAdministrativeState.class); - Assertions.assertEquals("aprhknqiijgencdg", model.resourceIds().get(0)); - Assertions.assertEquals(DeviceAdministrativeState.RESYNC, model.state()); + Assertions.assertEquals("u", model.resourceIds().get(0)); + Assertions.assertEquals(DeviceAdministrativeState.QUARANTINE, model.state()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java index d35ebb1b0628..6dd0babce19a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,14 +11,14 @@ public final class UpdateVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateVersion model = BinaryData.fromString("{\"version\":\"xmcvprstvkitbfjt\"}").toObject(UpdateVersion.class); - Assertions.assertEquals("xmcvprstvkitbfjt", model.version()); + UpdateVersion model = BinaryData.fromString("{\"version\":\"pulnrfcqufmcihp\"}").toObject(UpdateVersion.class); + Assertions.assertEquals("pulnrfcqufmcihp", model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateVersion model = new UpdateVersion().withVersion("xmcvprstvkitbfjt"); + UpdateVersion model = new UpdateVersion().withVersion("pulnrfcqufmcihp"); model = BinaryData.fromObject(model).toObject(UpdateVersion.class); - Assertions.assertEquals("xmcvprstvkitbfjt", model.version()); + Assertions.assertEquals("pulnrfcqufmcihp", model.version()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java index 550316299a8e..50ef816bab75 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class UpgradeNetworkFabricPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpgradeNetworkFabricProperties model = BinaryData.fromString("{\"action\":\"Start\",\"version\":\"lghnysvlp\"}") + UpgradeNetworkFabricProperties model = BinaryData.fromString("{\"action\":\"Start\",\"version\":\"lwkyeahhh\"}") .toObject(UpgradeNetworkFabricProperties.class); - Assertions.assertEquals("lghnysvlp", model.version()); + Assertions.assertEquals("lwkyeahhh", model.version()); Assertions.assertEquals(NetworkFabricUpgradeAction.START, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpgradeNetworkFabricProperties model = new UpgradeNetworkFabricProperties().withVersion("lghnysvlp") + UpgradeNetworkFabricProperties model = new UpgradeNetworkFabricProperties().withVersion("lwkyeahhh") .withAction(NetworkFabricUpgradeAction.START); model = BinaryData.fromObject(model).toObject(UpgradeNetworkFabricProperties.class); - Assertions.assertEquals("lghnysvlp", model.version()); + Assertions.assertEquals("lwkyeahhh", model.version()); Assertions.assertEquals(NetworkFabricUpgradeAction.START, model.action()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..c639d6120b1f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"xvucnul\",\"clientId\":\"nhj\"}") + .toObject(UserAssignedIdentity.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity(); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java index 979013c34695..6e31622a83fb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ViewDeviceConfigurationResponsePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ViewDeviceConfigurationResponsePropertiesTests.java new file mode 100644 index 000000000000..b32c29a87981 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ViewDeviceConfigurationResponsePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class ViewDeviceConfigurationResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ViewDeviceConfigurationResponseProperties model + = BinaryData.fromString("{\"deviceConfigurationUrl\":\"fgdkwbk\"}") + .toObject(ViewDeviceConfigurationResponseProperties.class); + Assertions.assertEquals("fgdkwbk", model.deviceConfigurationUrl()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..243e8e4461ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VlanGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VlanGroupPatchProperties model + = BinaryData.fromString("{\"name\":\"ui\",\"vlans\":[\"jcazt\"]}").toObject(VlanGroupPatchProperties.class); + Assertions.assertEquals("ui", model.name()); + Assertions.assertEquals("jcazt", model.vlans().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VlanGroupPatchProperties model + = new VlanGroupPatchProperties().withName("ui").withVlans(Arrays.asList("jcazt")); + model = BinaryData.fromObject(model).toObject(VlanGroupPatchProperties.class); + Assertions.assertEquals("ui", model.name()); + Assertions.assertEquals("jcazt", model.vlans().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java index 5eb93835ab4d..746426bb6a1e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,19 @@ public final class VlanGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VlanGroupProperties model = BinaryData.fromString("{\"name\":\"raauzzpt\",\"vlans\":[\"ysdzhez\",\"wva\"]}") + VlanGroupProperties model = BinaryData + .fromString("{\"name\":\"xrkjpvdw\",\"vlans\":[\"wiivwzjbhyzsx\",\"rkambt\",\"negvmnvuqe\",\"vldspa\"]}") .toObject(VlanGroupProperties.class); - Assertions.assertEquals("raauzzpt", model.name()); - Assertions.assertEquals("ysdzhez", model.vlans().get(0)); + Assertions.assertEquals("xrkjpvdw", model.name()); + Assertions.assertEquals("wiivwzjbhyzsx", model.vlans().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VlanGroupProperties model - = new VlanGroupProperties().withName("raauzzpt").withVlans(Arrays.asList("ysdzhez", "wva")); + VlanGroupProperties model = new VlanGroupProperties().withName("xrkjpvdw") + .withVlans(Arrays.asList("wiivwzjbhyzsx", "rkambt", "negvmnvuqe", "vldspa")); model = BinaryData.fromObject(model).toObject(VlanGroupProperties.class); - Assertions.assertEquals("raauzzpt", model.name()); - Assertions.assertEquals("ysdzhez", model.vlans().get(0)); + Assertions.assertEquals("xrkjpvdw", model.name()); + Assertions.assertEquals("wiivwzjbhyzsx", model.vlans().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java new file mode 100644 index 000000000000..14075755a6d6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VlanMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VlanMatchConditionPatch model = BinaryData.fromString( + "{\"vlans\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"],\"innerVlans\":[\"tc\",\"uhplrvkmjcwmjv\",\"gfggcvkyylizrzbj\",\"sfxsf\"],\"vlanGroupNames\":[\"lvt\"]}") + .toObject(VlanMatchConditionPatch.class); + Assertions.assertEquals("moichdlpnfpubntn", model.vlans().get(0)); + Assertions.assertEquals("tc", model.innerVlans().get(0)); + Assertions.assertEquals("lvt", model.vlanGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VlanMatchConditionPatch model + = new VlanMatchConditionPatch().withVlans(Arrays.asList("moichdlpnfpubntn", "atzviqsowsaael")) + .withInnerVlans(Arrays.asList("tc", "uhplrvkmjcwmjv", "gfggcvkyylizrzbj", "sfxsf")) + .withVlanGroupNames(Arrays.asList("lvt")); + model = BinaryData.fromObject(model).toObject(VlanMatchConditionPatch.class); + Assertions.assertEquals("moichdlpnfpubntn", model.vlans().get(0)); + Assertions.assertEquals("tc", model.innerVlans().get(0)); + Assertions.assertEquals("lvt", model.vlanGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java index 1a9297792603..9e8e8a32672c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,21 @@ public final class VlanMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VlanMatchCondition model = BinaryData.fromString( - "{\"vlans\":[\"tfpmvmemfnczdw\",\"vbalxlllc\",\"podbzevwrdnh\"],\"innerVlans\":[\"uvsj\",\"swsmys\",\"uluqypfc\"],\"vlanGroupNames\":[\"rchpqbmfpjbabwid\"]}") + "{\"vlans\":[\"tcubiipuipwoqonm\",\"cje\"],\"innerVlans\":[\"zshq\"],\"vlanGroupNames\":[\"m\",\"ev\"]}") .toObject(VlanMatchCondition.class); - Assertions.assertEquals("tfpmvmemfnczdw", model.vlans().get(0)); - Assertions.assertEquals("uvsj", model.innerVlans().get(0)); - Assertions.assertEquals("rchpqbmfpjbabwid", model.vlanGroupNames().get(0)); + Assertions.assertEquals("tcubiipuipwoqonm", model.vlans().get(0)); + Assertions.assertEquals("zshq", model.innerVlans().get(0)); + Assertions.assertEquals("m", model.vlanGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VlanMatchCondition model - = new VlanMatchCondition().withVlans(Arrays.asList("tfpmvmemfnczdw", "vbalxlllc", "podbzevwrdnh")) - .withInnerVlans(Arrays.asList("uvsj", "swsmys", "uluqypfc")) - .withVlanGroupNames(Arrays.asList("rchpqbmfpjbabwid")); + VlanMatchCondition model = new VlanMatchCondition().withVlans(Arrays.asList("tcubiipuipwoqonm", "cje")) + .withInnerVlans(Arrays.asList("zshq")) + .withVlanGroupNames(Arrays.asList("m", "ev")); model = BinaryData.fromObject(model).toObject(VlanMatchCondition.class); - Assertions.assertEquals("tfpmvmemfnczdw", model.vlans().get(0)); - Assertions.assertEquals("uvsj", model.innerVlans().get(0)); - Assertions.assertEquals("rchpqbmfpjbabwid", model.vlanGroupNames().get(0)); + Assertions.assertEquals("tcubiipuipwoqonm", model.vlans().get(0)); + Assertions.assertEquals("zshq", model.innerVlans().get(0)); + Assertions.assertEquals("m", model.vlanGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java deleted file mode 100644 index f9da9cd3f27c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class VpnConfigurationPatchablePropertiesOptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VpnConfigurationPatchablePropertiesOptionAProperties model = BinaryData.fromString( - "{\"primaryIpv4Prefix\":\"lrr\",\"primaryIpv6Prefix\":\"hctsbbibti\",\"secondaryIpv4Prefix\":\"hqvumspbfs\",\"secondaryIpv6Prefix\":\"qbbewfcuqfpyyxm\",\"mtu\":796336279,\"vlanId\":1630264703,\"peerASN\":2293730529266201821,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1541863840,\"multiplier\":1931320869}}") - .toObject(VpnConfigurationPatchablePropertiesOptionAProperties.class); - Assertions.assertEquals(796336279, model.mtu()); - Assertions.assertEquals(1630264703, model.vlanId()); - Assertions.assertEquals(2293730529266201821L, model.peerAsn()); - Assertions.assertEquals(1541863840, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1931320869, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("lrr", model.primaryIpv4Prefix()); - Assertions.assertEquals("hctsbbibti", model.primaryIpv6Prefix()); - Assertions.assertEquals("hqvumspbfs", model.secondaryIpv4Prefix()); - Assertions.assertEquals("qbbewfcuqfpyyxm", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VpnConfigurationPatchablePropertiesOptionAProperties model - = new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(796336279) - .withVlanId(1630264703) - .withPeerAsn(2293730529266201821L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1541863840).withMultiplier(1931320869)) - .withPrimaryIpv4Prefix("lrr") - .withPrimaryIpv6Prefix("hctsbbibti") - .withSecondaryIpv4Prefix("hqvumspbfs") - .withSecondaryIpv6Prefix("qbbewfcuqfpyyxm"); - model = BinaryData.fromObject(model).toObject(VpnConfigurationPatchablePropertiesOptionAProperties.class); - Assertions.assertEquals(796336279, model.mtu()); - Assertions.assertEquals(1630264703, model.vlanId()); - Assertions.assertEquals(2293730529266201821L, model.peerAsn()); - Assertions.assertEquals(1541863840, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1931320869, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("lrr", model.primaryIpv4Prefix()); - Assertions.assertEquals("hctsbbibti", model.primaryIpv6Prefix()); - Assertions.assertEquals("hqvumspbfs", model.secondaryIpv4Prefix()); - Assertions.assertEquals("qbbewfcuqfpyyxm", model.secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java index 2d709abc766d..210ceff38046 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,66 +18,70 @@ public final class VpnConfigurationPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VpnConfigurationPatchableProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"ylajam\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"tpzcr\",\"yklleynqanhkiggl\",\"lwalhvu\",\"hg\"],\"exportRouteTargets\":[\"etxdqcmyctajqzj\",\"alec\",\"bibiwks\",\"egyxsbfpzvoik\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"czfzwushlc\",\"pblalhhez\",\"fkissaidqzsaa\"],\"importIpv6RouteTargets\":[\"sgptotxjq\",\"ia\"],\"exportIpv4RouteTargets\":[\"lrtbfij\",\"z\",\"aoijolb\"],\"exportIpv6RouteTargets\":[\"ktwieope\",\"e\",\"xq\",\"wrswyiljp\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"gxyxyauxredd\",\"primaryIpv6Prefix\":\"mcnltmwytkujsqyc\",\"secondaryIpv4Prefix\":\"oxfab\",\"secondaryIpv6Prefix\":\"gpwb\",\"mtu\":382092821,\"vlanId\":1878226203,\"peerASN\":1952930394496589738,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1968581632,\"multiplier\":216296759}}}") + "{\"networkToNetworkInterconnectId\":\"inuwqxungrob\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"jwdylwxmvzjowz\",\"geerclbl\",\"bhpwachyeur\",\"wmvwryvdi\"],\"exportRouteTargets\":[\"ikgpruccwmec\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ytrtexegwmrq\"],\"importIpv6RouteTargets\":[\"iwh\"],\"exportIpv4RouteTargets\":[\"fjncindil\",\"q\"],\"exportIpv6RouteTargets\":[\"wjuriarsbclla\",\"hzcknjxiz\",\"axdy\"]}},\"optionAProperties\":{\"mtu\":1892524501,\"vlanId\":1973773763,\"peerASN\":260997198315572861,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1459580016,\"multiplier\":1917437594},\"primaryIpv4Prefix\":\"x\",\"primaryIpv6Prefix\":\"dndzkf\",\"secondaryIpv4Prefix\":\"uiiu\",\"secondaryIpv6Prefix\":\"b\"}}") .toObject(VpnConfigurationPatchableProperties.class); - Assertions.assertEquals("ylajam", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("inuwqxungrob", model.networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("tpzcr", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("etxdqcmyctajqzj", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("czfzwushlc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("sgptotxjq", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lrtbfij", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ktwieope", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(382092821, model.optionAProperties().mtu()); - Assertions.assertEquals(1878226203, model.optionAProperties().vlanId()); - Assertions.assertEquals(1952930394496589738L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(1968581632, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(216296759, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxyxyauxredd", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("mcnltmwytkujsqyc", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("oxfab", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gpwb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("jwdylwxmvzjowz", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("ikgpruccwmec", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("ytrtexegwmrq", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("iwh", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fjncindil", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("wjuriarsbclla", + model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("x", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("dndzkf", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("uiiu", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("b", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1892524501, model.optionAProperties().mtu()); + Assertions.assertEquals(1973773763, model.optionAProperties().vlanId()); + Assertions.assertEquals(260997198315572861L, model.optionAProperties().peerASN()); + Assertions.assertEquals(1459580016, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1917437594, model.optionAProperties().bfdConfiguration().multiplier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VpnConfigurationPatchableProperties model - = new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("ylajam") + = new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("inuwqxungrob") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("tpzcr", "yklleynqanhkiggl", "lwalhvu", "hg")) - .withExportRouteTargets(Arrays.asList("etxdqcmyctajqzj", "alec", "bibiwks", "egyxsbfpzvoik")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("czfzwushlc", "pblalhhez", "fkissaidqzsaa")) - .withImportIpv6RouteTargets(Arrays.asList("sgptotxjq", "ia")) - .withExportIpv4RouteTargets(Arrays.asList("lrtbfij", "z", "aoijolb")) - .withExportIpv6RouteTargets(Arrays.asList("ktwieope", "e", "xq", "wrswyiljp")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(382092821) - .withVlanId(1878226203) - .withPeerAsn(1952930394496589738L) + .withOptionBProperties(new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("jwdylwxmvzjowz", "geerclbl", "bhpwachyeur", "wmvwryvdi")) + .withExportRouteTargets(Arrays.asList("ikgpruccwmec")) + .withRouteTargets( + new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("ytrtexegwmrq")) + .withImportIpv6RouteTargets(Arrays.asList("iwh")) + .withExportIpv4RouteTargets(Arrays.asList("fjncindil", "q")) + .withExportIpv6RouteTargets(Arrays.asList("wjuriarsbclla", "hzcknjxiz", "axdy")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("x") + .withPrimaryIpv6Prefix("dndzkf") + .withSecondaryIpv4Prefix("uiiu") + .withSecondaryIpv6Prefix("b") + .withMtu(1892524501) + .withVlanId(1973773763) + .withPeerASN(260997198315572861L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1968581632).withMultiplier(216296759)) - .withPrimaryIpv4Prefix("gxyxyauxredd") - .withPrimaryIpv6Prefix("mcnltmwytkujsqyc") - .withSecondaryIpv4Prefix("oxfab") - .withSecondaryIpv6Prefix("gpwb")); + new BfdPatchConfiguration().withIntervalInMilliSeconds(1459580016).withMultiplier(1917437594))); model = BinaryData.fromObject(model).toObject(VpnConfigurationPatchableProperties.class); - Assertions.assertEquals("ylajam", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("inuwqxungrob", model.networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("tpzcr", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("etxdqcmyctajqzj", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("czfzwushlc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("sgptotxjq", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lrtbfij", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ktwieope", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(382092821, model.optionAProperties().mtu()); - Assertions.assertEquals(1878226203, model.optionAProperties().vlanId()); - Assertions.assertEquals(1952930394496589738L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(1968581632, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(216296759, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxyxyauxredd", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("mcnltmwytkujsqyc", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("oxfab", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gpwb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("jwdylwxmvzjowz", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("ikgpruccwmec", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("ytrtexegwmrq", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("iwh", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("fjncindil", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("wjuriarsbclla", + model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("x", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("dndzkf", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("uiiu", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("b", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1892524501, model.optionAProperties().mtu()); + Assertions.assertEquals(1973773763, model.optionAProperties().vlanId()); + Assertions.assertEquals(260997198315572861L, model.optionAProperties().peerASN()); + Assertions.assertEquals(1459580016, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1917437594, model.optionAProperties().bfdConfiguration().multiplier()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java deleted file mode 100644 index 8efb93d6456b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class VpnConfigurationPropertiesOptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VpnConfigurationPropertiesOptionAProperties model = BinaryData.fromString( - "{\"primaryIpv4Prefix\":\"wly\",\"primaryIpv6Prefix\":\"chpqvctsfaeuhww\",\"secondaryIpv4Prefix\":\"nstvzuzhasup\",\"secondaryIpv6Prefix\":\"p\",\"mtu\":959912911,\"vlanId\":898786188,\"peerASN\":6273140630685430619,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1867491707,\"multiplier\":1083168713}}") - .toObject(VpnConfigurationPropertiesOptionAProperties.class); - Assertions.assertEquals(959912911, model.mtu()); - Assertions.assertEquals(898786188, model.vlanId()); - Assertions.assertEquals(6273140630685430619L, model.peerAsn()); - Assertions.assertEquals(1867491707, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1083168713, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("wly", model.primaryIpv4Prefix()); - Assertions.assertEquals("chpqvctsfaeuhww", model.primaryIpv6Prefix()); - Assertions.assertEquals("nstvzuzhasup", model.secondaryIpv4Prefix()); - Assertions.assertEquals("p", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VpnConfigurationPropertiesOptionAProperties model - = new VpnConfigurationPropertiesOptionAProperties().withMtu(959912911) - .withVlanId(898786188) - .withPeerAsn(6273140630685430619L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1867491707).withMultiplier(1083168713)) - .withPrimaryIpv4Prefix("wly") - .withPrimaryIpv6Prefix("chpqvctsfaeuhww") - .withSecondaryIpv4Prefix("nstvzuzhasup") - .withSecondaryIpv6Prefix("p"); - model = BinaryData.fromObject(model).toObject(VpnConfigurationPropertiesOptionAProperties.class); - Assertions.assertEquals(959912911, model.mtu()); - Assertions.assertEquals(898786188, model.vlanId()); - Assertions.assertEquals(6273140630685430619L, model.peerAsn()); - Assertions.assertEquals(1867491707, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1083168713, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("wly", model.primaryIpv4Prefix()); - Assertions.assertEquals("chpqvctsfaeuhww", model.primaryIpv6Prefix()); - Assertions.assertEquals("nstvzuzhasup", model.secondaryIpv4Prefix()); - Assertions.assertEquals("p", model.secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java index f1adcd028db1..b3caef37cca2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,67 +18,70 @@ public final class VpnConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VpnConfigurationProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"lc\",\"administrativeState\":\"RMA\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"tfx\",\"crqmipfjwfoygi\",\"mshxxba\",\"zabulnvgsk\"],\"exportRouteTargets\":[\"xjdzjs\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"hxqqmqip\",\"y\",\"hfnzocx\",\"tfshksnyzm\"],\"importIpv6RouteTargets\":[\"mwbwmbnlslce\",\"iqdktwtkvih\",\"pfliwo\",\"nguuzhwvla\"],\"exportIpv4RouteTargets\":[\"mhjhaus\",\"b\",\"ekymffztsilscvqs\",\"eiihfymko\"],\"exportIpv6RouteTargets\":[\"yese\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"cigzhogsmgbv\",\"primaryIpv6Prefix\":\"dwrqbeb\",\"secondaryIpv4Prefix\":\"fveglabtvkb\",\"secondaryIpv6Prefix\":\"znhtf\",\"mtu\":458206255,\"vlanId\":728176337,\"peerASN\":2002416946820305929,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2147211144,\"multiplier\":674933767}}}") + "{\"networkToNetworkInterconnectId\":\"yzadcrxylaypdt\",\"administrativeState\":\"EnabledDegraded\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"ohuriwhjdfrwp\",\"shrmnkcclpctuog\",\"scxjfsgmosp\"],\"exportRouteTargets\":[\"nxs\",\"cowscuyfqlam\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"sujkafuzpnxqp\",\"n\"],\"importIpv6RouteTargets\":[\"kcajgrbrctsvgo\",\"cq\",\"azmzlpcx\"],\"exportIpv4RouteTargets\":[\"hxxrqicf\",\"f\",\"wjdth\",\"vpyeyoafinmpnqu\"],\"exportIpv6RouteTargets\":[\"jr\"]}},\"optionAProperties\":{\"mtu\":348750317,\"vlanId\":1658664040,\"peerASN\":6490988306516040991,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1474370606,\"multiplier\":1806648130},\"primaryIpv4Prefix\":\"c\",\"primaryIpv6Prefix\":\"cvqsrupaylcv\",\"secondaryIpv4Prefix\":\"zmfxlrymfjxlpiy\",\"secondaryIpv6Prefix\":\"npfydrfb\"}}") .toObject(VpnConfigurationProperties.class); - Assertions.assertEquals("lc", model.networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("tfx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("xjdzjs", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("hxqqmqip", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("mwbwmbnlslce", + Assertions.assertEquals("yzadcrxylaypdt", model.networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("ohuriwhjdfrwp", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("nxs", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("sujkafuzpnxqp", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("kcajgrbrctsvgo", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("mhjhaus", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("yese", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(458206255, model.optionAProperties().mtu()); - Assertions.assertEquals(728176337, model.optionAProperties().vlanId()); - Assertions.assertEquals(2002416946820305929L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2147211144, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(674933767, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("cigzhogsmgbv", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwrqbeb", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fveglabtvkb", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("znhtf", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("hxxrqicf", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("jr", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("c", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("cvqsrupaylcv", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("zmfxlrymfjxlpiy", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("npfydrfb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(348750317, model.optionAProperties().mtu()); + Assertions.assertEquals(1658664040, model.optionAProperties().vlanId()); + Assertions.assertEquals(6490988306516040991L, model.optionAProperties().peerASN()); + Assertions.assertEquals(1474370606, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1806648130, model.optionAProperties().bfdConfiguration().multiplier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VpnConfigurationProperties model = new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("lc") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("tfx", "crqmipfjwfoygi", "mshxxba", "zabulnvgsk")) - .withExportRouteTargets(Arrays.asList("xjdzjs")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("hxqqmqip", "y", "hfnzocx", "tfshksnyzm")) - .withImportIpv6RouteTargets(Arrays.asList("mwbwmbnlslce", "iqdktwtkvih", "pfliwo", "nguuzhwvla")) - .withExportIpv4RouteTargets(Arrays.asList("mhjhaus", "b", "ekymffztsilscvqs", "eiihfymko")) - .withExportIpv6RouteTargets(Arrays.asList("yese")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(458206255) - .withVlanId(728176337) - .withPeerAsn(2002416946820305929L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2147211144).withMultiplier(674933767)) - .withPrimaryIpv4Prefix("cigzhogsmgbv") - .withPrimaryIpv6Prefix("dwrqbeb") - .withSecondaryIpv4Prefix("fveglabtvkb") - .withSecondaryIpv6Prefix("znhtf")); + VpnConfigurationProperties model + = new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("yzadcrxylaypdt") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("ohuriwhjdfrwp", "shrmnkcclpctuog", "scxjfsgmosp")) + .withExportRouteTargets(Arrays.asList("nxs", "cowscuyfqlam")) + .withRouteTargets( + new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("sujkafuzpnxqp", "n")) + .withImportIpv6RouteTargets(Arrays.asList("kcajgrbrctsvgo", "cq", "azmzlpcx")) + .withExportIpv4RouteTargets(Arrays.asList("hxxrqicf", "f", "wjdth", "vpyeyoafinmpnqu")) + .withExportIpv6RouteTargets(Arrays.asList("jr")))) + .withOptionAProperties(new VpnOptionAProperties().withPrimaryIpv4Prefix("c") + .withPrimaryIpv6Prefix("cvqsrupaylcv") + .withSecondaryIpv4Prefix("zmfxlrymfjxlpiy") + .withSecondaryIpv6Prefix("npfydrfb") + .withMtu(348750317) + .withVlanId(1658664040) + .withPeerASN(6490988306516040991L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1474370606).withMultiplier(1806648130))); model = BinaryData.fromObject(model).toObject(VpnConfigurationProperties.class); - Assertions.assertEquals("lc", model.networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("tfx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("xjdzjs", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("hxqqmqip", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("mwbwmbnlslce", + Assertions.assertEquals("yzadcrxylaypdt", model.networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); + Assertions.assertEquals("ohuriwhjdfrwp", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("nxs", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("sujkafuzpnxqp", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("kcajgrbrctsvgo", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("mhjhaus", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("yese", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(458206255, model.optionAProperties().mtu()); - Assertions.assertEquals(728176337, model.optionAProperties().vlanId()); - Assertions.assertEquals(2002416946820305929L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2147211144, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(674933767, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("cigzhogsmgbv", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwrqbeb", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fveglabtvkb", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("znhtf", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("hxxrqicf", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("jr", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("c", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("cvqsrupaylcv", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("zmfxlrymfjxlpiy", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("npfydrfb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(348750317, model.optionAProperties().mtu()); + Assertions.assertEquals(1658664040, model.optionAProperties().vlanId()); + Assertions.assertEquals(6490988306516040991L, model.optionAProperties().peerASN()); + Assertions.assertEquals(1474370606, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1806648130, model.optionAProperties().bfdConfiguration().multiplier()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java new file mode 100644 index 000000000000..2cb328b032b9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionAPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionAPatchProperties model = BinaryData.fromString( + "{\"mtu\":667641436,\"vlanId\":606360738,\"peerASN\":466236631596998274,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":2120399292,\"multiplier\":1021377544},\"primaryIpv4Prefix\":\"knv\",\"primaryIpv6Prefix\":\"ddlggb\",\"secondaryIpv4Prefix\":\"olgzubakdlkv\",\"secondaryIpv6Prefix\":\"cmfnsffet\"}") + .toObject(VpnOptionAPatchProperties.class); + Assertions.assertEquals("knv", model.primaryIpv4Prefix()); + Assertions.assertEquals("ddlggb", model.primaryIpv6Prefix()); + Assertions.assertEquals("olgzubakdlkv", model.secondaryIpv4Prefix()); + Assertions.assertEquals("cmfnsffet", model.secondaryIpv6Prefix()); + Assertions.assertEquals(667641436, model.mtu()); + Assertions.assertEquals(606360738, model.vlanId()); + Assertions.assertEquals(466236631596998274L, model.peerASN()); + Assertions.assertEquals(2120399292, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1021377544, model.bfdConfiguration().multiplier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionAPatchProperties model = new VpnOptionAPatchProperties().withPrimaryIpv4Prefix("knv") + .withPrimaryIpv6Prefix("ddlggb") + .withSecondaryIpv4Prefix("olgzubakdlkv") + .withSecondaryIpv6Prefix("cmfnsffet") + .withMtu(667641436) + .withVlanId(606360738) + .withPeerASN(466236631596998274L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(2120399292).withMultiplier(1021377544)); + model = BinaryData.fromObject(model).toObject(VpnOptionAPatchProperties.class); + Assertions.assertEquals("knv", model.primaryIpv4Prefix()); + Assertions.assertEquals("ddlggb", model.primaryIpv6Prefix()); + Assertions.assertEquals("olgzubakdlkv", model.secondaryIpv4Prefix()); + Assertions.assertEquals("cmfnsffet", model.secondaryIpv6Prefix()); + Assertions.assertEquals(667641436, model.mtu()); + Assertions.assertEquals(606360738, model.vlanId()); + Assertions.assertEquals(466236631596998274L, model.peerASN()); + Assertions.assertEquals(2120399292, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1021377544, model.bfdConfiguration().multiplier()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java new file mode 100644 index 000000000000..b81a98fc87af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionAPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionAProperties model = BinaryData.fromString( + "{\"mtu\":1147743419,\"vlanId\":736989908,\"peerASN\":7035486155256924179,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1623209582,\"multiplier\":1814057170},\"primaryIpv4Prefix\":\"duydwnwgru\",\"primaryIpv6Prefix\":\"qldrd\",\"secondaryIpv4Prefix\":\"nsw\",\"secondaryIpv6Prefix\":\"exqwqnghxnimvy\"}") + .toObject(VpnOptionAProperties.class); + Assertions.assertEquals("duydwnwgru", model.primaryIpv4Prefix()); + Assertions.assertEquals("qldrd", model.primaryIpv6Prefix()); + Assertions.assertEquals("nsw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("exqwqnghxnimvy", model.secondaryIpv6Prefix()); + Assertions.assertEquals(1147743419, model.mtu()); + Assertions.assertEquals(736989908, model.vlanId()); + Assertions.assertEquals(7035486155256924179L, model.peerASN()); + Assertions.assertEquals(1623209582, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1814057170, model.bfdConfiguration().multiplier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionAProperties model = new VpnOptionAProperties().withPrimaryIpv4Prefix("duydwnwgru") + .withPrimaryIpv6Prefix("qldrd") + .withSecondaryIpv4Prefix("nsw") + .withSecondaryIpv6Prefix("exqwqnghxnimvy") + .withMtu(1147743419) + .withVlanId(736989908) + .withPeerASN(7035486155256924179L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1623209582).withMultiplier(1814057170)); + model = BinaryData.fromObject(model).toObject(VpnOptionAProperties.class); + Assertions.assertEquals("duydwnwgru", model.primaryIpv4Prefix()); + Assertions.assertEquals("qldrd", model.primaryIpv6Prefix()); + Assertions.assertEquals("nsw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("exqwqnghxnimvy", model.secondaryIpv6Prefix()); + Assertions.assertEquals(1147743419, model.mtu()); + Assertions.assertEquals(736989908, model.vlanId()); + Assertions.assertEquals(7035486155256924179L, model.peerASN()); + Assertions.assertEquals(1623209582, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1814057170, model.bfdConfiguration().multiplier()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java new file mode 100644 index 000000000000..8bd4970a4257 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionBPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionBPatchProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"jytqdcizeqqfo\"],\"exportRouteTargets\":[\"opmotdsf\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"lyo\",\"zyfbkmvldzmxojz\",\"vmaigbqkvhyejth\"],\"importIpv6RouteTargets\":[\"cb\",\"ergwlckihbam\",\"qsokknpug\"],\"exportIpv4RouteTargets\":[\"dizcrj\",\"x\"],\"exportIpv6RouteTargets\":[\"zkcsexgkrswksy\"]}}") + .toObject(VpnOptionBPatchProperties.class); + Assertions.assertEquals("jytqdcizeqqfo", model.importRouteTargets().get(0)); + Assertions.assertEquals("opmotdsf", model.exportRouteTargets().get(0)); + Assertions.assertEquals("lyo", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("cb", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("dizcrj", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zkcsexgkrswksy", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionBPatchProperties model + = new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("jytqdcizeqqfo")) + .withExportRouteTargets(Arrays.asList("opmotdsf")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("lyo", "zyfbkmvldzmxojz", "vmaigbqkvhyejth")) + .withImportIpv6RouteTargets(Arrays.asList("cb", "ergwlckihbam", "qsokknpug")) + .withExportIpv4RouteTargets(Arrays.asList("dizcrj", "x")) + .withExportIpv6RouteTargets(Arrays.asList("zkcsexgkrswksy"))); + model = BinaryData.fromObject(model).toObject(VpnOptionBPatchProperties.class); + Assertions.assertEquals("jytqdcizeqqfo", model.importRouteTargets().get(0)); + Assertions.assertEquals("opmotdsf", model.exportRouteTargets().get(0)); + Assertions.assertEquals("lyo", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("cb", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("dizcrj", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zkcsexgkrswksy", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java new file mode 100644 index 000000000000..642e9027f051 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionBPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionBProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"y\",\"byxmkhmqyncgaull\"],\"exportRouteTargets\":[\"yygjqpulmw\",\"gm\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"iwxzfvvz\",\"cqfgu\"],\"importIpv6RouteTargets\":[\"bx\",\"bmwdukinhlxhgde\"],\"exportIpv4RouteTargets\":[\"zouyvewwpzrdwc\"],\"exportIpv6RouteTargets\":[\"ohgcand\",\"fhhhtestdq\",\"dnnckkpljdsh\",\"vfkdxccyijji\"]}}") + .toObject(VpnOptionBProperties.class); + Assertions.assertEquals("y", model.importRouteTargets().get(0)); + Assertions.assertEquals("yygjqpulmw", model.exportRouteTargets().get(0)); + Assertions.assertEquals("iwxzfvvz", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("bx", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("zouyvewwpzrdwc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ohgcand", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionBProperties model = new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("y", "byxmkhmqyncgaull")) + .withExportRouteTargets(Arrays.asList("yygjqpulmw", "gm")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("iwxzfvvz", "cqfgu")) + .withImportIpv6RouteTargets(Arrays.asList("bx", "bmwdukinhlxhgde")) + .withExportIpv4RouteTargets(Arrays.asList("zouyvewwpzrdwc")) + .withExportIpv6RouteTargets(Arrays.asList("ohgcand", "fhhhtestdq", "dnnckkpljdsh", "vfkdxccyijji"))); + model = BinaryData.fromObject(model).toObject(VpnOptionBProperties.class); + Assertions.assertEquals("y", model.importRouteTargets().get(0)); + Assertions.assertEquals("yygjqpulmw", model.exportRouteTargets().get(0)); + Assertions.assertEquals("iwxzfvvz", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("bx", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("zouyvewwpzrdwc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ohgcand", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml new file mode 100644 index 000000000000..55a204ff20a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/managednetworkfabric/ManagedNetworkFabric.ResourceManager.Management +commit: 1a3542f46375ced453982cf69f035d9a9a3924d5 +repo: Azure/azure-rest-api-specs +additionalDirectories: